").append( jQuery.parseHTML( responseText ) ).find( selector ) :
63 |
64 | // Otherwise use the full result
65 | responseText );
66 |
67 | }).complete( callback && function( jqXHR, status ) {
68 | self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
69 | });
70 | }
71 |
72 | return this;
73 | };
74 |
75 | });
76 |
--------------------------------------------------------------------------------
/web-client/views/book/create.html:
--------------------------------------------------------------------------------
1 |
2 |
BOOK CRUD
3 |
4 |
{{ message }}
5 |
46 |
--------------------------------------------------------------------------------
/web-client2/views/book/create.html:
--------------------------------------------------------------------------------
1 |
2 |
BOOK CRUD
3 |
4 |
{{ message }}
5 |
6 |
13 |
19 |
26 |
33 |
40 |
41 | Cancel
42 | Submit
45 |
46 |
--------------------------------------------------------------------------------
/web-client/views/book/update.html:
--------------------------------------------------------------------------------
1 |
2 |
BOOK CRUD
3 |
4 |
{{ message }}
5 |
6 |
13 |
19 |
26 |
33 |
40 |
41 | Cancel
42 | Submit
45 |
46 |
--------------------------------------------------------------------------------
/web-client2/views/book/update.html:
--------------------------------------------------------------------------------
1 |
2 |
BOOK CRUD
3 |
4 |
{{ message }}
5 |
6 |
13 |
19 |
26 |
33 |
40 |
41 | Cancel
42 | Submit
45 |
46 |
--------------------------------------------------------------------------------
/web-client2/assets/bootstrap/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap",
3 | "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development.",
4 | "version": "3.1.1",
5 | "keywords": [
6 | "bootstrap",
7 | "css"
8 | ],
9 | "homepage": "http://getbootstrap.com",
10 | "author": "Twitter, Inc.",
11 | "scripts": {
12 | "test": "grunt test"
13 | },
14 | "style": "./dist/css/bootstrap.css",
15 | "less": "./less/bootstrap.less",
16 | "repository": {
17 | "type": "git",
18 | "url": "https://github.com/twbs/bootstrap.git"
19 | },
20 | "bugs": {
21 | "url": "https://github.com/twbs/bootstrap/issues"
22 | },
23 | "license": {
24 | "type": "MIT",
25 | "url": "https://github.com/twbs/bootstrap/blob/master/LICENSE"
26 | },
27 | "devDependencies": {
28 | "btoa": "~1.1.1",
29 | "canonical-json": "~0.0.3",
30 | "grunt": "~0.4.2",
31 | "grunt-banner": "~0.2.0",
32 | "grunt-contrib-clean": "~0.5.0",
33 | "grunt-contrib-concat": "~0.3.0",
34 | "grunt-contrib-connect": "~0.6.0",
35 | "grunt-contrib-copy": "~0.5.0",
36 | "grunt-contrib-csslint": "~0.2.0",
37 | "grunt-contrib-cssmin": "~0.7.0",
38 | "grunt-contrib-jade": "~0.9.1",
39 | "grunt-contrib-jshint": "~0.8.0",
40 | "grunt-contrib-less": "~0.9.0",
41 | "grunt-contrib-qunit": "~0.4.0",
42 | "grunt-contrib-uglify": "~0.3.0",
43 | "grunt-contrib-watch": "~0.5.3",
44 | "grunt-csscomb": "~2.0.1",
45 | "grunt-exec": "0.4.3",
46 | "grunt-html-validation": "~0.1.13",
47 | "grunt-jekyll": "~0.4.1",
48 | "grunt-jscs-checker": "~0.3.0",
49 | "grunt-saucelabs": "~5.0.0",
50 | "grunt-sed": "~0.1.1",
51 | "load-grunt-tasks": "~0.3.0",
52 | "markdown": "~0.5.0"
53 | },
54 | "jspm": {
55 | "main": "js/bootstrap",
56 | "directories": {
57 | "example": "examples",
58 | "lib": "dist"
59 | },
60 | "shim": {
61 | "js/bootstrap": {
62 | "imports": "jquery",
63 | "exports": "$"
64 | }
65 | },
66 | "buildConfig": {
67 | "uglify": true
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/web-service/tests/codeception/unit/models/ContactFormTest.php:
--------------------------------------------------------------------------------
1 | mailer->fileTransportCallback = function ($mailer, $message) {
17 | return 'testing_message.eml';
18 | };
19 | }
20 |
21 | protected function tearDown()
22 | {
23 | unlink($this->getMessageFile());
24 | parent::tearDown();
25 | }
26 |
27 | public function testContact()
28 | {
29 | $model = $this->getMock('app\models\ContactForm', ['validate']);
30 | $model->expects($this->once())->method('validate')->will($this->returnValue(true));
31 |
32 | $model->attributes = [
33 | 'name' => 'Tester',
34 | 'email' => 'tester@example.com',
35 | 'subject' => 'very important letter subject',
36 | 'body' => 'body of current message',
37 | ];
38 |
39 | $model->contact('admin@example.com');
40 |
41 | $this->specify('email should be send', function () {
42 | expect('email file should exist', file_exists($this->getMessageFile()))->true();
43 | });
44 |
45 | $this->specify('message should contain correct data', function () use ($model) {
46 | $emailMessage = file_get_contents($this->getMessageFile());
47 |
48 | expect('email should contain user name', $emailMessage)->contains($model->name);
49 | expect('email should contain sender email', $emailMessage)->contains($model->email);
50 | expect('email should contain subject', $emailMessage)->contains($model->subject);
51 | expect('email should contain body', $emailMessage)->contains($model->body);
52 | });
53 | }
54 |
55 | private function getMessageFile()
56 | {
57 | return Yii::getAlias(Yii::$app->mailer->fileTransportPath) . '/testing_message.eml';
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/web-client2/assets/angular/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular
15 | ```
16 |
17 | Then add a `
21 | ```
22 |
23 | Or `require('angular')` from your code.
24 |
25 | ### bower
26 |
27 | ```shell
28 | bower install angular
29 | ```
30 |
31 | Then add a `
35 | ```
36 |
37 | ## Documentation
38 |
39 | Documentation is available on the
40 | [AngularJS docs site](http://docs.angularjs.org/).
41 |
42 | ## License
43 |
44 | The MIT License
45 |
46 | Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
47 |
48 | Permission is hereby granted, free of charge, to any person obtaining a copy
49 | of this software and associated documentation files (the "Software"), to deal
50 | in the Software without restriction, including without limitation the rights
51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52 | copies of the Software, and to permit persons to whom the Software is
53 | furnished to do so, subject to the following conditions:
54 |
55 | The above copyright notice and this permission notice shall be included in
56 | all copies or substantial portions of the Software.
57 |
58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
64 | THE SOFTWARE.
65 |
--------------------------------------------------------------------------------
/web-service/tests/codeception/unit/models/LoginFormTest.php:
--------------------------------------------------------------------------------
1 | user->logout();
17 | parent::tearDown();
18 | }
19 |
20 | public function testLoginNoUser()
21 | {
22 | $model = new LoginForm([
23 | 'username' => 'not_existing_username',
24 | 'password' => 'not_existing_password',
25 | ]);
26 |
27 | $this->specify('user should not be able to login, when there is no identity', function () use ($model) {
28 | expect('model should not login user', $model->login())->false();
29 | expect('user should not be logged in', Yii::$app->user->isGuest)->true();
30 | });
31 | }
32 |
33 | public function testLoginWrongPassword()
34 | {
35 | $model = new LoginForm([
36 | 'username' => 'demo',
37 | 'password' => 'wrong_password',
38 | ]);
39 |
40 | $this->specify('user should not be able to login with wrong password', function () use ($model) {
41 | expect('model should not login user', $model->login())->false();
42 | expect('error message should be set', $model->errors)->hasKey('password');
43 | expect('user should not be logged in', Yii::$app->user->isGuest)->true();
44 | });
45 | }
46 |
47 | public function testLoginCorrect()
48 | {
49 | $model = new LoginForm([
50 | 'username' => 'demo',
51 | 'password' => 'demo',
52 | ]);
53 |
54 | $this->specify('user should be able to login with correct credentials', function () use ($model) {
55 | expect('model should login user', $model->login())->true();
56 | expect('error message should not be set', $model->errors)->hasntKey('password');
57 | expect('user should be logged in', Yii::$app->user->isGuest)->false();
58 | });
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/web-client2/assets/bootstrap/less/print.less:
--------------------------------------------------------------------------------
1 | //
2 | // Basic print styles
3 | // --------------------------------------------------
4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
5 |
6 | @media print {
7 |
8 | * {
9 | text-shadow: none !important;
10 | color: #000 !important; // Black prints faster: h5bp.com/s
11 | background: transparent !important;
12 | box-shadow: none !important;
13 | }
14 |
15 | a,
16 | a:visited {
17 | text-decoration: underline;
18 | }
19 |
20 | a[href]:after {
21 | content: " (" attr(href) ")";
22 | }
23 |
24 | abbr[title]:after {
25 | content: " (" attr(title) ")";
26 | }
27 |
28 | // Don't show links for images, or javascript/internal links
29 | a[href^="javascript:"]:after,
30 | a[href^="#"]:after {
31 | content: "";
32 | }
33 |
34 | pre,
35 | blockquote {
36 | border: 1px solid #999;
37 | page-break-inside: avoid;
38 | }
39 |
40 | thead {
41 | display: table-header-group; // h5bp.com/t
42 | }
43 |
44 | tr,
45 | img {
46 | page-break-inside: avoid;
47 | }
48 |
49 | img {
50 | max-width: 100% !important;
51 | }
52 |
53 | p,
54 | h2,
55 | h3 {
56 | orphans: 3;
57 | widows: 3;
58 | }
59 |
60 | h2,
61 | h3 {
62 | page-break-after: avoid;
63 | }
64 |
65 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245
66 | // Once fixed, we can just straight up remove this.
67 | select {
68 | background: #fff !important;
69 | }
70 |
71 | // Bootstrap components
72 | .navbar {
73 | display: none;
74 | }
75 | .table {
76 | td,
77 | th {
78 | background-color: #fff !important;
79 | }
80 | }
81 | .btn,
82 | .dropup > .btn {
83 | > .caret {
84 | border-top-color: #000 !important;
85 | }
86 | }
87 | .label {
88 | border: 1px solid #000;
89 | }
90 |
91 | .table {
92 | border-collapse: collapse !important;
93 | }
94 | .table-bordered {
95 | th,
96 | td {
97 | border: 1px solid #ddd !important;
98 | }
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------
/web-client2/assets/jquery/src/css/defaultDisplay.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../manipulation" // appendTo
4 | ], function( jQuery ) {
5 |
6 | var iframe,
7 | elemdisplay = {};
8 |
9 | /**
10 | * Retrieve the actual display of a element
11 | * @param {String} name nodeName of the element
12 | * @param {Object} doc Document object
13 | */
14 | // Called only from within defaultDisplay
15 | function actualDisplay( name, doc ) {
16 | var style,
17 | elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
18 |
19 | // getDefaultComputedStyle might be reliably used only on attached element
20 | display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
21 |
22 | // Use of this method is a temporary fix (more like optimization) until something better comes along,
23 | // since it was removed from specification and supported only in FF
24 | style.display : jQuery.css( elem[ 0 ], "display" );
25 |
26 | // We don't have any data stored on the element,
27 | // so use "detach" method as fast way to get rid of the element
28 | elem.detach();
29 |
30 | return display;
31 | }
32 |
33 | /**
34 | * Try to determine the default display value of an element
35 | * @param {String} nodeName
36 | */
37 | function defaultDisplay( nodeName ) {
38 | var doc = document,
39 | display = elemdisplay[ nodeName ];
40 |
41 | if ( !display ) {
42 | display = actualDisplay( nodeName, doc );
43 |
44 | // If the simple way fails, read from inside an iframe
45 | if ( display === "none" || !display ) {
46 |
47 | // Use the already-created iframe if possible
48 | iframe = (iframe || jQuery( "
" )).appendTo( doc.documentElement );
49 |
50 | // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
51 | doc = iframe[ 0 ].contentDocument;
52 |
53 | // Support: IE
54 | doc.write();
55 | doc.close();
56 |
57 | display = actualDisplay( nodeName, doc );
58 | iframe.detach();
59 | }
60 |
61 | // Store the correct default display
62 | elemdisplay[ nodeName ] = display;
63 | }
64 |
65 | return display;
66 | }
67 |
68 | return defaultDisplay;
69 |
70 | });
71 |
--------------------------------------------------------------------------------
/web-client/controllers/book.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | spaApp_book.config(['$routeProvider', function($routeProvider) {
3 | $routeProvider
4 | .when('/book/index', {
5 | templateUrl: 'views/book/index.html',
6 | controller: 'index'
7 | })
8 | .when('/book/create', {
9 | templateUrl: 'views/book/create.html',
10 | controller: 'create',
11 | resolve: {
12 | book: function(services, $route){
13 | return services.getBooks();
14 | }
15 | }
16 | })
17 | .when('/book/update/:bookId', {
18 | templateUrl: 'views/book/update.html',
19 | controller: 'update',
20 | resolve: {
21 | book: function(services, $route){
22 | var bookId = $route.current.params.bookId;
23 | return services.getBook(bookId);
24 | }
25 | }
26 | })
27 | .when('/book/delete/:bookId', {
28 | templateUrl: 'views/book/index.html',
29 | controller: 'delete',
30 | })
31 | .otherwise({
32 | redirectTo: '/book/index'
33 | });
34 | }]);
35 |
36 | spaApp_book.controller('index', ['$scope', '$http', 'services',
37 | function($scope,$http,services) {
38 | $scope.message = 'Everyone come and see how good I look!';
39 | services.getBooks().then(function(data){
40 | $scope.books = data.data;
41 | });
42 | $scope.deleteBook = function(bookID) {
43 | if(confirm("Are you sure to delete book number: " + bookID)==true && bookID>0){
44 | services.deleteBook(bookID);
45 | $route.reload();
46 | }
47 | };
48 | }])
49 | .controller('create', ['$scope', '$http', 'services','$location','book',
50 | function($scope,$http,services,$location,book) {
51 | $scope.message = 'Look! I am an about page.';
52 | $scope.createBook = function(book) {
53 | var results = services.createBook(book);
54 | }
55 | }])
56 | .controller('update', ['$scope', '$http', '$routeParams', 'services','$location','book',
57 | function($scope,$http,$routeParams,services,$location,book) {
58 | $scope.message = 'Contact us! JK. This is just a demo.';
59 | var original = book.data;
60 | $scope.book = angular.copy(original);
61 | $scope.isClean = function() {
62 | return angular.equals(original, $scope.book);
63 | }
64 | $scope.updateBook = function(book) {
65 | var results = services.updateBook(book);
66 | }
67 | }]);
--------------------------------------------------------------------------------
/web-client2/controllers/book.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | spaApp_book.config(['$routeProvider', function($routeProvider) {
3 | $routeProvider
4 | .when('/book/index', {
5 | templateUrl: 'views/book/index.html',
6 | controller: 'index'
7 | })
8 | .when('/book/create', {
9 | templateUrl: 'views/book/create.html',
10 | controller: 'create',
11 | resolve: {
12 | book: function(services, $route){
13 | return services.getBooks();
14 | }
15 | }
16 | })
17 | .when('/book/update/:bookId', {
18 | templateUrl: 'views/book/update.html',
19 | controller: 'update',
20 | resolve: {
21 | book: function(services, $route){
22 | var bookId = $route.current.params.bookId;
23 | return services.getBook(bookId);
24 | }
25 | }
26 | })
27 | .when('/book/delete/:bookId', {
28 | templateUrl: 'views/book/index.html',
29 | controller: 'delete',
30 | })
31 | .otherwise({
32 | redirectTo: '/book/index'
33 | });
34 | }]);
35 |
36 | spaApp_book.controller('index', ['$scope', '$http', 'services',
37 | function($scope,$http,services) {
38 | $scope.message = 'Everyone come and see how good I look!';
39 | services.getBooks().then(function(data){
40 | $scope.books = data.data;
41 | });
42 | $scope.deleteBook = function(bookID) {
43 | if(confirm("Are you sure to delete book number: " + bookID)==true && bookID>0){
44 | services.deleteBook(bookID);
45 | $route.reload();
46 | }
47 | };
48 | }])
49 | .controller('create', ['$scope', '$http', 'services','$location','book',
50 | function($scope,$http,services,$location,book) {
51 | $scope.message = 'Look! I am an about page.';
52 | $scope.createBook = function(book) {
53 | var results = services.createBook(book);
54 | }
55 | }])
56 | .controller('update', ['$scope', '$http', '$routeParams', 'services','$location','book',
57 | function($scope,$http,$routeParams,services,$location,book) {
58 | $scope.message = 'Contact us! JK. This is just a demo.';
59 | var original = book.data;
60 | $scope.book = angular.copy(original);
61 | $scope.isClean = function() {
62 | return angular.equals(original, $scope.book);
63 | }
64 | $scope.updateBook = function(book) {
65 | var results = services.updateBook(book);
66 | }
67 | }]);
--------------------------------------------------------------------------------
/web-service/models/LoginForm.php:
--------------------------------------------------------------------------------
1 | hasErrors()) {
45 | $user = $this->getUser();
46 |
47 | if (!$user || !$user->validatePassword($this->password)) {
48 | $this->addError($attribute, 'Incorrect username or password.');
49 | }
50 | }
51 | }
52 |
53 | /**
54 | * Logs in a user using the provided username and password.
55 | * @return boolean whether the user is logged in successfully
56 | */
57 | public function login()
58 | {
59 | if ($this->validate()) {
60 | return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0);
61 | } else {
62 | return false;
63 | }
64 | }
65 |
66 | /**
67 | * Finds user by [[username]]
68 | *
69 | * @return User|null
70 | */
71 | public function getUser()
72 | {
73 | if ($this->_user === false) {
74 | $this->_user = User::findByUsername($this->username);
75 | }
76 |
77 | return $this->_user;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/web-client/assets/angular/angular-cookies.min.js.map:
--------------------------------------------------------------------------------
1 | {
2 | "version":3,
3 | "file":"angular-cookies.min.js",
4 | "lineCount":7,
5 | "mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAmBtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,QAAA,CA0BW,UA1BX,CA0BuB,CAAC,YAAD,CAAe,UAAf,CAA2B,QAAQ,CAACC,CAAD,CAAaC,CAAb,CAAuB,CAAA,IACvEC,EAAU,EAD6D,CAEvEC,EAAc,EAFyD,CAGvEC,CAHuE,CAIvEC,EAAU,CAAA,CAJ6D,CAKvEC,EAAOV,CAAAU,KALgE,CAMvEC,EAAcX,CAAAW,YAGlBN,EAAAO,UAAA,CAAmB,QAAQ,EAAG,CAC5B,IAAIC,EAAiBR,CAAAC,QAAA,EACjBE,EAAJ,EAA0BK,CAA1B,GACEL,CAGA,CAHqBK,CAGrB,CAFAH,CAAA,CAAKG,CAAL,CAAqBN,CAArB,CAEA,CADAG,CAAA,CAAKG,CAAL,CAAqBP,CAArB,CACA,CAAIG,CAAJ,EAAaL,CAAAU,OAAA,EAJf,CAF4B,CAA9B,CAAA,EAUAL,EAAA,CAAU,CAAA,CAKVL,EAAAW,OAAA,CASAC,QAAa,EAAG,CAAA,IACVC,CADU,CAEVC,CAFU,CAIVC,CAGJ,KAAKF,CAAL,GAAaV,EAAb,CACMI,CAAA,CAAYL,CAAA,CAAQW,CAAR,CAAZ,CAAJ,EACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBhB,CAAvB,CAKJ,KAAKgB,CAAL,GAAaX,EAAb,CACEY,CAKA,CALQZ,CAAA,CAAQW,CAAR,CAKR,CAJKjB,CAAAoB,SAAA,CAAiBF,CAAjB,CAIL,GAHEA,CACA,CADQ,EACR,CADaA,CACb,CAAAZ,CAAA,CAAQW,CAAR,CAAA,CAAgBC,CAElB,EAAIA,CAAJ,GAAcX,CAAA,CAAYU,CAAZ,CAAd,GACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBC,CAAvB,CACA,CAAAC,CAAA,CAAU,CAAA,CAFZ,CAOF,IAAIA,CAAJ,CAIE,IAAKF,CAAL,GAFAI,EAEaf,CAFID,CAAAC,QAAA,EAEJA,CAAAA,CAAb,CACMA,CAAA,CAAQW,CAAR,CAAJ,GAAsBI,CAAA,CAAeJ,CAAf,CAAtB,GAEMN,CAAA,CAAYU,CAAA,CAAeJ,CAAf,CAAZ,CAAJ,CACE,OAAOX,CAAA,CAAQW,CAAR,CADT,CAGEX,CAAA,CAAQW,CAAR,CAHF,CAGkBI,CAAA,CAAeJ,CAAf,CALpB,CAhCU,CAThB,CAEA,OAAOX,EA1BoE,CAA1D,CA1BvB,CAAAH,QAAA,CAoIW,cApIX;AAoI2B,CAAC,UAAD,CAAa,QAAQ,CAACmB,CAAD,CAAW,CAErD,MAAO,CAWLC,IAAKA,QAAQ,CAACC,CAAD,CAAM,CAEjB,MAAO,CADHN,CACG,CADKI,CAAA,CAASE,CAAT,CACL,EAAQxB,CAAAyB,SAAA,CAAiBP,CAAjB,CAAR,CAAkCA,CAFxB,CAXd,CA0BLQ,IAAKA,QAAQ,CAACF,CAAD,CAAMN,CAAN,CAAa,CACxBI,CAAA,CAASE,CAAT,CAAA,CAAgBxB,CAAA2B,OAAA,CAAeT,CAAf,CADQ,CA1BrB,CAuCLU,OAAQA,QAAQ,CAACJ,CAAD,CAAM,CACpB,OAAOF,CAAA,CAASE,CAAT,CADa,CAvCjB,CAF8C,CAAhC,CApI3B,CAnBsC,CAArC,CAAD,CAwMGzB,MAxMH,CAwMWA,MAAAC,QAxMX;",
6 | "sources":["angular-cookies.js"],
7 | "names":["window","angular","undefined","module","factory","$rootScope","$browser","cookies","lastCookies","lastBrowserCookies","runEval","copy","isUndefined","addPollFn","currentCookies","$apply","$watch","push","name","value","updated","isString","browserCookies","$cookies","get","key","fromJson","put","toJson","remove"]
8 | }
9 |
--------------------------------------------------------------------------------
/web-service/angular_spa.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 4.3.11
3 | -- http://www.phpmyadmin.net
4 | --
5 | -- Host: 127.0.0.1
6 | -- Generation Time: May 11, 2015 at 01:30 PM
7 | -- Server version: 5.6.24
8 | -- PHP Version: 5.6.8
9 |
10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11 | SET time_zone = "+00:00";
12 |
13 |
14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17 | /*!40101 SET NAMES utf8 */;
18 |
19 | --
20 | -- Database: `angular_spa`
21 | --
22 |
23 | -- --------------------------------------------------------
24 |
25 | --
26 | -- Table structure for table `book`
27 | --
28 |
29 | CREATE TABLE IF NOT EXISTS `book` (
30 | `id` int(11) NOT NULL,
31 | `title` varchar(255) NOT NULL,
32 | `description` text,
33 | `author` varchar(50) NOT NULL,
34 | `publisher` varchar(50) NOT NULL,
35 | `year` int(4) NOT NULL
36 | ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
37 |
38 | --
39 | -- Dumping data for table `book`
40 | --
41 |
42 | INSERT INTO `book` (`id`, `title`, `description`, `author`, `publisher`, `year`) VALUES
43 | (1, 'Head First PHP & MySQL (2nd Edition)', 'xxx', 'Lynn Beighley and Michael Morrison', 'Amazonh', 2015),
44 | (2, 'PHP and MySQL Web Development (5th Edition)', NULL, 'Luke Welling and Laura Thomson', 'Amazon', 2014),
45 | (3, 'Secure Development for Mobile Apps: How to Design and Code Secure Mobile Applications with PHP and JavaScript', NULL, 'J. D. Glaser', 'Amazon', 2014),
46 | (4, 'MySQL Cookbook: Solutions for Database Developers and Administrators', NULL, 'Paul DuBois', 'Amazon', 2014);
47 |
48 | --
49 | -- Indexes for dumped tables
50 | --
51 |
52 | --
53 | -- Indexes for table `book`
54 | --
55 | ALTER TABLE `book`
56 | ADD PRIMARY KEY (`id`);
57 |
58 | --
59 | -- AUTO_INCREMENT for dumped tables
60 | --
61 |
62 | --
63 | -- AUTO_INCREMENT for table `book`
64 | --
65 | ALTER TABLE `book`
66 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
67 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
68 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
69 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
70 |
--------------------------------------------------------------------------------
/documentation/01-introduction.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | From this guide you'll learn how to create single page application (SPA) in minutes using AngularJs and Yii Framework 2.0.
4 | The application will implement a Create Read Update Delete (CRUD) data processing. User interface of this application will
5 | be implemented using AngularJs. Data will be provided by API created using Yii Framework 2.0.
6 |
7 | ## Structure
8 |
9 | There will be two applications:
10 |
11 | - Web Client Application. The one providing UI.
12 | - Web Service Application. The one dealing with data.
13 |
14 | > Note: For easier maintenance it is recommended that you develop your RESTful APIs as a separate application which
15 | is separated from both website and admin parts of the application.
16 |
17 | ## Technology Behind the Scenes
18 |
19 | Since client and service are separated, technology stack used in each case varies.
20 |
21 | ### Web Client Application
22 |
23 | 
24 |
25 | For client application we use HTML, JS, and CSS. At least some knowledge of all three is mandatory to follow this tutorial.
26 |
27 | - AngularJs 1.3
28 | 
29 | AngularJs is a popular JavaScript framework. It does not matter if you do not know too much about it yet. It is relatively
30 | easy to undestand if you're familiar with JavaScript and Yii. If you've used jQuery before, forget about it for a while
31 | since concepts of AngularJs are different.
32 |
33 | - CSS Bootstrap 3
34 | 
35 | Initially developed by Twitter team, CSS Bootstrap is widely used frontend UI framework. It is a collection of ready
36 | to use JavaScript and CSS that allows us to design a beautiful user interface quickly.
37 |
38 | ### Web Service Application
39 |
40 | For service part we'll use PHP and MySQL. As a PHP framework we'll use Yii Framework 2.0
41 | 
42 |
43 | ---
44 |
45 | > [Back To Index](index.md)
46 | > [01. Introduction](01-introduction.md)
47 | > [02. Preparation](02-preparation.md)
48 | > [03. Create Web Service](03-create-web-service.md)
49 | > [04. Create Web Client](04-create-web-client.md)
50 | > [05. Customization](05-customization.md)
51 | > [06. Conclusion](06-conclusion.md)
52 |
--------------------------------------------------------------------------------
/web-client2/assets/jquery/src/attributes/prop.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../core/access",
4 | "./support"
5 | ], function( jQuery, access, support ) {
6 |
7 | var rfocusable = /^(?:input|select|textarea|button)$/i;
8 |
9 | jQuery.fn.extend({
10 | prop: function( name, value ) {
11 | return access( this, jQuery.prop, name, value, arguments.length > 1 );
12 | },
13 |
14 | removeProp: function( name ) {
15 | return this.each(function() {
16 | delete this[ jQuery.propFix[ name ] || name ];
17 | });
18 | }
19 | });
20 |
21 | jQuery.extend({
22 | propFix: {
23 | "for": "htmlFor",
24 | "class": "className"
25 | },
26 |
27 | prop: function( elem, name, value ) {
28 | var ret, hooks, notxml,
29 | nType = elem.nodeType;
30 |
31 | // Don't get/set properties on text, comment and attribute nodes
32 | if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
33 | return;
34 | }
35 |
36 | notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
37 |
38 | if ( notxml ) {
39 | // Fix name and attach hooks
40 | name = jQuery.propFix[ name ] || name;
41 | hooks = jQuery.propHooks[ name ];
42 | }
43 |
44 | if ( value !== undefined ) {
45 | return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
46 | ret :
47 | ( elem[ name ] = value );
48 |
49 | } else {
50 | return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
51 | ret :
52 | elem[ name ];
53 | }
54 | },
55 |
56 | propHooks: {
57 | tabIndex: {
58 | get: function( elem ) {
59 | return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
60 | elem.tabIndex :
61 | -1;
62 | }
63 | }
64 | }
65 | });
66 |
67 | if ( !support.optSelected ) {
68 | jQuery.propHooks.selected = {
69 | get: function( elem ) {
70 | var parent = elem.parentNode;
71 | if ( parent && parent.parentNode ) {
72 | parent.parentNode.selectedIndex;
73 | }
74 | return null;
75 | }
76 | };
77 | }
78 |
79 | jQuery.each([
80 | "tabIndex",
81 | "readOnly",
82 | "maxLength",
83 | "cellSpacing",
84 | "cellPadding",
85 | "rowSpan",
86 | "colSpan",
87 | "useMap",
88 | "frameBorder",
89 | "contentEditable"
90 | ], function() {
91 | jQuery.propFix[ this.toLowerCase() ] = this;
92 | });
93 |
94 | });
95 |
--------------------------------------------------------------------------------
/web-client2/assets/angular-route/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular-route
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngRoute).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular-route
15 | ```
16 |
17 | Then add `ngRoute` as a dependency for your app:
18 |
19 | ```javascript
20 | angular.module('myApp', [require('angular-route')]);
21 | ```
22 |
23 | ### bower
24 |
25 | ```shell
26 | bower install angular-route
27 | ```
28 |
29 | Add a `
33 | ```
34 |
35 | Then add `ngRoute` as a dependency for your app:
36 |
37 | ```javascript
38 | angular.module('myApp', ['ngRoute']);
39 | ```
40 |
41 | ## Documentation
42 |
43 | Documentation is available on the
44 | [AngularJS docs site](http://docs.angularjs.org/api/ngRoute).
45 |
46 | ## License
47 |
48 | The MIT License
49 |
50 | Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
51 |
52 | Permission is hereby granted, free of charge, to any person obtaining a copy
53 | of this software and associated documentation files (the "Software"), to deal
54 | in the Software without restriction, including without limitation the rights
55 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
56 | copies of the Software, and to permit persons to whom the Software is
57 | furnished to do so, subject to the following conditions:
58 |
59 | The above copyright notice and this permission notice shall be included in
60 | all copies or substantial portions of the Software.
61 |
62 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
66 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
67 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
68 | THE SOFTWARE.
69 |
--------------------------------------------------------------------------------
/web-service/config/web.php:
--------------------------------------------------------------------------------
1 | 'basic',
7 | 'basePath' => dirname(__DIR__),
8 | //'bootstrap' => ['log'],
9 | 'components' => [
10 | 'request' => [
11 | // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
12 | 'cookieValidationKey' => 'x6tjpI4ZMSaasW0-pamgdcCzrMWcFpgl',
13 | 'parsers' => [
14 | 'application/json' => 'yii\web\JsonParser',
15 | ]
16 | ],
17 | 'cache' => [
18 | 'class' => 'yii\caching\FileCache',
19 | ],
20 | 'user' => [
21 | 'identityClass' => 'app\models\User',
22 | 'enableAutoLogin' => true,
23 | ],
24 | 'errorHandler' => [
25 | 'errorAction' => 'site/error',
26 | ],
27 | 'mailer' => [
28 | 'class' => 'yii\swiftmailer\Mailer',
29 | // send all mails to a file by default. You have to set
30 | // 'useFileTransport' to false and configure a transport
31 | // for the mailer to send real emails.
32 | 'useFileTransport' => true,
33 | ],
34 | 'log' => [
35 | 'traceLevel' => YII_DEBUG ? 3 : 0,
36 | 'targets' => [
37 | [
38 | 'class' => 'yii\log\FileTarget',
39 | 'levels' => ['error', 'warning'],
40 | ],
41 | ],
42 | ],
43 | 'db' => require(__DIR__ . '/db.php'),
44 | 'urlManager' => [
45 | 'enablePrettyUrl' => true,
46 | 'enableStrictParsing' => true,
47 | 'showScriptName' => false,
48 | 'rules' => [
49 | [
50 | 'class' => 'yii\rest\UrlRule',
51 | 'controller' => ['book'],
52 | ],
53 | ],
54 | ],
55 | ],
56 | 'params' => $params,
57 | ];
58 |
59 | if (YII_ENV_DEV) {
60 | // configuration adjustments for 'dev' environment
61 | $config['bootstrap'][] = 'debug';
62 | $config['modules']['debug'] = 'yii\debug\Module';
63 |
64 | $config['bootstrap'][] = 'gii';
65 | $config['modules']['gii'] = 'yii\gii\Module';
66 | }
67 |
68 | return $config;
69 |
--------------------------------------------------------------------------------
/web-client2/assets/angular-animate/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular-animate
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngAnimate).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular-animate
15 | ```
16 |
17 | Then add `ngAnimate` as a dependency for your app:
18 |
19 | ```javascript
20 | angular.module('myApp', [require('angular-animate')]);
21 | ```
22 |
23 | ### bower
24 |
25 | ```shell
26 | bower install angular-animate
27 | ```
28 |
29 | Then add a `
33 | ```
34 |
35 | Then add `ngAnimate` as a dependency for your app:
36 |
37 | ```javascript
38 | angular.module('myApp', ['ngAnimate']);
39 | ```
40 |
41 | ## Documentation
42 |
43 | Documentation is available on the
44 | [AngularJS docs site](http://docs.angularjs.org/api/ngAnimate).
45 |
46 | ## License
47 |
48 | The MIT License
49 |
50 | Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
51 |
52 | Permission is hereby granted, free of charge, to any person obtaining a copy
53 | of this software and associated documentation files (the "Software"), to deal
54 | in the Software without restriction, including without limitation the rights
55 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
56 | copies of the Software, and to permit persons to whom the Software is
57 | furnished to do so, subject to the following conditions:
58 |
59 | The above copyright notice and this permission notice shall be included in
60 | all copies or substantial portions of the Software.
61 |
62 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
66 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
67 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
68 | THE SOFTWARE.
69 |
--------------------------------------------------------------------------------
/web-client2/assets/bootstrap/less/pagination.less:
--------------------------------------------------------------------------------
1 | //
2 | // Pagination (multiple pages)
3 | // --------------------------------------------------
4 | .pagination {
5 | display: inline-block;
6 | padding-left: 0;
7 | margin: @line-height-computed 0;
8 | border-radius: @border-radius-base;
9 |
10 | > li {
11 | display: inline; // Remove list-style and block-level defaults
12 | > a,
13 | > span {
14 | position: relative;
15 | float: left; // Collapse white-space
16 | padding: @padding-base-vertical @padding-base-horizontal;
17 | line-height: @line-height-base;
18 | text-decoration: none;
19 | color: @pagination-color;
20 | background-color: @pagination-bg;
21 | border: 1px solid @pagination-border;
22 | margin-left: -1px;
23 | }
24 | &:first-child {
25 | > a,
26 | > span {
27 | margin-left: 0;
28 | .border-left-radius(@border-radius-base);
29 | }
30 | }
31 | &:last-child {
32 | > a,
33 | > span {
34 | .border-right-radius(@border-radius-base);
35 | }
36 | }
37 | }
38 |
39 | > li > a,
40 | > li > span {
41 | &:hover,
42 | &:focus {
43 | color: @pagination-hover-color;
44 | background-color: @pagination-hover-bg;
45 | border-color: @pagination-hover-border;
46 | }
47 | }
48 |
49 | > .active > a,
50 | > .active > span {
51 | &,
52 | &:hover,
53 | &:focus {
54 | z-index: 2;
55 | color: @pagination-active-color;
56 | background-color: @pagination-active-bg;
57 | border-color: @pagination-active-border;
58 | cursor: default;
59 | }
60 | }
61 |
62 | > .disabled {
63 | > span,
64 | > span:hover,
65 | > span:focus,
66 | > a,
67 | > a:hover,
68 | > a:focus {
69 | color: @pagination-disabled-color;
70 | background-color: @pagination-disabled-bg;
71 | border-color: @pagination-disabled-border;
72 | cursor: not-allowed;
73 | }
74 | }
75 | }
76 |
77 | // Sizing
78 | // --------------------------------------------------
79 |
80 | // Large
81 | .pagination-lg {
82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
83 | }
84 |
85 | // Small
86 | .pagination-sm {
87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
88 | }
89 |
--------------------------------------------------------------------------------
/web-service/views/site/contact.php:
--------------------------------------------------------------------------------
1 | title = 'Contact';
11 | $this->params['breadcrumbs'][] = $this->title;
12 | ?>
13 |
58 |
--------------------------------------------------------------------------------
/web-client2/assets/bootstrap/less/responsive-utilities.less:
--------------------------------------------------------------------------------
1 | //
2 | // Responsive: Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // IE10 in Windows (Phone) 8
7 | //
8 | // Support for responsive views via media queries is kind of borked in IE10, for
9 | // Surface/desktop in split view and for Windows Phone 8. This particular fix
10 | // must be accompanied by a snippet of JavaScript to sniff the user agent and
11 | // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
12 | // our Getting Started page for more information on this bug.
13 | //
14 | // For more information, see the following:
15 | //
16 | // Issue: https://github.com/twbs/bootstrap/issues/10497
17 | // Docs: http://getbootstrap.com/getting-started/#browsers
18 | // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
19 |
20 | @-ms-viewport {
21 | width: device-width;
22 | }
23 |
24 |
25 | // Visibility utilities
26 | .visible-xs,
27 | .visible-sm,
28 | .visible-md,
29 | .visible-lg {
30 | .responsive-invisibility();
31 | }
32 |
33 | .visible-xs {
34 | @media (max-width: @screen-xs-max) {
35 | .responsive-visibility();
36 | }
37 | }
38 | .visible-sm {
39 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
40 | .responsive-visibility();
41 | }
42 | }
43 | .visible-md {
44 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
45 | .responsive-visibility();
46 | }
47 | }
48 | .visible-lg {
49 | @media (min-width: @screen-lg-min) {
50 | .responsive-visibility();
51 | }
52 | }
53 |
54 | .hidden-xs {
55 | @media (max-width: @screen-xs-max) {
56 | .responsive-invisibility();
57 | }
58 | }
59 | .hidden-sm {
60 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
61 | .responsive-invisibility();
62 | }
63 | }
64 | .hidden-md {
65 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
66 | .responsive-invisibility();
67 | }
68 | }
69 | .hidden-lg {
70 | @media (min-width: @screen-lg-min) {
71 | .responsive-invisibility();
72 | }
73 | }
74 |
75 |
76 | // Print utilities
77 | //
78 | // Media queries are placed on the inside to be mixin-friendly.
79 |
80 | .visible-print {
81 | .responsive-invisibility();
82 |
83 | @media print {
84 | .responsive-visibility();
85 | }
86 | }
87 |
88 | .hidden-print {
89 | @media print {
90 | .responsive-invisibility();
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/web-service/views/layouts/main.php:
--------------------------------------------------------------------------------
1 |
13 | beginPage() ?>
14 |
15 |
16 |
17 |
18 |
19 | = Html::csrfMetaTags() ?>
20 |
= Html::encode($this->title) ?>
21 | head() ?>
22 |
23 |
24 |
25 | beginBody() ?>
26 |
27 | 'My Company',
30 | 'brandUrl' => Yii::$app->homeUrl,
31 | 'options' => [
32 | 'class' => 'navbar-inverse navbar-fixed-top',
33 | ],
34 | ]);
35 | echo Nav::widget([
36 | 'options' => ['class' => 'navbar-nav navbar-right'],
37 | 'items' => [
38 | ['label' => 'Home', 'url' => ['/site/index']],
39 | ['label' => 'About', 'url' => ['/site/about']],
40 | ['label' => 'Contact', 'url' => ['/site/contact']],
41 | Yii::$app->user->isGuest ?
42 | ['label' => 'Login', 'url' => ['/site/login']] :
43 | ['label' => 'Logout (' . Yii::$app->user->identity->username . ')',
44 | 'url' => ['/site/logout'],
45 | 'linkOptions' => ['data-method' => 'post']],
46 | ],
47 | ]);
48 | NavBar::end();
49 | ?>
50 |
51 |
52 | = Breadcrumbs::widget([
53 | 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
54 | ]) ?>
55 | = $content ?>
56 |
57 |
58 |
59 |
65 |
66 | endBody() ?>
67 |
68 |
69 | endPage() ?>
70 |
--------------------------------------------------------------------------------
/web-client/assets/angular/i18n/angular-locale_ms.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | angular.module("ngLocale", [], ["$provide", function($provide) {
3 | var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
4 | $provide.value("$locale", {
5 | "DATETIME_FORMATS": {
6 | "AMPMS": [
7 | "PG",
8 | "PTG"
9 | ],
10 | "DAY": [
11 | "Ahad",
12 | "Isnin",
13 | "Selasa",
14 | "Rabu",
15 | "Khamis",
16 | "Jumaat",
17 | "Sabtu"
18 | ],
19 | "ERANAMES": [
20 | "S.M.",
21 | "TM"
22 | ],
23 | "ERAS": [
24 | "S.M.",
25 | "TM"
26 | ],
27 | "MONTH": [
28 | "Januari",
29 | "Februari",
30 | "Mac",
31 | "April",
32 | "Mei",
33 | "Jun",
34 | "Julai",
35 | "Ogos",
36 | "September",
37 | "Oktober",
38 | "November",
39 | "Disember"
40 | ],
41 | "SHORTDAY": [
42 | "Ahd",
43 | "Isn",
44 | "Sel",
45 | "Rab",
46 | "Kha",
47 | "Jum",
48 | "Sab"
49 | ],
50 | "SHORTMONTH": [
51 | "Jan",
52 | "Feb",
53 | "Mac",
54 | "Apr",
55 | "Mei",
56 | "Jun",
57 | "Jul",
58 | "Ogo",
59 | "Sep",
60 | "Okt",
61 | "Nov",
62 | "Dis"
63 | ],
64 | "fullDate": "EEEE, d MMMM y",
65 | "longDate": "d MMMM y",
66 | "medium": "d MMM y h:mm:ss a",
67 | "mediumDate": "d MMM y",
68 | "mediumTime": "h:mm:ss a",
69 | "short": "d/MM/yy h:mm a",
70 | "shortDate": "d/MM/yy",
71 | "shortTime": "h:mm a"
72 | },
73 | "NUMBER_FORMATS": {
74 | "CURRENCY_SYM": "RM",
75 | "DECIMAL_SEP": ".",
76 | "GROUP_SEP": ",",
77 | "PATTERNS": [
78 | {
79 | "gSize": 3,
80 | "lgSize": 3,
81 | "maxFrac": 3,
82 | "minFrac": 0,
83 | "minInt": 1,
84 | "negPre": "-",
85 | "negSuf": "",
86 | "posPre": "",
87 | "posSuf": ""
88 | },
89 | {
90 | "gSize": 3,
91 | "lgSize": 3,
92 | "maxFrac": 2,
93 | "minFrac": 2,
94 | "minInt": 1,
95 | "negPre": "\u00a4-",
96 | "negSuf": "",
97 | "posPre": "\u00a4",
98 | "posSuf": ""
99 | }
100 | ]
101 | },
102 | "id": "ms",
103 | "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
104 | });
105 | }]);
106 |
--------------------------------------------------------------------------------
/web-client2/assets/bootstrap/js/alert.js:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * Bootstrap: alert.js v3.1.1
3 | * http://getbootstrap.com/javascript/#alerts
4 | * ========================================================================
5 | * Copyright 2011-2014 Twitter, Inc.
6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 | * ======================================================================== */
8 |
9 |
10 | +function ($) {
11 | 'use strict';
12 |
13 | // ALERT CLASS DEFINITION
14 | // ======================
15 |
16 | var dismiss = '[data-dismiss="alert"]'
17 | var Alert = function (el) {
18 | $(el).on('click', dismiss, this.close)
19 | }
20 |
21 | Alert.prototype.close = function (e) {
22 | var $this = $(this)
23 | var selector = $this.attr('data-target')
24 |
25 | if (!selector) {
26 | selector = $this.attr('href')
27 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
28 | }
29 |
30 | var $parent = $(selector)
31 |
32 | if (e) e.preventDefault()
33 |
34 | if (!$parent.length) {
35 | $parent = $this.hasClass('alert') ? $this : $this.parent()
36 | }
37 |
38 | $parent.trigger(e = $.Event('close.bs.alert'))
39 |
40 | if (e.isDefaultPrevented()) return
41 |
42 | $parent.removeClass('in')
43 |
44 | function removeElement() {
45 | $parent.trigger('closed.bs.alert').remove()
46 | }
47 |
48 | $.support.transition && $parent.hasClass('fade') ?
49 | $parent
50 | .one($.support.transition.end, removeElement)
51 | .emulateTransitionEnd(150) :
52 | removeElement()
53 | }
54 |
55 |
56 | // ALERT PLUGIN DEFINITION
57 | // =======================
58 |
59 | var old = $.fn.alert
60 |
61 | $.fn.alert = function (option) {
62 | return this.each(function () {
63 | var $this = $(this)
64 | var data = $this.data('bs.alert')
65 |
66 | if (!data) $this.data('bs.alert', (data = new Alert(this)))
67 | if (typeof option == 'string') data[option].call($this)
68 | })
69 | }
70 |
71 | $.fn.alert.Constructor = Alert
72 |
73 |
74 | // ALERT NO CONFLICT
75 | // =================
76 |
77 | $.fn.alert.noConflict = function () {
78 | $.fn.alert = old
79 | return this
80 | }
81 |
82 |
83 | // ALERT DATA-API
84 | // ==============
85 |
86 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
87 |
88 | }(jQuery);
89 |
--------------------------------------------------------------------------------
/web-client/assets/angular/i18n/angular-locale_id.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | angular.module("ngLocale", [], ["$provide", function($provide) {
3 | var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
4 | $provide.value("$locale", {
5 | "DATETIME_FORMATS": {
6 | "AMPMS": [
7 | "AM",
8 | "PM"
9 | ],
10 | "DAY": [
11 | "Minggu",
12 | "Senin",
13 | "Selasa",
14 | "Rabu",
15 | "Kamis",
16 | "Jumat",
17 | "Sabtu"
18 | ],
19 | "ERANAMES": [
20 | "Sebelum Masehi",
21 | "M"
22 | ],
23 | "ERAS": [
24 | "SM",
25 | "M"
26 | ],
27 | "MONTH": [
28 | "Januari",
29 | "Februari",
30 | "Maret",
31 | "April",
32 | "Mei",
33 | "Juni",
34 | "Juli",
35 | "Agustus",
36 | "September",
37 | "Oktober",
38 | "November",
39 | "Desember"
40 | ],
41 | "SHORTDAY": [
42 | "Min",
43 | "Sen",
44 | "Sel",
45 | "Rab",
46 | "Kam",
47 | "Jum",
48 | "Sab"
49 | ],
50 | "SHORTMONTH": [
51 | "Jan",
52 | "Feb",
53 | "Mar",
54 | "Apr",
55 | "Mei",
56 | "Jun",
57 | "Jul",
58 | "Agt",
59 | "Sep",
60 | "Okt",
61 | "Nov",
62 | "Des"
63 | ],
64 | "fullDate": "EEEE, dd MMMM y",
65 | "longDate": "d MMMM y",
66 | "medium": "d MMM y HH.mm.ss",
67 | "mediumDate": "d MMM y",
68 | "mediumTime": "HH.mm.ss",
69 | "short": "dd/MM/yy HH.mm",
70 | "shortDate": "dd/MM/yy",
71 | "shortTime": "HH.mm"
72 | },
73 | "NUMBER_FORMATS": {
74 | "CURRENCY_SYM": "Rp",
75 | "DECIMAL_SEP": ",",
76 | "GROUP_SEP": ".",
77 | "PATTERNS": [
78 | {
79 | "gSize": 3,
80 | "lgSize": 3,
81 | "maxFrac": 3,
82 | "minFrac": 0,
83 | "minInt": 1,
84 | "negPre": "-",
85 | "negSuf": "",
86 | "posPre": "",
87 | "posSuf": ""
88 | },
89 | {
90 | "gSize": 3,
91 | "lgSize": 3,
92 | "maxFrac": 2,
93 | "minFrac": 2,
94 | "minInt": 1,
95 | "negPre": "\u00a4-",
96 | "negSuf": "",
97 | "posPre": "\u00a4",
98 | "posSuf": ""
99 | }
100 | ]
101 | },
102 | "id": "id",
103 | "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
104 | });
105 | }]);
106 |
--------------------------------------------------------------------------------
/web-client/assets/angular/i18n/angular-locale_in.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | angular.module("ngLocale", [], ["$provide", function($provide) {
3 | var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
4 | $provide.value("$locale", {
5 | "DATETIME_FORMATS": {
6 | "AMPMS": [
7 | "AM",
8 | "PM"
9 | ],
10 | "DAY": [
11 | "Minggu",
12 | "Senin",
13 | "Selasa",
14 | "Rabu",
15 | "Kamis",
16 | "Jumat",
17 | "Sabtu"
18 | ],
19 | "ERANAMES": [
20 | "Sebelum Masehi",
21 | "M"
22 | ],
23 | "ERAS": [
24 | "SM",
25 | "M"
26 | ],
27 | "MONTH": [
28 | "Januari",
29 | "Februari",
30 | "Maret",
31 | "April",
32 | "Mei",
33 | "Juni",
34 | "Juli",
35 | "Agustus",
36 | "September",
37 | "Oktober",
38 | "November",
39 | "Desember"
40 | ],
41 | "SHORTDAY": [
42 | "Min",
43 | "Sen",
44 | "Sel",
45 | "Rab",
46 | "Kam",
47 | "Jum",
48 | "Sab"
49 | ],
50 | "SHORTMONTH": [
51 | "Jan",
52 | "Feb",
53 | "Mar",
54 | "Apr",
55 | "Mei",
56 | "Jun",
57 | "Jul",
58 | "Agt",
59 | "Sep",
60 | "Okt",
61 | "Nov",
62 | "Des"
63 | ],
64 | "fullDate": "EEEE, dd MMMM y",
65 | "longDate": "d MMMM y",
66 | "medium": "d MMM y HH.mm.ss",
67 | "mediumDate": "d MMM y",
68 | "mediumTime": "HH.mm.ss",
69 | "short": "dd/MM/yy HH.mm",
70 | "shortDate": "dd/MM/yy",
71 | "shortTime": "HH.mm"
72 | },
73 | "NUMBER_FORMATS": {
74 | "CURRENCY_SYM": "Rp",
75 | "DECIMAL_SEP": ",",
76 | "GROUP_SEP": ".",
77 | "PATTERNS": [
78 | {
79 | "gSize": 3,
80 | "lgSize": 3,
81 | "maxFrac": 3,
82 | "minFrac": 0,
83 | "minInt": 1,
84 | "negPre": "-",
85 | "negSuf": "",
86 | "posPre": "",
87 | "posSuf": ""
88 | },
89 | {
90 | "gSize": 3,
91 | "lgSize": 3,
92 | "maxFrac": 2,
93 | "minFrac": 2,
94 | "minInt": 1,
95 | "negPre": "\u00a4-",
96 | "negSuf": "",
97 | "posPre": "\u00a4",
98 | "posSuf": ""
99 | }
100 | ]
101 | },
102 | "id": "in",
103 | "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
104 | });
105 | }]);
106 |
--------------------------------------------------------------------------------
/web-client/assets/angular/i18n/angular-locale_id-id.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | angular.module("ngLocale", [], ["$provide", function($provide) {
3 | var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
4 | $provide.value("$locale", {
5 | "DATETIME_FORMATS": {
6 | "AMPMS": [
7 | "AM",
8 | "PM"
9 | ],
10 | "DAY": [
11 | "Minggu",
12 | "Senin",
13 | "Selasa",
14 | "Rabu",
15 | "Kamis",
16 | "Jumat",
17 | "Sabtu"
18 | ],
19 | "ERANAMES": [
20 | "Sebelum Masehi",
21 | "M"
22 | ],
23 | "ERAS": [
24 | "SM",
25 | "M"
26 | ],
27 | "MONTH": [
28 | "Januari",
29 | "Februari",
30 | "Maret",
31 | "April",
32 | "Mei",
33 | "Juni",
34 | "Juli",
35 | "Agustus",
36 | "September",
37 | "Oktober",
38 | "November",
39 | "Desember"
40 | ],
41 | "SHORTDAY": [
42 | "Min",
43 | "Sen",
44 | "Sel",
45 | "Rab",
46 | "Kam",
47 | "Jum",
48 | "Sab"
49 | ],
50 | "SHORTMONTH": [
51 | "Jan",
52 | "Feb",
53 | "Mar",
54 | "Apr",
55 | "Mei",
56 | "Jun",
57 | "Jul",
58 | "Agt",
59 | "Sep",
60 | "Okt",
61 | "Nov",
62 | "Des"
63 | ],
64 | "fullDate": "EEEE, dd MMMM y",
65 | "longDate": "d MMMM y",
66 | "medium": "d MMM y HH.mm.ss",
67 | "mediumDate": "d MMM y",
68 | "mediumTime": "HH.mm.ss",
69 | "short": "dd/MM/yy HH.mm",
70 | "shortDate": "dd/MM/yy",
71 | "shortTime": "HH.mm"
72 | },
73 | "NUMBER_FORMATS": {
74 | "CURRENCY_SYM": "Rp",
75 | "DECIMAL_SEP": ",",
76 | "GROUP_SEP": ".",
77 | "PATTERNS": [
78 | {
79 | "gSize": 3,
80 | "lgSize": 3,
81 | "maxFrac": 3,
82 | "minFrac": 0,
83 | "minInt": 1,
84 | "negPre": "-",
85 | "negSuf": "",
86 | "posPre": "",
87 | "posSuf": ""
88 | },
89 | {
90 | "gSize": 3,
91 | "lgSize": 3,
92 | "maxFrac": 2,
93 | "minFrac": 2,
94 | "minInt": 1,
95 | "negPre": "\u00a4-",
96 | "negSuf": "",
97 | "posPre": "\u00a4",
98 | "posSuf": ""
99 | }
100 | ]
101 | },
102 | "id": "id-id",
103 | "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
104 | });
105 | }]);
106 |
--------------------------------------------------------------------------------
/web-client/assets/angular/i18n/angular-locale_ms-latn-my.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | angular.module("ngLocale", [], ["$provide", function($provide) {
3 | var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
4 | $provide.value("$locale", {
5 | "DATETIME_FORMATS": {
6 | "AMPMS": [
7 | "PG",
8 | "PTG"
9 | ],
10 | "DAY": [
11 | "Ahad",
12 | "Isnin",
13 | "Selasa",
14 | "Rabu",
15 | "Khamis",
16 | "Jumaat",
17 | "Sabtu"
18 | ],
19 | "ERANAMES": [
20 | "S.M.",
21 | "TM"
22 | ],
23 | "ERAS": [
24 | "S.M.",
25 | "TM"
26 | ],
27 | "MONTH": [
28 | "Januari",
29 | "Februari",
30 | "Mac",
31 | "April",
32 | "Mei",
33 | "Jun",
34 | "Julai",
35 | "Ogos",
36 | "September",
37 | "Oktober",
38 | "November",
39 | "Disember"
40 | ],
41 | "SHORTDAY": [
42 | "Ahd",
43 | "Isn",
44 | "Sel",
45 | "Rab",
46 | "Kha",
47 | "Jum",
48 | "Sab"
49 | ],
50 | "SHORTMONTH": [
51 | "Jan",
52 | "Feb",
53 | "Mac",
54 | "Apr",
55 | "Mei",
56 | "Jun",
57 | "Jul",
58 | "Ogo",
59 | "Sep",
60 | "Okt",
61 | "Nov",
62 | "Dis"
63 | ],
64 | "fullDate": "EEEE, d MMMM y",
65 | "longDate": "d MMMM y",
66 | "medium": "d MMM y h:mm:ss a",
67 | "mediumDate": "d MMM y",
68 | "mediumTime": "h:mm:ss a",
69 | "short": "d/MM/yy h:mm a",
70 | "shortDate": "d/MM/yy",
71 | "shortTime": "h:mm a"
72 | },
73 | "NUMBER_FORMATS": {
74 | "CURRENCY_SYM": "RM",
75 | "DECIMAL_SEP": ".",
76 | "GROUP_SEP": ",",
77 | "PATTERNS": [
78 | {
79 | "gSize": 3,
80 | "lgSize": 3,
81 | "maxFrac": 3,
82 | "minFrac": 0,
83 | "minInt": 1,
84 | "negPre": "-",
85 | "negSuf": "",
86 | "posPre": "",
87 | "posSuf": ""
88 | },
89 | {
90 | "gSize": 3,
91 | "lgSize": 3,
92 | "maxFrac": 2,
93 | "minFrac": 2,
94 | "minInt": 1,
95 | "negPre": "\u00a4-",
96 | "negSuf": "",
97 | "posPre": "\u00a4",
98 | "posSuf": ""
99 | }
100 | ]
101 | },
102 | "id": "ms-latn-my",
103 | "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
104 | });
105 | }]);
106 |
--------------------------------------------------------------------------------