# HG changeset patch # User ymh # Date 1402442819 -7200 # Node ID cef349423167f3d8332085fa4d0cf82a7a41fa5f add basic file org + client prototype diff -r 000000000000 -r cef349423167 .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,6 @@ +syntax: regexp +.DS_Store +Thumbs.db +^client/node_modules/ +^client/bower_components/ +^client/build/ diff -r 000000000000 -r cef349423167 client/.bowerrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/.bowerrc Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,3 @@ +{ + "directory": "bower_components" +} diff -r 000000000000 -r cef349423167 client/.editorconfig --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/.editorconfig Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,13 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff -r 000000000000 -r cef349423167 client/.jscsrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/.jscsrc Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,25 @@ +{ + "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "try", "catch"], + "requireParenthesesAroundIIFE": true, + "requireSpacesInFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "disallowSpacesInsideArrayBrackets": true, + "disallowSpacesInsideParentheses": true, + "requireSpacesInsideObjectBrackets": "all", + "disallowQuotedKeysInObjects": true, + "disallowSpaceAfterObjectKeys": true, + "requireCommaBeforeLineBreak": true, + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "requireCamelCaseOrUpperCaseIdentifiers": true, + "disallowKeywords": ["with"], + "disallowMultipleLineBreaks": true, + "validateQuoteMarks": "'", + "validateIndentation": 2, + "disallowKeywordsOnNewLine": ["else", "catch"], + "requireLineFeedAtFileEnd": true +} diff -r 000000000000 -r cef349423167 client/.jshintrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/.jshintrc Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,24 @@ +{ + "browser": true, + "node": true, + "esnext": true, + "bitwise": true, + "camelcase": true, + "eqeqeq": true, + "immed": true, + "indent": 4, + "latedef": true, + "newcap": true, + "noarg": true, + "quotmark": "single", + "regexp": true, + "undef": true, + "unused": true, + "globalstrict": true, + "strict": true, + "trailing": true, + "smarttabs": true, + "indent": 2, + "predef": ["angular"], + "devel": true +} diff -r 000000000000 -r cef349423167 client/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/README.md Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,14 @@ +Ammico client webapp +==================== + +Dev: +--- + +- `npm install` +- `node_modules/.bin/gulp` +- `node_modules/.bin/bower install -D ` + +TODO: +----- + +- unit tests diff -r 000000000000 -r cef349423167 client/app/app.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/app.css Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,18 @@ +#logo { + padding-top: 0; +} + +.navbar-inverse { + background-color: #222222; + border-color: #080808; +} + +.ammico-content { + min-height: 500px; +} + +/* +.ng-scope{ + border: red 1px solid; +} +*/ diff -r 000000000000 -r cef349423167 client/app/app.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/app.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,33 @@ +(function(){ + 'use strict'; + + angular.module('ammico', [ 'ngRoute','ammicoHome', 'ammicoGallery', 'ammicoSlideshow', 'templates' ]) + .config(function($routeProvider) { + $routeProvider. + when('/', { + controller: 'homeCtrl', + templateUrl: 'home/home.html' + }). + when('/gallery', { + controller: 'galleryCtrl', + templateUrl: 'gallery/gallery.html' + }). + when('/slideshow', { + controller: 'slideshowCtrl', + templateUrl: 'slideshow/slideshow.html' + }). + otherwise({ + redirectTo: '/gallery' + }); + }) + // .config(function ($routeProvider) { + // $routeProvider + // .otherwise({ + // redirectTo: '/' + // }); + // }); + .config(function($logProvider){ + $logProvider.debugEnabled(true); + }); + +})(); diff -r 000000000000 -r cef349423167 client/app/app_controller.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/app_controller.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,11 @@ +(function(){ + 'use strict'; + + angular.module('ammico') + .controller('routeClassCtrl', function($scope, $location) { + $scope.isActive = function(route) { + return route === $location.path(); + }; + }); + +})(); diff -r 000000000000 -r cef349423167 client/app/app_controller_test.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/app_controller_test.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,7 @@ +'use strict'; + +describe("app_controller_test", function(){ + it("should assert something",function(){ + expect(true).toBe(true); + }) +}) \ No newline at end of file diff -r 000000000000 -r cef349423167 client/app/components/app_service.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/components/app_service.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,1 @@ +'common service goes here'; \ No newline at end of file diff -r 000000000000 -r cef349423167 client/app/components/app_service_test.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/components/app_service_test.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,7 @@ +'use strict'; + +describe("app_service_test", function(){ + it("should assert something",function(){ + expect(true).toBe(true); + }) +}) \ No newline at end of file diff -r 000000000000 -r cef349423167 client/app/gallery/gallery.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/gallery/gallery.css Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,34 @@ +.gallery .item { + overflow:hidden; position:relative; height: 250px; padding: 5px; +} + +.img-ctn { + height: 100%; width: 100%; border: 1px solid #DDD; padding: 5px; overflow: hidden; +} + +.img-ctn:hover { + background-color: #DDD; +} + +.img-ctn p { + display: none; + position: absolute; + bottom: -5px; + background-color: #DDD; + width: 100%; +} + +.img-ctn:hover p { + display: block; +} + +.gallery .item img { + margin: 0 auto; +} + +.subtitle { + border-top: 1px solid #000; + border-bottom: 1px dotted #000; + margin-top: 20px; + padding: 6px 0 10px; +} diff -r 000000000000 -r cef349423167 client/app/gallery/gallery.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/gallery/gallery.html Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,11 @@ +

