Last active
December 17, 2015 23:39
-
-
Save raedatoui/5690717 to your computer and use it in GitHub Desktop.
Revisions
-
raedatoui revised this gist
Jun 4, 2013 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,8 +7,7 @@ # progress ui complete: (xhr) => # fetch model based on id attr = JSON.parse xhr.responseText App.Layer.url = "/layers/#{attr.id}" App.Layer.one "refresh", (data) => -
raedatoui revised this gist
Jun 1, 2013 . 1 changed file with 3 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,24 +1,16 @@ @form.ajaxForm dataType: 'json' beforeSend: => # ui treatement uploadProgress: (event, position, total, percentComplete) => # progress ui complete: (xhr) => @bar.hide() @percent.hide() attr = JSON.parse xhr.responseText App.Layer.url = "/layers/#{attr.id}" App.Layer.one "refresh", (data) => App.Layer.url = "/layers" App.Layer.fetch() -
raedatoui created this gist
Jun 1, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ @form.ajaxForm dataType: 'json' beforeSend: => @submitBtn.attr percentVal = "0%" @bar.show() @percent.show() @bar.width percentVal @percent.html percentVal uploadProgress: (event, position, total, percentComplete) => percentVal = percentComplete + "%" @bar.width percentVal @percent.html percentVal complete: (xhr) => @bar.hide() @percent.hide() attr = JSON.parse xhr.responseText App.Layer.url = "/layers/#{attr.id}" App.Layer.one "refresh", (data) => App.Layer.url = "/layers" Spine.trigger "dataAdded", data[0] App.Layer.fetch()