diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 305042b..ba2005d 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -74,6 +74,13 @@ module.exports= (grunt) -> dest: '<%= pkg.config.build.app.node %>/db/sql' }] + watch: + scripts: + files: '<%= pkg.config.build.src.node %>/views/assets/**/*' + tasks: ['jade', 'less', 'copy:views'] + options: + event: ['added', 'deleted', 'changed'] + #coffeelint: # app: # options: @@ -106,6 +113,7 @@ module.exports= (grunt) -> grunt.loadNpmTasks 'grunt-contrib-jade' grunt.loadNpmTasks 'grunt-contrib-less' grunt.loadNpmTasks 'grunt-yaml' + grunt.loadNpmTasks 'grunt-contrib-watch' #grunt.loadNpmTasks 'grunt-coffeelint' #grunt.loadNpmTasks 'grunt-docco' diff --git a/package.json b/package.json index c347e04..271b4f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,9 @@ { "name": "apiserver.builder", - "repository": { "type": "git", "url": "https://github.com/okdas/apiserver.git" }, + "repository": { + "type": "git", + "url": "https://github.com/okdas/apiserver.git" + }, "private": true, "config": { "build": { @@ -28,7 +31,8 @@ "grunt-contrib-less": "0.6.4", "grunt-yaml": "0.2.1", "grunt-cli": "0.1.9", - "coffee-script": "1.6.3" + "coffee-script": "1.6.3", + "grunt-contrib-watch": "0.5.3" }, "engines": { "node": "0.10.17" diff --git a/source/node/views/templates/Manage/project/partials/servers/servers/server/form/index.jade b/source/node/views/templates/Manage/project/partials/servers/servers/server/form/index.jade index 3db077a..19c0126 100644 --- a/source/node/views/templates/Manage/project/partials/servers/servers/server/form/index.jade +++ b/source/node/views/templates/Manage/project/partials/servers/servers/server/form/index.jade @@ -16,7 +16,7 @@ block section-body .row .col-10 select.input(ng-model='tag') - option(ng-repeat='tag in tags | filter:filterTag:tag', value='{{tag}}') {{tag.name}} + option(ng-repeat='tag in tags | filter:filterTag:tag', value='{{tag}}') {{tag.name}} ({{tag.titleRuSingular}}) .col-1 button.btn(ng-click='addTag(tag)',ng-disabled='!tag') i.icon-plus diff --git a/source/node/views/templates/Manage/project/partials/store/items/item/form/index.jade b/source/node/views/templates/Manage/project/partials/store/items/item/form/index.jade index 5d65430..fad0901 100644 --- a/source/node/views/templates/Manage/project/partials/store/items/item/form/index.jade +++ b/source/node/views/templates/Manage/project/partials/store/items/item/form/index.jade @@ -56,13 +56,13 @@ block section-body .row .col-10 select.input(ng-model='tag') - option(ng-repeat='tag in tags | filter:filterTag:tag', value='{{tag}}') {{tag.name}} + option(ng-repeat='tag in tags | filter:filterTag:tag', value='{{tag}}') {{tag.name}} ({{tag.titleRuSingular}}) .col-1 button.btn(ng-click='addTag(tag)',ng-disabled='!tag') i.icon-plus .row(ng-repeat='itemTag in item.tags') - .col-3 {{itemTag.name}} + .col-3 {{itemTag.name}} ({{itemTag.titleRuSingular}}) .col-1 button.btn(ng-click='removeTag(itemTag)') i.icon-minus diff --git a/source/node/views/templates/Manage/project/partials/tags/tags/index.jade b/source/node/views/templates/Manage/project/partials/tags/tags/index.jade index c35ef65..90be18a 100644 --- a/source/node/views/templates/Manage/project/partials/tags/tags/index.jade +++ b/source/node/views/templates/Manage/project/partials/tags/tags/index.jade @@ -8,7 +8,7 @@ block section-body tr th # th.col-flex: .table-col: .table-col-sortable Тег - th Name + th Название th Родительские th button.btn.btn-info(ng-click='reload()') @@ -17,8 +17,8 @@ block section-body tbody tr(ng-repeat='tag in tags | filter:tagSearch') td {{tag.id}} - td {{tag.titleRuPlural}} ({{tag.name}}) td {{tag.name}} + td {{tag.titleRuPlural}} td span(ng-repeat='parent in tag.parentTags')= '{{parent.name}} ' td diff --git a/source/node/views/templates/Manage/project/partials/tags/tags/tag/form/index.jade b/source/node/views/templates/Manage/project/partials/tags/tags/tag/form/index.jade index d98aa25..032b17f 100644 --- a/source/node/views/templates/Manage/project/partials/tags/tags/tag/form/index.jade +++ b/source/node/views/templates/Manage/project/partials/tags/tags/tag/form/index.jade @@ -12,23 +12,23 @@ block section-body fieldset: .row .col-6 - input.input(placeholder='В единственном числе', type='text', required, ng-maxlength='50', ng-model='tag.titleRuSingular') + input.input(placeholder='В единственном числе', type='text', ng-maxlength='50', ng-model='tag.titleRuSingular') .col-6 - input.input(placeholder='Во множественном', type='text', required, ng-maxlength='50', ng-model='tag.titleRuPlural') + input.input(placeholder='Во множественном', type='text', ng-maxlength='50', ng-model='tag.titleRuPlural') fieldset: .row .col-6 - input.input(placeholder='Singular', type='text', required, ng-maxlength='50', ng-model='tag.titleEnSingular') + input.input(placeholder='Singular', type='text', ng-maxlength='50', ng-model='tag.titleEnSingular') .col-6 - input.input(placeholder='Plural', type='text', required, ng-maxlength='50', ng-model='tag.titleEnPlural') + input.input(placeholder='Plural', type='text', ng-maxlength='50', ng-model='tag.titleEnPlural') fieldset .row .col-10 select.input(ng-model='parentTag') - option(ng-repeat='parentTag in tags | filter:filterTag: parentTag', value='{{parentTag}}') {{parentTag.titleRuSingular}} ({{parentTag.name}}) + option(ng-repeat='parentTag in tags | filter:filterTag: parentTag', value='{{parentTag}}') {{parentTag.name}} ({{parentTag.titleRuSingular}}) .col-1 button.btn(ng-click='addTag(parentTag)',ng-disabled='!parentTag') i.icon-plus