Skip to content

Commit 12169f5

Browse files
author
Matt Karl
committed
Clean template task, fixed remove template bug
1 parent a426ab5 commit 12169f5

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

src/springroll/new/TemplateManager.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
* @private
6868
*/
6969
this._modal = $("#templateModal")
70-
.on('hidden.bs.modal', this.reset.bind(this));
70+
.on('hidden.bs.modal', this.onModalClose.bind(this));
7171

7272
// Turn off all file dragging
7373
$(document.body).on("dragover drop", function(e){
@@ -263,6 +263,17 @@
263263
this.reset();
264264
};
265265

266+
/**
267+
* Handler when the modal becomes hidden
268+
* @private
269+
* @method onModalClose
270+
*/
271+
p.onModalClose = function()
272+
{
273+
this.reset();
274+
this.updateModules();
275+
};
276+
266277
/**
267278
* Reset the drop zone
268279
* @method reset

tasks/aliases.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = function(grunt)
1111
'clean:css',
1212
'less:release',
1313
'moduleAppTasks',
14+
'clean:defaultTemplate',
1415
'libs',
1516
'copy:defaultTemplate',
1617
'exec:appModules',

tasks/overrides/clean.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
module.exports = {
2-
installers: ['<%= buildDir %>/<%= project.name %>-Setup-*.*']
2+
installers: ['<%= buildDir %>/<%= project.name %>-Setup-*.*'],
3+
defaultTemplate: [
4+
'<%= components %>/default/',
5+
'<%= distFolder %>/assets/templates/default/'
6+
]
37
};

0 commit comments

Comments
 (0)