├── style ├── css │ ├── .gitignore │ └── bg.png ├── img │ └── .gitignore └── unused │ ├── assets │ ├── bg.png │ ├── signals.min.js │ ├── crossroads.min.js │ ├── jasmine │ │ └── jasmine.css │ └── base.css │ ├── app.js │ ├── routers │ └── router.js │ ├── models │ └── todo.js │ ├── collections │ └── todos.js │ ├── indexasdf.html │ ├── views │ ├── todos.js │ └── app.js │ └── lib │ ├── backbone-localstorage.js │ └── underscore-min.js ├── protected ├── views │ ├── todo │ │ └── index.php │ └── layouts │ │ ├── column1.php │ │ ├── column2.php │ │ └── main.php ├── .htaccess ├── yiic ├── data │ ├── testdrive.db │ ├── schema.mysql.sql │ └── schema.sqlite.sql ├── yiic.php ├── runtime │ └── gii-1.1.13 │ │ └── ModelCode.php ├── controllers │ ├── TodoController.php │ ├── SiteController.php │ └── ApiController.php ├── tests │ ├── bootstrap.php │ ├── phpunit.xml │ ├── WebTestCase.php │ └── functional │ │ └── SiteTest.php ├── config │ ├── test.php │ ├── console.php │ └── main.php ├── yiic.bat ├── components │ ├── Controller.php │ └── UserIdentity.php └── models │ └── Todo.php ├── themes └── classic │ └── views │ └── .htaccess ├── assets ├── 2070cf7e │ ├── rating │ │ ├── delete.gif │ │ ├── star.gif │ │ └── jquery.rating.css │ ├── jquery.multifile.js │ ├── treeview │ │ ├── images │ │ │ ├── file.gif │ │ │ ├── plus.gif │ │ │ ├── folder.gif │ │ │ ├── minus.gif │ │ │ ├── ajax-loader.gif │ │ │ ├── treeview-red.gif │ │ │ ├── folder-closed.gif │ │ │ ├── treeview-black.gif │ │ │ ├── treeview-gray.gif │ │ │ ├── treeview-default.gif │ │ │ ├── treeview-red-line.gif │ │ │ ├── treeview-black-line.gif │ │ │ ├── treeview-famfamfam.gif │ │ │ ├── treeview-gray-line.gif │ │ │ ├── treeview-default-line.gif │ │ │ └── treeview-famfamfam-line.gif │ │ └── jquery.treeview.css │ ├── autocomplete │ │ ├── indicator.gif │ │ └── jquery.autocomplete.css │ ├── jui │ │ └── css │ │ │ └── base │ │ │ ├── images │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ ├── jquery.ui.selectable.css │ │ │ ├── jquery.ui.autocomplete.css │ │ │ ├── jquery.ui.progressbar.css │ │ │ ├── jquery.ui.tooltip.css │ │ │ ├── jquery.ui.accordion.css │ │ │ ├── jquery.ui.spinner.css │ │ │ ├── jquery.ui.tabs.css │ │ │ ├── jquery.ui.core.css │ │ │ ├── jquery.ui.resizable.css │ │ │ ├── jquery.ui.slider.css │ │ │ ├── jquery.ui.menu.css │ │ │ ├── jquery.ui.dialog.css │ │ │ ├── jquery.ui.button.css │ │ │ └── jquery.ui.datepicker.css │ ├── yiitab │ │ └── jquery.yiitab.css │ ├── jquery.yii.js │ ├── jquery.yiitab.js │ ├── jquery.treeview.edit.js │ ├── jquery.bgiframe.js │ ├── punycode.min.js │ ├── jquery.maskedinput.min.js │ ├── jquery.ajaxqueue.js │ ├── jquery.treeview.async.js │ ├── jquery.ba-bbq.min.js │ ├── jquery.cookie.js │ ├── jquery.metadata.js │ ├── jquery.maskedinput.js │ └── jquery.treeview.js └── 6c3e0ad6 │ ├── images │ └── logo.png │ ├── js │ ├── fancybox │ │ ├── blank.gif │ │ ├── fancybox.png │ │ ├── fancy_close.png │ │ ├── fancybox-x.png │ │ ├── fancybox-y.png │ │ ├── fancy_loading.png │ │ ├── fancy_nav_left.png │ │ ├── fancy_nav_right.png │ │ ├── fancy_shadow_e.png │ │ ├── fancy_shadow_n.png │ │ ├── fancy_shadow_ne.png │ │ ├── fancy_shadow_nw.png │ │ ├── fancy_shadow_s.png │ │ ├── fancy_shadow_se.png │ │ ├── fancy_shadow_sw.png │ │ ├── fancy_shadow_w.png │ │ ├── fancy_title_left.png │ │ ├── fancy_title_main.png │ │ ├── fancy_title_over.png │ │ ├── fancy_title_right.png │ │ └── jquery.fancybox-1.3.1.css │ ├── main.js │ └── jquery.tooltip-1.2.6.min.js │ └── css │ ├── print.css │ ├── ie.css │ ├── main.css │ └── screen.css ├── .htaccess ├── index.php ├── index-test.php ├── .gitattributes ├── readme.md └── .gitignore /style/css/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /style/img/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /protected/views/todo/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /protected/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all 2 | -------------------------------------------------------------------------------- /themes/classic/views/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all 2 | -------------------------------------------------------------------------------- /style/css/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fg/yii.TodoMVC/master/style/css/bg.png -------------------------------------------------------------------------------- /protected/yiic: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 2 | beginContent('//layouts/main'); ?> 3 |
4 | 5 |
6 | endContent(); ?> -------------------------------------------------------------------------------- /protected/runtime/gii-1.1.13/ModelCode.php: -------------------------------------------------------------------------------- 1 | 'default', 4 | 'connectionId' => 'db', 5 | 'tablePrefix' => '', 6 | 'modelPath' => 'application.models', 7 | 'baseClass' => 'CActiveRecord', 8 | 'buildRelations' => '1', 9 | ); 10 | -------------------------------------------------------------------------------- /assets/2070cf7e/jui/css/base/jquery.ui.selectable.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.selectable.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black} -------------------------------------------------------------------------------- /protected/controllers/TodoController.php: -------------------------------------------------------------------------------- 1 | render('index'); 11 | } 12 | } -------------------------------------------------------------------------------- /assets/2070cf7e/jui/css/base/jquery.ui.autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.autocomplete.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-autocomplete{position:absolute;top:0;left:0;cursor:default}* html .ui-autocomplete{width:1px} -------------------------------------------------------------------------------- /protected/controllers/SiteController.php: -------------------------------------------------------------------------------- 1 | redirect(Yii::app()->createUrl('todo')); 10 | } 11 | } -------------------------------------------------------------------------------- /protected/tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /assets/2070cf7e/jui/css/base/jquery.ui.tooltip.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.tooltip.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}* html .ui-tooltip{background-image:none}body .ui-tooltip{border-width:2px} -------------------------------------------------------------------------------- /protected/config/test.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'fixture'=>array( 8 | 'class'=>'system.test.CDbFixtureManager', 9 | ), 10 | /* uncomment the following to provide test database connection 11 | 'db'=>array( 12 | 'connectionString'=>'DSN for test database', 13 | ), 14 | */ 15 | ), 16 | ) 17 | ); 18 | -------------------------------------------------------------------------------- /protected/yiic.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem ------------------------------------------------------------- 4 | rem Yii command line script for Windows. 5 | rem This is the bootstrap script for running yiic on Windows. 6 | rem ------------------------------------------------------------- 7 | 8 | @setlocal 9 | 10 | set BIN_PATH=%~dp0 11 | 12 | if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe 13 | 14 | "%PHP_COMMAND%" "%BIN_PATH%yiic.php" %* 15 | 16 | @endlocal -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | run(); 14 | -------------------------------------------------------------------------------- /index-test.php: -------------------------------------------------------------------------------- 1 | run(); 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /style/unused/routers/router.js: -------------------------------------------------------------------------------- 1 | var app = app || {}; 2 | 3 | (function() { 4 | 'use strict'; 5 | 6 | // Todo Router 7 | // ---------- 8 | 9 | var Workspace = Backbone.Router.extend({ 10 | routes:{ 11 | '*filter': 'setFilter' 12 | }, 13 | 14 | setFilter: function( param ) { 15 | // Set the current filter to be used 16 | window.app.TodoFilter = param.trim() || ''; 17 | 18 | // Trigger a collection reset/addAll 19 | window.app.Todos.trigger('reset'); 20 | } 21 | }); 22 | 23 | app.TodoRouter = new Workspace(); 24 | Backbone.history.start(); 25 | 26 | }()); 27 | -------------------------------------------------------------------------------- /protected/views/layouts/column2.php: -------------------------------------------------------------------------------- 1 | 2 | beginContent('//layouts/main'); ?> 3 |
4 |
5 | 6 |
7 |
8 |
9 | 21 |
22 | endContent(); ?> -------------------------------------------------------------------------------- /style/unused/models/todo.js: -------------------------------------------------------------------------------- 1 | var app = app || {}; 2 | 3 | (function() { 4 | 'use strict'; 5 | 6 | // Todo Model 7 | // ---------- 8 | 9 | // Our basic **Todo** model has `title`, `order`, and `completed` attributes. 10 | app.Todo = Backbone.Model.extend({ 11 | 12 | // Default attributes for the todo 13 | // and ensure that each todo created has `title` and `completed` keys. 14 | defaults: { 15 | title: '', 16 | completed: false 17 | }, 18 | 19 | // Toggle the `completed` state of this todo item. 20 | toggle: function() { 21 | this.save({ 22 | completed: !this.get('completed') 23 | }); 24 | } 25 | 26 | }); 27 | 28 | }()); 29 | -------------------------------------------------------------------------------- /assets/2070cf7e/jui/css/base/jquery.ui.accordion.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.accordion.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;zoom:1}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto;zoom:1} -------------------------------------------------------------------------------- /protected/tests/WebTestCase.php: -------------------------------------------------------------------------------- 1 | setBrowserUrl(TEST_BASE_URL); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /assets/2070cf7e/jui/css/base/jquery.ui.spinner.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.spinner.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px} -------------------------------------------------------------------------------- /assets/2070cf7e/rating/jquery.rating.css: -------------------------------------------------------------------------------- 1 | /* jQuery.Rating Plugin CSS - http://www.fyneworks.com/jquery/star-rating/ */ 2 | div.rating-cancel,div.star-rating{float:left;width:17px;height:15px;text-indent:-999em;cursor:pointer;display:block;background:transparent;overflow:hidden} 3 | div.rating-cancel,div.rating-cancel a{background:url(delete.gif) no-repeat 0 -16px} 4 | div.star-rating,div.star-rating a{background:url(star.gif) no-repeat 0 0px} 5 | div.rating-cancel a,div.star-rating a{display:block;width:16px;height:100%;background-position:0 0px;border:0} 6 | div.star-rating-on a{background-position:0 -16px!important} 7 | div.star-rating-hover a{background-position:0 -32px} 8 | /* Read Only CSS */ 9 | div.star-rating-readonly a{cursor:default !important} 10 | /* Partial Star CSS */ 11 | div.star-rating{background:transparent!important;overflow:hidden!important} 12 | /* END jQuery.Rating Plugin CSS */ -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # What is Yii todo.MVC ? 2 | Yii.todoMVC is example todo application with YII Framework. 3 | 4 | # Installation: 5 | Run the following SQL script before setup yii.TodoMVC application. 6 | SQL: 7 | 8 | ```sql 9 | CREATE TABLE IF NOT EXISTS `todolist` ( 10 | `id_todo` int(11) NOT NULL AUTO_INCREMENT, 11 | `title` varchar(128) NOT NULL, 12 | `status` tinyint(1) NOT NULL DEFAULT '0', 13 | `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP, 14 | PRIMARY KEY (`id_todo`) 15 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; 16 | ``` 17 | Clone this repository: 18 | 19 | ```sh 20 | $ git clone git@github.com:fgursoy34/yii.TodoMVC.git 21 | ``` 22 | 23 | Build your virtual host configuration or run on built-in web server with the foloowing command: 24 | 25 | ``` 26 | $ php -s localhost:8080 -t ./yii.TodoMVC 27 | ``` 28 | # Contact: 29 | https://www.facebook.com/fgursoy0034 30 | 31 | 32 | -------------------------------------------------------------------------------- /assets/2070cf7e/jui/css/base/jquery.ui.tabs.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.tabs.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none} -------------------------------------------------------------------------------- /protected/components/Controller.php: -------------------------------------------------------------------------------- 1 | dirname(__FILE__).DIRECTORY_SEPARATOR.'..', 7 | 'name'=>'My Console Application', 8 | 9 | // preloading 'log' component 10 | 'preload'=>array('log'), 11 | 12 | // application components 13 | 'components'=>array( 14 | 'db'=>array( 15 | 'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db', 16 | ), 17 | // uncomment the following to use a MySQL database 18 | /* 19 | 'db'=>array( 20 | 'connectionString' => 'mysql:host=localhost;dbname=testdrive', 21 | 'emulatePrepare' => true, 22 | 'username' => 'root', 23 | 'password' => '', 24 | 'charset' => 'utf8', 25 | ), 26 | */ 27 | 'log'=>array( 28 | 'class'=>'CLogRouter', 29 | 'routes'=>array( 30 | array( 31 | 'class'=>'CFileLogRoute', 32 | 'levels'=>'error, warning', 33 | ), 34 | ), 35 | ), 36 | ), 37 | ); -------------------------------------------------------------------------------- /assets/2070cf7e/jui/css/base/jquery.ui.menu.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.menu.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;zoom:1;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right} -------------------------------------------------------------------------------- /assets/2070cf7e/autocomplete/jquery.autocomplete.css: -------------------------------------------------------------------------------- 1 | .ac_results { 2 | padding: 0px; 3 | border: 1px solid black; 4 | background-color: white; 5 | overflow: hidden; 6 | z-index: 99999; 7 | } 8 | 9 | .ac_results ul { 10 | width: 100%; 11 | list-style-position: outside; 12 | list-style: none; 13 | padding: 0; 14 | margin: 0; 15 | } 16 | 17 | .ac_results li { 18 | margin: 0px; 19 | padding: 2px 5px; 20 | cursor: default; 21 | display: block; 22 | /* 23 | if width will be 100% horizontal scrollbar will apear 24 | when scroll mode will be used 25 | */ 26 | /*width: 100%;*/ 27 | font: menu; 28 | font-size: 12px; 29 | /* 30 | it is very important, if line-height not setted or setted 31 | in relative units scroll will be broken in firefox 32 | */ 33 | line-height: 16px; 34 | overflow: hidden; 35 | } 36 | 37 | .ac_loading { 38 | background: white url('indicator.gif') right center no-repeat; 39 | } 40 | 41 | .ac_odd { 42 | background-color: #eee; 43 | } 44 | 45 | .ac_over { 46 | background-color: #0A246A; 47 | color: white; 48 | } 49 | -------------------------------------------------------------------------------- /protected/components/UserIdentity.php: -------------------------------------------------------------------------------- 1 | password 22 | 'demo'=>'demo', 23 | 'admin'=>'admin', 24 | ); 25 | if(!isset($users[$this->username])) 26 | $this->errorCode=self::ERROR_USERNAME_INVALID; 27 | elseif($users[$this->username]!==$this->password) 28 | $this->errorCode=self::ERROR_PASSWORD_INVALID; 29 | else 30 | $this->errorCode=self::ERROR_NONE; 31 | return !$this->errorCode; 32 | } 33 | } -------------------------------------------------------------------------------- /assets/2070cf7e/yiitab/jquery.yiitab.css: -------------------------------------------------------------------------------- 1 | .yiiTab ul.tabs 2 | { 3 | padding: 2px 0; 4 | margin: 0; 5 | border-bottom: 1px solid #4F81BD; 6 | font: bold 12px Verdana, sans-serif; 7 | } 8 | 9 | .yiiTab ul.tabs li 10 | { 11 | list-style: none; 12 | margin: 0; 13 | display: inline; 14 | } 15 | 16 | .yiiTab ul.tabs a 17 | { 18 | -moz-border-radius-topleft:5px; 19 | -moz-border-radius-topright:5px; 20 | padding: 2px 0.5em; 21 | margin: 0 0 0 3px; 22 | border: 1px solid #4F81BD; 23 | border-bottom: none; 24 | background: #d3dfee; 25 | text-decoration: none; 26 | } 27 | 28 | .yiiTab ul.tabs a:link 29 | { 30 | color: #667; 31 | } 32 | 33 | .yiiTab ul.tabs a:visited 34 | { 35 | color: #667; 36 | } 37 | 38 | .yiiTab ul.tabs a:hover 39 | { 40 | color: #000; 41 | background: #E6F2FF; 42 | border-color: #227; 43 | } 44 | 45 | .yiiTab ul.tabs a.active 46 | { 47 | background: white; 48 | border-bottom: 1px solid white; 49 | } 50 | 51 | .yiiTab div.view 52 | { 53 | border-left: 1px solid #4F81BD; 54 | border-right: 1px solid #4F81BD; 55 | border-bottom: 1px solid #4F81BD; 56 | padding: 8px; 57 | margin: 0; 58 | } -------------------------------------------------------------------------------- /assets/2070cf7e/jui/css/base/jquery.ui.dialog.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.dialog.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-dialog{position:absolute;top:0;left:0;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move} -------------------------------------------------------------------------------- /assets/2070cf7e/jquery.yii.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery Yii plugin file. 3 | * 4 | * @author Qiang Xue 5 | * @link http://www.yiiframework.com/ 6 | * @copyright Copyright © 2008-2010 Yii Software LLC 7 | * @license http://www.yiiframework.com/license/ 8 | */ 9 | 10 | ;(function($) { 11 | 12 | $.yii = { 13 | version : '1.0', 14 | 15 | submitForm : function (element, url, params) { 16 | var f = $(element).parents('form')[0]; 17 | if (!f) { 18 | f = document.createElement('form'); 19 | f.style.display = 'none'; 20 | element.parentNode.appendChild(f); 21 | f.method = 'POST'; 22 | } 23 | if (typeof url == 'string' && url != '') { 24 | f.action = url; 25 | } 26 | if (element.target != null) { 27 | f.target = element.target; 28 | } 29 | 30 | var inputs = []; 31 | $.each(params, function(name, value) { 32 | var input = document.createElement("input"); 33 | input.setAttribute("type", "hidden"); 34 | input.setAttribute("name", name); 35 | input.setAttribute("value", value); 36 | f.appendChild(input); 37 | inputs.push(input); 38 | }); 39 | 40 | // remember who triggers the form submission 41 | // this is used by jquery.yiiactiveform.js 42 | $(f).data('submitObject', $(element)); 43 | 44 | $(f).trigger('submit'); 45 | 46 | $.each(inputs, function() { 47 | f.removeChild(this); 48 | }); 49 | } 50 | }; 51 | 52 | })(jQuery); 53 | -------------------------------------------------------------------------------- /assets/6c3e0ad6/css/print.css: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- 2 | 3 | 4 | Blueprint CSS Framework 0.9 5 | http://blueprintcss.org 6 | 7 | * Copyright (c) 2007-Present. See LICENSE for more info. 8 | * See README for instructions on how to use Blueprint. 9 | * For credits and origins, see AUTHORS. 10 | * This is a compressed file. See the sources in the 'src' directory. 11 | 12 | ----------------------------------------------------------------------- */ 13 | 14 | /* print.css */ 15 | body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;} 16 | .container {background:none;} 17 | hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;} 18 | hr.space {background:#fff;color:#fff;visibility:hidden;} 19 | h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;} 20 | code {font:.9em "Courier New", Monaco, Courier, monospace;} 21 | a img {border:none;} 22 | p img.top {margin-top:0;} 23 | blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;} 24 | .small {font-size:.9em;} 25 | .large {font-size:1.1em;} 26 | .quiet {color:#999;} 27 | .hide {display:none;} 28 | a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;} 29 | a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;} -------------------------------------------------------------------------------- /assets/2070cf7e/jquery.yiitab.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery Yii plugin file. 3 | * 4 | * @author Qiang Xue 5 | * @link http://www.yiiframework.com/ 6 | * @copyright Copyright © 2008-2010 Yii Software LLC 7 | * @license http://www.yiiframework.com/license/ 8 | */ 9 | 10 | ;(function($) { 11 | 12 | $.extend($.fn, { 13 | yiitab: function() { 14 | 15 | function activate(id) { 16 | var pos = id.indexOf("#"); 17 | if (pos>=0) { 18 | id = id.substring(pos); 19 | } 20 | var $tab=$(id); 21 | var $container=$tab.parent(); 22 | $container.find('>ul a').removeClass('active'); 23 | $container.find('>ul a[href="'+id+'"]').addClass('active'); 24 | $container.children('div').hide(); 25 | $tab.show(); 26 | } 27 | 28 | this.find('>ul a').click(function(event) { 29 | var href=$(this).attr('href'); 30 | var pos=href.indexOf('#'); 31 | activate(href); 32 | if(pos==0 || (pos>0 && (window.location.pathname=='' || window.location.pathname==href.substring(0,pos)))) 33 | return false; 34 | }); 35 | 36 | // activate a tab based on the current anchor 37 | var url = decodeURI(window.location); 38 | var pos = url.indexOf("#"); 39 | if (pos >= 0) { 40 | var id = url.substring(pos); 41 | if (this.find('>ul a[href="'+id+'"]').length > 0) { 42 | activate(id); 43 | return; 44 | } 45 | } 46 | } 47 | }); 48 | 49 | })(jQuery); 50 | -------------------------------------------------------------------------------- /style/unused/collections/todos.js: -------------------------------------------------------------------------------- 1 | var app = app || {}; 2 | 3 | (function() { 4 | 'use strict'; 5 | 6 | // Todo Collection 7 | // --------------- 8 | 9 | // The collection of todos is backed by *localStorage* instead of a remote 10 | // server. 11 | var TodoList = Backbone.Collection.extend({ 12 | 13 | // Reference to this collection's model. 14 | model: app.Todo, 15 | 16 | // Save all of the todo items under the `"todos"` namespace. 17 | localStorage: new Store('todos-backbone'), 18 | 19 | // Filter down the list of all todo items that are finished. 20 | completed: function() { 21 | return this.filter(function( todo ) { 22 | return todo.get('completed'); 23 | }); 24 | }, 25 | 26 | // Filter down the list to only todo items that are still not finished. 27 | remaining: function() { 28 | return this.without.apply( this, this.completed() ); 29 | }, 30 | 31 | // We keep the Todos in sequential order, despite being saved by unordered 32 | // GUID in the database. This generates the next order number for new items. 33 | nextOrder: function() { 34 | if ( !this.length ) { 35 | return 1; 36 | } 37 | return this.last().get('order') + 1; 38 | }, 39 | 40 | // Todos are sorted by their original insertion order. 41 | comparator: function( todo ) { 42 | return todo.get('order'); 43 | } 44 | }); 45 | 46 | // Create our global collection of **Todos**. 47 | app.Todos = new TodoList(); 48 | 49 | }()); 50 | -------------------------------------------------------------------------------- /protected/tests/functional/SiteTest.php: -------------------------------------------------------------------------------- 1 | open(''); 8 | $this->assertTextPresent('Welcome'); 9 | } 10 | 11 | public function testContact() 12 | { 13 | $this->open('?r=site/contact'); 14 | $this->assertTextPresent('Contact Us'); 15 | $this->assertElementPresent('name=ContactForm[name]'); 16 | 17 | $this->type('name=ContactForm[name]','tester'); 18 | $this->type('name=ContactForm[email]','tester@example.com'); 19 | $this->type('name=ContactForm[subject]','test subject'); 20 | $this->click("//input[@value='Submit']"); 21 | $this->waitForTextPresent('Body cannot be blank.'); 22 | } 23 | 24 | public function testLoginLogout() 25 | { 26 | $this->open(''); 27 | // ensure the user is logged out 28 | if($this->isTextPresent('Logout')) 29 | $this->clickAndWait('link=Logout (demo)'); 30 | 31 | // test login process, including validation 32 | $this->clickAndWait('link=Login'); 33 | $this->assertElementPresent('name=LoginForm[username]'); 34 | $this->type('name=LoginForm[username]','demo'); 35 | $this->click("//input[@value='Login']"); 36 | $this->waitForTextPresent('Password cannot be blank.'); 37 | $this->type('name=LoginForm[password]','demo'); 38 | $this->clickAndWait("//input[@value='Login']"); 39 | $this->assertTextNotPresent('Password cannot be blank.'); 40 | $this->assertTextPresent('Logout'); 41 | 42 | // test logout process 43 | $this->assertTextNotPresent('Login'); 44 | $this->clickAndWait('link=Logout (demo)'); 45 | $this->assertTextPresent('Login'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /protected/controllers/ApiController.php: -------------------------------------------------------------------------------- 1 | findByPk($id); 17 | $model->delete(); 18 | exit; 19 | } 20 | 21 | 22 | $arr = ''; 23 | $todos = Todo::model()->findAll(); 24 | 25 | $i = 0; 26 | foreach($todos AS $todo){ 27 | $arr[$i]['id'] = $todo->id_todo; 28 | $arr[$i]['title'] = $todo->title; 29 | 30 | if($todo->status == 1): 31 | $arr[$i]['completed'] = 'yes'; 32 | else: 33 | $arr[$i]['completed'] = 'no'; 34 | endif; 35 | $i++; 36 | } 37 | echo json_encode($arr); 38 | 39 | } 40 | public function actionView() 41 | { 42 | } 43 | public function actionCreate() 44 | { 45 | $post = file_get_contents("php://input"); 46 | $data = CJSON::decode($post, true); 47 | $model = new Todo; 48 | $model->title = $data['title']; 49 | $data['completed'] == "no" ? $c = 0 : $c=1; 50 | $model->status = $c; 51 | $model->save(); 52 | } 53 | public function actionUpdate() 54 | { 55 | $post = file_get_contents("php://input"); 56 | $data = CJSON::decode($post, true); 57 | $model = Todo::model()->findByPk($data['id']); 58 | $data['completed'] == 'yes' ? $c = 1 : $c = 0; 59 | $model->status = $c; 60 | $model->save(); 61 | } 62 | public function actionDelete() 63 | { 64 | $post = file_get_contents("php://input"); 65 | $data = CJSON::decode($post, true); 66 | print_r($data); 67 | } 68 | } -------------------------------------------------------------------------------- /assets/2070cf7e/jquery.treeview.edit.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var CLASSES = $.treeview.classes; 3 | var proxied = $.fn.treeview; 4 | $.fn.treeview = function(settings) { 5 | settings = $.extend({}, settings); 6 | if (settings.add) { 7 | return this.trigger("add", [settings.add]); 8 | } 9 | if (settings.remove) { 10 | return this.trigger("remove", [settings.remove]); 11 | } 12 | return proxied.apply(this, arguments).bind("add", function(event, branches) { 13 | $(branches).prev() 14 | .removeClass(CLASSES.last) 15 | .removeClass(CLASSES.lastCollapsable) 16 | .removeClass(CLASSES.lastExpandable) 17 | .find(">.hitarea") 18 | .removeClass(CLASSES.lastCollapsableHitarea) 19 | .removeClass(CLASSES.lastExpandableHitarea); 20 | $(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler")); 21 | }).bind("remove", function(event, branches) { 22 | var prev = $(branches).prev(); 23 | var parent = $(branches).parent(); 24 | $(branches).remove(); 25 | prev.filter(":last-child").addClass(CLASSES.last) 26 | .filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end() 27 | .find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end() 28 | .filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end() 29 | .find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea); 30 | if (parent.is(":not(:has(>))") && parent[0] != this) { 31 | parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable); 32 | parent.siblings(".hitarea").andSelf().remove(); 33 | } 34 | }); 35 | }; 36 | 37 | })(jQuery); -------------------------------------------------------------------------------- /assets/2070cf7e/jquery.bgiframe.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) 2 | * Licensed under the MIT License (LICENSE.txt). 3 | * 4 | * Version 2.1.2 5 | */ 6 | 7 | (function($){ 8 | 9 | $.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) { 10 | s = $.extend({ 11 | top : 'auto', // auto == .currentStyle.borderTopWidth 12 | left : 'auto', // auto == .currentStyle.borderLeftWidth 13 | width : 'auto', // auto == offsetWidth 14 | height : 'auto', // auto == offsetHeight 15 | opacity : true, 16 | src : 'javascript:false;' 17 | }, s); 18 | var html = '