{{ gallery.title }}

+

{{ gallery.description }}

+

{{ gallery.images.length }} points d'intérêt

+ diff -r 000000000000 -r cef349423167 client/app/gallery/gallery_controller.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/gallery/gallery_controller.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,37 @@ +(function(){ + 'use strict'; + + angular.module('ammicoGallery',['ngResource', 'ngRoute']) + .config(function ($routeProvider) { + $routeProvider + .when('/', { + templateUrl: 'gallery/gallery.html', + controller: 'galleryCtrl' + }); + }) + .service('galleryApi', function($resource, context) { + this.gallery = $resource(context.urls.galleryUrl, + { + get: { + method: 'GET', + isArray: false + } + }); + }) + .service('galleryModel', function(galleryApi, context) { + console.log('4', context.gallery); + if(typeof context.gallery === 'undefined') { + console.log('4-1'); + this.gallery = galleryApi.gallery.get(); + } + else { + console.log('4-2'); + this.gallery = new galleryApi.gallery(context.gallery); + } + }) + .controller('galleryCtrl', function($scope, $location, galleryModel){ + console.log('5',$scope, $location, galleryModel); + $scope.gallery = galleryModel.gallery; + }); + +})(); diff -r 000000000000 -r cef349423167 client/app/gallery/gallery_controller_test.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/gallery/gallery_controller_test.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,7 @@ +'use strict'; + +describe("gallery_controller_test", function(){ + it("should assert something",function(){ + expect(true).toBe(true); + }) +}) diff -r 000000000000 -r cef349423167 client/app/home/home.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/home/home.html Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,7 @@ +

Ammico Application

+

Liste des pages :

+ diff -r 000000000000 -r cef349423167 client/app/home/home_controller.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/home/home_controller.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,17 @@ +(function(){ + 'use strict'; + + + angular.module('ammicoHome',['ngRoute']) + .config(function ($routeProvider) { + $routeProvider + .when('/', { + templateUrl: 'home/home.html', + controller: 'homeCtrl' + }); + }) + .controller('homeCtrl', function($scope, $location){ + console.log('5-0',$scope, $location); + }); + +})(); diff -r 000000000000 -r cef349423167 client/app/home/home_controller_test.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/home/home_controller_test.js Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,7 @@ +'use strict'; + +describe("home_controller_test", function(){ + it("should assert something",function(){ + expect(true).toBe(true); + }) +}) diff -r 000000000000 -r cef349423167 client/app/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/index.html Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,61 @@ + + + + + Ammico : Home + + + + + +
+
+
+
+
+
+ +
+ ammico vBeta - ©2014 +
+
+
+
+ + + + + + diff -r 000000000000 -r cef349423167 client/app/slideshow/dataEditor.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/slideshow/dataEditor.html Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,14 @@ +
+
+

{{slide.user_title}}

+

{{slide.user_description}}

+

{{slide.tags.join(', ')}}

+

+
+
+ + + +

+
+
\ No newline at end of file diff -r 000000000000 -r cef349423167 client/app/slideshow/slideshow.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/slideshow/slideshow.css Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,26 @@ +.carousel-caption { + color: #000; + position: static; + text-shadow: none; + text-align: left; +} + +.carousel-indicators { + display: none; +} + +.carousel-control { + width: 3%; +} + +.carousel-control .icon-next, .carousel-control .glyphicon-chevron-right { + right: 2%; +} + +.original-text { + font-style: italic; +} + +textarea.form-control { + height: 140px; +} diff -r 000000000000 -r cef349423167 client/app/slideshow/slideshow.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/app/slideshow/slideshow.html Wed Jun 11 01:26:59 2014 +0200 @@ -0,0 +1,18 @@ +

{{ slideshow.title }}

+

{{ slideshow.description }}

+