# HG changeset patch # User rougeronj # Date 1427295465 -3600 # Node ID 4b3bebe4355d02175b28b0295a9b9cd498d2e236 # Parent b714bcbe915c545d509cb1ba81f2e98373f94749 add sanitize function to accept url from the request response - enable edit on dbclick - improve html diff -r b714bcbe915c -r 4b3bebe4355d client/app/app.js --- a/client/app/app.js Wed Mar 25 15:55:38 2015 +0100 +++ b/client/app/app.js Wed Mar 25 15:57:45 2015 +0100 @@ -20,11 +20,7 @@ controller: 'slidesCtrl', templateUrl: 'slides/slides.html' }). - when('/slide/edit/:idSlide', { - controller: 'slideEditCtrl', - templateUrl: 'slides/slides.html' - }). - when('/slideshow', { + when('/slideshow/', { controller: 'slideshowCtrl', templateUrl: 'slideshow/slideshow.html' }). @@ -49,8 +45,8 @@ templateUrl: 'search/search.html' }). when('/login', { - controller: 'loginCtrl', - templateUrl: 'login/login.html' + controller: 'authCtrl', + templateUrl: 'auth/auth.html' }). otherwise({ redirectTo: '/' @@ -65,7 +61,7 @@ .config(function($logProvider){ $logProvider.debugEnabled(true); }) - .service('searchApi', function($resource, context) { + .service('searchApi', function($resource, context, $sce) { this.searchResource = function(params){ return $resource(context.urls.searchUrl, { @@ -101,6 +97,15 @@ this.booksSlides = $resource(context.urls.ammicoUrl+'/books/:idBook/slides/', {idBook:'@idBook'}); this.listSlides= $resource(context.urls.ammicoUrl+'/slides/'); this.slide = $resource(context.urls.ammicoUrl+'/slides/:idSlide/', {idSlide:'@idSlide'}); + this.sanitizeUrls = function(data){ + console.log('heyr there !'); + console.log(data); + data.details.audio = $sce.trustAsResourceUrl(data.details.audio); + data.details.video = $sce.trustAsResourceUrl(data.details.video); + data.audio = $sce.trustAsResourceUrl(data.audio); + data.video = $sce.trustAsResourceUrl(data.video); + return data; + }; }); })(); diff -r b714bcbe915c -r 4b3bebe4355d client/app/slides/dataEditor.html --- a/client/app/slides/dataEditor.html Wed Mar 25 15:55:38 2015 +0100 +++ b/client/app/slides/dataEditor.html Wed Mar 25 15:57:45 2015 +0100 @@ -1,14 +1,17 @@ -
{{slide.user_description}}
-{{slide.tags.join(', ')}}
- -{{slide.description}}
+{{slide.comments}}
+{{slide.tags.join(', ')}}
+ +