From ef3ece5ce2bcb69f42241eedaafed30fe77e61b8 Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Thu, 27 Feb 2020 14:35:22 +0900 Subject: [PATCH 01/12] feat: read play counts via ajax --- Controller/VideosController.php | 33 ++++++++++++- Model/Video.php | 4 ++ View/Elements/Videos/list.ctp | 6 ++- View/Videos/index.ctp | 33 +++++++++---- View/Videos/view.ctp | 17 ++++++- webroot/js/videos.js | 84 +++++++++++++++++++++++++-------- 6 files changed, 143 insertions(+), 34 deletions(-) diff --git a/Controller/VideosController.php b/Controller/VideosController.php index c2f2a40..4a40bef 100644 --- a/Controller/VideosController.php +++ b/Controller/VideosController.php @@ -4,6 +4,7 @@ * * @author Noriko Arai * @author Mitsuru Mutaguchi + * @author Kazunori Sakamoto * @link http://www.netcommons.org NetCommons Project * @license http://www.netcommons.org/license.txt NetCommons License * @copyright Copyright 2014, NetCommons Project @@ -17,6 +18,7 @@ * Videos Controller * * @author Mitsuru Mutaguchi + * @author Kazunori Sakamoto * @package NetCommons\Videos\Controller */ class VideosController extends VideosAppController { @@ -119,7 +121,7 @@ public function beforeFilter() { } // ゲストアクセスOKのアクションを設定 - $this->Auth->allow('tag', 'embed'); + $this->Auth->allow('tag', 'embed', 'get_play_counts'); // FFMPEG有効フラグ /* @see VideoBehavior::isFfmpegEnable() */ @@ -333,6 +335,33 @@ public function download() { return $zip->download($zipFileName); } +/** + * ファイルのダウンロード数の取得 + * + * @return void + */ +public function get_play_counts() { + $query = [ + 'fields' => [ + 'Video.id', + 'Video.play_number', + ], + 'conditions' => [ + 'Video.id' => explode(',', $this->request->query('video_ids')), + ] + ]; + $videos = $this->Video->find('all', $query); + + if ($this->request->query('increment')) { + foreach ($videos as &$video) { + $video['Video']['play_number'] = $this->Video->countUp($video); + } + } + + $this->set('_serialize', ['counts']); + $this->set('counts', $videos); +} + /** * _setFlashMessageAndRedirect * @@ -352,7 +381,7 @@ protected function _setFlashMessageAndRedirect($contentKey, $message) { 'key' => $contentKey ), true); // 暫定対応:どうゆう訳だか、ここだと?frame_idが上記でセットされないので直書き - $url .= '?frame_id=' . Current::read('Frame.id'); + $url .= '?frame_id=' . Current::read('Frame.id') . '&no-cache=1'; $this->redirect($url); } diff --git a/Model/Video.php b/Model/Video.php index c10b352..f2071a8 100644 --- a/Model/Video.php +++ b/Model/Video.php @@ -4,6 +4,7 @@ * * @author Noriko Arai * @author Mitsuru Mutaguchi + * @author Kazunori Sakamoto * @link http://www.netcommons.org NetCommons Project * @license http://www.netcommons.org/license.txt NetCommons License * @copyright Copyright 2014, NetCommons Project @@ -16,6 +17,7 @@ * Video Model * * @author Mitsuru Mutaguchi + * @author Kazunori Sakamoto * @package NetCommons\Videos\Model */ class Video extends VideosAppModel { @@ -266,7 +268,9 @@ public function countUp($data) { } //トランザクションCommit + $this->invalidateCDN = false; $this->commit(); + $this->invalidateCDN = true; } catch (Exception $ex) { //トランザクションRollback diff --git a/View/Elements/Videos/list.ctp b/View/Elements/Videos/list.ctp index d3f151d..07cc75a 100644 --- a/View/Elements/Videos/list.ctp +++ b/View/Elements/Videos/list.ctp @@ -7,6 +7,7 @@ * - $isFfmpegEnable: Ffmpegを使うか * * @author Mitsuru Mutaguchi + * @author Kazunori Sakamoto * @link http://www.netcommons.org NetCommons Project * @license http://www.netcommons.org/license.txt NetCommons License * @copyright Copyright 2014, NetCommons Project @@ -78,7 +79,10 @@ if (!isset($style)) { - + + + + diff --git a/View/Videos/index.ctp b/View/Videos/index.ctp index afeaf9a..7705d58 100644 --- a/View/Videos/index.ctp +++ b/View/Videos/index.ctp @@ -4,6 +4,7 @@ * * @author Noriko Arai * @author Mitsuru Mutaguchi + * @author Kazunori Sakamoto * @link http://www.netcommons.org NetCommons Project * @license http://www.netcommons.org/license.txt NetCommons License * @copyright Copyright 2014, NetCommons Project @@ -113,15 +114,29 @@ echo $this->NetCommonsHtml->script('/videos/js/videos.js');
- -
- element('Videos.Videos/list', array( - 'video' => $video, - 'videoSetting' => $videoSetting, - 'isFfmpegEnable' => $isFfmpegEnable, - )); ?> -
- + response->header()['Pragma'] === 'no-cache' || + strncmp('origin-', $_SERVER['SERVER_NAME'], 7) !== 0; + $videoIds = array(); + if (! $nonCacheable) { + foreach ($videos as $video) { + $videoIds[] = $video['Video']['id']; + } + } + ?> +
+ +
+ element('Videos.Videos/list', array( + 'video' => $video, + 'videoSetting' => $videoSetting, + 'isFfmpegEnable' => $isFfmpegEnable, + 'nonCacheable' => $nonCacheable, + )); ?> +
+ +
element('NetCommons.paginator'); ?> diff --git a/View/Videos/view.ctp b/View/Videos/view.ctp index ed30efc..c0297d5 100644 --- a/View/Videos/view.ctp +++ b/View/Videos/view.ctp @@ -4,6 +4,7 @@ * * @author Noriko Arai * @author Mitsuru Mutaguchi + * @author Kazunori Sakamoto * @link http://www.netcommons.org NetCommons Project * @license http://www.netcommons.org/license.txt NetCommons License * @copyright Copyright 2014, NetCommons Project @@ -59,7 +60,16 @@ echo $this->NetCommonsHtml->script(array( )); ?> -
+response->header()['Pragma'] === 'no-cache' || + strncmp('origin-', $_SERVER['SERVER_NAME'], 7) !== 0; + $videoIds = array(); + if (! $nonCacheable) { + $videoIds[] = $video['Video']['id']; + } +?> +
@@ -117,7 +127,10 @@ echo $this->NetCommonsHtml->script(array( - + + + + diff --git a/webroot/js/videos.js b/webroot/js/videos.js index c1fd722..b7108d5 100644 --- a/webroot/js/videos.js +++ b/webroot/js/videos.js @@ -1,30 +1,74 @@ /** * @fileoverview Videos Javascript * @author mutaguchi@opensource-workshop.jp (Mitsuru Mutaguchi) + * @author exkazuu@willbooster.com (Kazunori Sakamoto) */ -/** - * 動画詳細 Javascript - * - * @param {string} Controller name - * @param {function($scope)} Controller - */ -NetCommonsApp.controller('VideoView', - ['$scope', function($scope) { +(function() { + /** + * 動画一覧 Javascript + * + * @param {string} Controller name + * @param {function($scope)} Controller + */ + NetCommonsApp.controller('Video.index', + ['$scope', '$http', 'NC3_URL', + function($scope, $http, NC3_URL) { + $scope.init = function(frameId, videoIds) { + showPlayCounts($http, NC3_URL, frameId, videoIds, false); + }; + }] + ); - /** - * 埋め込みコード - * - * @return {void} - */ - $scope.embed = function() { - // jquery 表示・非表示 - $('div.video-embed').toggle('normal'); - // 表示後埋め込みコード選択 - $('input.video-embed-text').select(); - }; - }]); + + /** + * 動画詳細 Javascript + * + * @param {string} Controller name + * @param {function($scope)} Controller + */ + NetCommonsApp.controller('VideoView', + ['$scope', '$http', 'NC3_URL', + function($scope, $http, NC3_URL) { + $scope.init = function(frameId, videoIds) { + showPlayCounts($http, NC3_URL, frameId, videoIds, true); + }; + + /** + * 埋め込みコード + * + * @return {void} + */ + $scope.embed = function() { + // jquery 表示・非表示 + $('div.video-embed').toggle('normal'); + // 表示後埋め込みコード選択 + $('input.video-embed-text').select(); + }; + }]); + + function showPlayCounts($http, NC3_URL, frameId, videoIds, increment) { + if (!videoIds || !videoIds.length) return; + + var queryPrefix = '#' + frameId + '-'; + var params = '?frame_id=' + frameId + '&video_ids=' + videoIds.join(','); + if (increment) { + params += '&increment=1'; + } + $http.get(NC3_URL + '/videos/videos/get_play_counts.json' + params) + .then( + function(response) { + var counts = response.data.counts; + for (var i = 0; i < counts.length; i++) { + var $count = $(queryPrefix + counts[i].Video.id + '-count'); + $count.text(counts[i].Video.play_number); + } + }, + function() { + }); + } +})(); /** From 2e004450a2992b003dfdacfab521561e33aad269 Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Thu, 27 Feb 2020 15:37:06 +0900 Subject: [PATCH 02/12] refactor: use CDNCacheHelper --- View/Elements/Videos/list.ctp | 2 +- View/Videos/index.ctp | 5 +---- View/Videos/view.ctp | 6 ++---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/View/Elements/Videos/list.ctp b/View/Elements/Videos/list.ctp index 07cc75a..6c0c07f 100644 --- a/View/Elements/Videos/list.ctp +++ b/View/Elements/Videos/list.ctp @@ -81,7 +81,7 @@ if (!isset($style)) { - + CDNCache->isCacheable() ? '-' : $video['Video']['play_number']; ?> diff --git a/View/Videos/index.ctp b/View/Videos/index.ctp index 7705d58..b29f862 100644 --- a/View/Videos/index.ctp +++ b/View/Videos/index.ctp @@ -115,10 +115,8 @@ echo $this->NetCommonsHtml->script('/videos/js/videos.js'); response->header()['Pragma'] === 'no-cache' || - strncmp('origin-', $_SERVER['SERVER_NAME'], 7) !== 0; $videoIds = array(); - if (! $nonCacheable) { + if ($this->CDNCache->isCacheable()) { foreach ($videos as $video) { $videoIds[] = $video['Video']['id']; } @@ -132,7 +130,6 @@ echo $this->NetCommonsHtml->script('/videos/js/videos.js'); 'video' => $video, 'videoSetting' => $videoSetting, 'isFfmpegEnable' => $isFfmpegEnable, - 'nonCacheable' => $nonCacheable, )); ?> diff --git a/View/Videos/view.ctp b/View/Videos/view.ctp index c0297d5..efc5eea 100644 --- a/View/Videos/view.ctp +++ b/View/Videos/view.ctp @@ -61,10 +61,8 @@ echo $this->NetCommonsHtml->script(array(
response->header()['Pragma'] === 'no-cache' || - strncmp('origin-', $_SERVER['SERVER_NAME'], 7) !== 0; $videoIds = array(); - if (! $nonCacheable) { + if ($this->CDNCache->isCacheable()) { $videoIds[] = $video['Video']['id']; } ?> @@ -129,7 +127,7 @@ echo $this->NetCommonsHtml->script(array( - + CDNCache->isCacheable() ? '-' : $video['Video']['play_number']; ?> From de652aab78a7919b7fc77ec4ecb108552fb084df Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Sat, 29 Feb 2020 19:00:24 +0900 Subject: [PATCH 03/12] refactor: don't use jQuery --- .editorconfig | 24 ++++++++++++++++++++++++ View/Elements/Videos/list.ctp | 4 +--- View/Videos/index.ctp | 13 +++++++------ View/Videos/view.ctp | 15 +++++++-------- webroot/js/videos.js | 17 +++++++++++------ 5 files changed, 50 insertions(+), 23 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..feba922 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,24 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +root = true + +[*] +indent_style = tab +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{js,yml}] +indent_size = 2 +indent_style = space + +[*.json] +indent_size = 4 +indent_style = space + +[*.{css,ctp,php}] +indent_style = tab + +[*.bat] +end_of_line = crlf diff --git a/View/Elements/Videos/list.ctp b/View/Elements/Videos/list.ctp index 6c0c07f..749f1e4 100644 --- a/View/Elements/Videos/list.ctp +++ b/View/Elements/Videos/list.ctp @@ -80,9 +80,7 @@ if (!isset($style)) { - - CDNCache->isCacheable() ? '-' : $video['Video']['play_number']; ?> - + {{playCounts[]}} diff --git a/View/Videos/index.ctp b/View/Videos/index.ctp index b29f862..20df3e5 100644 --- a/View/Videos/index.ctp +++ b/View/Videos/index.ctp @@ -115,15 +115,16 @@ echo $this->NetCommonsHtml->script('/videos/js/videos.js'); CDNCache->isCacheable()) { - foreach ($videos as $video) { - $videoIds[] = $video['Video']['id']; - } + $initialValues = array(); + $cacheable = $this->CDNCache->isCacheable(); + foreach ($videos as $video) { + $value = $cacheable ? null : $video['Video']['play_number']; + $initialValues[$video['Video']['id']] = $value; } ?>
+ ng-init="init()">
element('Videos.Videos/list', array( diff --git a/View/Videos/view.ctp b/View/Videos/view.ctp index efc5eea..2ef4918 100644 --- a/View/Videos/view.ctp +++ b/View/Videos/view.ctp @@ -61,13 +61,14 @@ echo $this->NetCommonsHtml->script(array(
CDNCache->isCacheable()) { - $videoIds[] = $video['Video']['id']; - } + $initialValues = array(); + $cacheable = $this->CDNCache->isCacheable(); + $value = $cacheable ? null : $video['Video']['play_number']; + $initialValues[$video['Video']['id']] = $value; ?>
+ ng-init="init()">
@@ -126,9 +127,7 @@ echo $this->NetCommonsHtml->script(array( - - CDNCache->isCacheable() ? '-' : $video['Video']['play_number']; ?> - + {{playCounts[]}} diff --git a/webroot/js/videos.js b/webroot/js/videos.js index b7108d5..510fc3d 100644 --- a/webroot/js/videos.js +++ b/webroot/js/videos.js @@ -31,8 +31,8 @@ NetCommonsApp.controller('VideoView', ['$scope', '$http', 'NC3_URL', function($scope, $http, NC3_URL) { - $scope.init = function(frameId, videoIds) { - showPlayCounts($http, NC3_URL, frameId, videoIds, true); + $scope.init = function(frameId, initialValues) { + showPlayCounts($http, NC3_URL, frameId, initialValues, true); }; /** @@ -48,10 +48,16 @@ }; }]); - function showPlayCounts($http, NC3_URL, frameId, videoIds, increment) { + function showPlayCounts($http, NC3_URL, frameId, initialValues, increment) { + var videoIds = initialValues && Object.keys(initialValues); if (!videoIds || !videoIds.length) return; - var queryPrefix = '#' + frameId + '-'; + $scope.playCounts = initialValues; + if (initialValues[videoIds[0]] !== null) return; + for (var i = 0; i < videoIds.length; i++) { + initialValues[videoIds[i]] = '-'; + } + var params = '?frame_id=' + frameId + '&video_ids=' + videoIds.join(','); if (increment) { params += '&increment=1'; @@ -61,8 +67,7 @@ function(response) { var counts = response.data.counts; for (var i = 0; i < counts.length; i++) { - var $count = $(queryPrefix + counts[i].Video.id + '-count'); - $count.text(counts[i].Video.play_number); + $scope.playCounts[counts[i].Video.id] = counts[i].Video.play_number; } }, function() { From 206b017ac185dc8ec09f30cbab64e1edb3eaa507 Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Sun, 1 Mar 2020 10:12:11 +0900 Subject: [PATCH 04/12] fix: remove .editorconfig --- .editorconfig | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index feba922..0000000 --- a/.editorconfig +++ /dev/null @@ -1,24 +0,0 @@ -; This file is for unifying the coding style for different editors and IDEs. -; More information at http://editorconfig.org - -root = true - -[*] -indent_style = tab -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.{js,yml}] -indent_size = 2 -indent_style = space - -[*.json] -indent_size = 4 -indent_style = space - -[*.{css,ctp,php}] -indent_style = tab - -[*.bat] -end_of_line = crlf From b9ceb880a00e10b45e65cde174e55e5640b36476 Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Sun, 1 Mar 2020 11:05:08 +0900 Subject: [PATCH 05/12] fix: syntax error --- View/Videos/index.ctp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/View/Videos/index.ctp b/View/Videos/index.ctp index 20df3e5..a1ec6a8 100644 --- a/View/Videos/index.ctp +++ b/View/Videos/index.ctp @@ -123,7 +123,7 @@ echo $this->NetCommonsHtml->script('/videos/js/videos.js'); } ?>
)">
From 0d6f480475c588a2447b14383a63d0fcb414977c Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Sun, 1 Mar 2020 11:12:45 +0900 Subject: [PATCH 06/12] fix: add ng-cloak --- View/Elements/Videos/list.ctp | 2 +- View/Videos/view.ctp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/View/Elements/Videos/list.ctp b/View/Elements/Videos/list.ctp index 749f1e4..bd5a98a 100644 --- a/View/Elements/Videos/list.ctp +++ b/View/Elements/Videos/list.ctp @@ -78,7 +78,7 @@ if (!isset($style)) {
- + {{playCounts[]}} diff --git a/View/Videos/view.ctp b/View/Videos/view.ctp index 2ef4918..93c6a3d 100644 --- a/View/Videos/view.ctp +++ b/View/Videos/view.ctp @@ -125,7 +125,7 @@ echo $this->NetCommonsHtml->script(array( - + {{playCounts[]}} From 4e5a2afa5a3c1bca79d1d350086b447eb216f168 Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Sun, 1 Mar 2020 12:38:25 +0900 Subject: [PATCH 07/12] fix: show play counts correctly --- Controller/VideosController.php | 3 ++- View/Videos/view.ctp | 39 +++++++++++++++++++++------------ webroot/js/videos.js | 10 ++++----- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/Controller/VideosController.php b/Controller/VideosController.php index 4a40bef..561f802 100644 --- a/Controller/VideosController.php +++ b/Controller/VideosController.php @@ -348,7 +348,8 @@ public function get_play_counts() { ], 'conditions' => [ 'Video.id' => explode(',', $this->request->query('video_ids')), - ] + ], + 'recursive' => -1 ]; $videos = $this->Video->find('all', $query); diff --git a/View/Videos/view.ctp b/View/Videos/view.ctp index 93c6a3d..c063b72 100644 --- a/View/Videos/view.ctp +++ b/View/Videos/view.ctp @@ -67,8 +67,8 @@ echo $this->NetCommonsHtml->script(array( $initialValues[$video['Video']['id']] = $value; ?>
+ ng-init="init()">
@@ -162,19 +162,30 @@ echo $this->NetCommonsHtml->script(array(
From 9f0090a70d1d1ee84a2b352360b60528630791be Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 7 Aug 2020 21:44:07 +0900 Subject: [PATCH 11/12] =?UTF-8?q?change:=20test:=20Travis=E3=81=8B?= =?UTF-8?q?=E3=82=89PHP5.6=E3=82=92=E5=89=8A=E9=99=A4,php72=E4=BB=A5?= =?UTF-8?q?=E9=99=8D=E3=81=A7UnitTest=E3=81=A7Warning=E3=81=8C=E5=87=BA?= =?UTF-8?q?=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.?= =?UTF-8?q?com/NetCommons3/NetCommons3/issues/1588?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bd8bd72..d8cd8c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ dist: trusty env: matrix: - - NETCOMMONS_VERSION=master DB=mysql + - NETCOMMONS_VERSION=availability DB=mysql global: - secure: "ETR0GRqjEv6OAGGpr0eNQ2mCdPFLVV4ppmU6cDbGdHyfr1a/SVA2Do75gDx/qwjf9FAXb0qNPypCU7CIJ6L+U2yVpn65qbAZ5fgKLk2xA8xjkfrn2W5Fcif7kxusvqJyYXmq1mhIBkZdNQjwfJPsSO5zZjGUeqv/cBUz5lvfa/I=" - GIT_COMMITTER_NAME=akagane99 From ff2ce29b21e7c79c5e522d10581c918f0614d236 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 8 Aug 2020 14:49:32 +0900 Subject: [PATCH 12/12] =?UTF-8?q?change:=20test:=20phpcs,=20gjslint?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20https://github.com/NetCommons3/NetCommons3?= =?UTF-8?q?/issues/1588?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/VideosController.php | 48 +++++++++++++++--------------- View/Videos/index.ctp | 4 +-- View/Videos/view.ctp | 8 ++--- webroot/js/videos.js | 52 ++++++++++++++++----------------- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Controller/VideosController.php b/Controller/VideosController.php index 1c6b473..084c316 100644 --- a/Controller/VideosController.php +++ b/Controller/VideosController.php @@ -340,32 +340,32 @@ public function download() { * * @return void */ -public function get_play_counts() { - $query = [ - 'fields' => [ - 'Video.id', - 'Video.play_number', - ], - 'conditions' => [ - 'Video.id' => explode(',', $this->request->query('video_ids')), - ], - 'recursive' => -1, - ]; - $orgRecursive = $this->Video->recursive; - $this->Video->recursive = -1; - $videos = $this->Video->find('all', $query); - $this->Video->recursive = $orgRecursive; - - if ($this->request->query('increment')) { - foreach ($videos as &$video) { - $video['Video']['play_number'] = $this->Video->countUp($video); + public function get_play_counts() { + $query = [ + 'fields' => [ + 'Video.id', + 'Video.play_number', + ], + 'conditions' => [ + 'Video.id' => explode(',', $this->request->query('video_ids')), + ], + 'recursive' => -1, + ]; + $orgRecursive = $this->Video->recursive; + $this->Video->recursive = -1; + $videos = $this->Video->find('all', $query); + $this->Video->recursive = $orgRecursive; + + if ($this->request->query('increment')) { + foreach ($videos as &$video) { + $video['Video']['play_number'] = $this->Video->countUp($video); + } + unset($video); } - unset($video); - } - $this->set('_serialize', ['counts']); - $this->set('counts', $videos); -} + $this->set('_serialize', ['counts']); + $this->set('counts', $videos); + } /** * _setFlashMessageAndRedirect diff --git a/View/Videos/index.ctp b/View/Videos/index.ctp index a1ec6a8..077ab39 100644 --- a/View/Videos/index.ctp +++ b/View/Videos/index.ctp @@ -123,8 +123,8 @@ echo $this->NetCommonsHtml->script('/videos/js/videos.js'); } ?>
+ ng-init="init()">
element('Videos.Videos/list', array( diff --git a/View/Videos/view.ctp b/View/Videos/view.ctp index c063b72..e8c488a 100644 --- a/View/Videos/view.ctp +++ b/View/Videos/view.ctp @@ -67,8 +67,8 @@ echo $this->NetCommonsHtml->script(array( $initialValues[$video['Video']['id']] = $value; ?>
+ ng-init="init()">
@@ -171,8 +171,8 @@ echo $this->NetCommonsHtml->script(array( ?>
+ ng-init="init()">