[update] Add label on tree

This commit is contained in:
brunosimon
2016-08-14 15:23:41 +02:00
parent ae6458ade1
commit a2e7f6b541
3 changed files with 7 additions and 6 deletions
@@ -43,6 +43,7 @@ application.controller(
file = file.data;
file.notif = 0;
file.new = false;
file.active = true;
$scope.file = file;
+2 -4
View File
@@ -83,6 +83,7 @@ application.factory(
file = Object.assign( {}, data );
file.notif = 0;
file.new = true;
for( var _version of file.versions )
{
_version = reformat_version( _version );
@@ -93,8 +94,6 @@ application.factory(
result.tree.add_file( data.path.full, file )
}
file.notif++;
// Apply callback
if( typeof update_callback === 'function' )
update_callback.apply( this, [ data ] );
@@ -152,6 +151,7 @@ application.factory(
// Format data
file.notif = 0;
file.new = true;
for( var _version of file.versions )
{
_version = reformat_version( _version );
@@ -161,8 +161,6 @@ application.factory(
result.tree.add_file( _file_key, file )
}
file.notif++;
}
// Apply callback
+4 -2
View File
@@ -10,8 +10,10 @@ script(type="text/ng-template",id="folder_template.html")
span(ng-click="file_click(_file)")
i.fa.fa-file-text
| {{_file.name}}
span.notif
| ({{_file.data.notif}})
span.notif(ng-if="_file.data.notif")
| [{{_file.data.notif}}]
span.new(ng-if="_file.data.new")
| [new]
section.page-project(ng-controller="ProjectController as controller",ng-init="init('" + project_slug + "')")
aside.aside