[TASK] Update nprogress to 0.2.0 49/39549/2
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 14 May 2015 15:51:12 +0000 (17:51 +0200)
committerFrank Nägler <typo3@naegler.net>
Thu, 14 May 2015 22:44:21 +0000 (00:44 +0200)
Resolves: #66961
Releases: master
Change-Id: I787fffe94cfe8ecc369019e011b8dbaf75a8446b
Reviewed-on: http://review.typo3.org/39549
Reviewed-by: Benjamin Kott <info@bk2k.info>
Tested-by: Benjamin Kott <info@bk2k.info>
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Build/bower.json
typo3/sysext/core/Resources/Public/JavaScript/Contrib/nprogress.js

index b7fbad5..a35e25a 100644 (file)
@@ -32,7 +32,7 @@
     "jquery-ui": "1.11.2",
     "eonasdan-bootstrap-datetimepicker": "4.7.14",
     "moment": "2.10.2",
-    "nprogress": "0.1.6",
+    "nprogress": "0.2.0",
     "datatables": "1.10.5",
     "autosize": "2.0.0",
     "cropper": "0.9.1",
index 124351e..b23b300 100644 (file)
@@ -14,7 +14,7 @@
 })(this, function() {
   var NProgress = {};
 
-  NProgress.version = '0.1.6';
+  NProgress.version = '0.2.0';
 
   var Settings = NProgress.settings = {
     minimum: 0.08,
   /**
    * Waits for all supplied jQuery promises and
    * increases the progress as the promises resolve.
-   * 
+   *
    * @param $promise jQUery Promise
    */
   (function() {
     var initial = 0, current = 0;
-    
+
     NProgress.promise = function($promise) {
-      if (!$promise || $promise.state() == "resolved") {
+      if (!$promise || $promise.state() === "resolved") {
         return this;
       }
-      
-      if (current == 0) {
+
+      if (current === 0) {
         NProgress.start();
       }
-      
+
       initial++;
       current++;
-      
+
       $promise.always(function() {
         current--;
-        if (current == 0) {
+        if (current === 0) {
             initial = 0;
             NProgress.done();
         } else {
             NProgress.set((initial - current) / initial);
         }
       });
-      
+
       return this;
     };
-    
+
   })();
 
   /**
 
   NProgress.remove = function() {
     removeClass(document.documentElement, 'nprogress-busy');
-    removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent')
+    removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');
     var progress = document.getElementById('nprogress');
     progress && removeElement(progress);
   };