couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [1/2] fauxton commit: updated refs/heads/dead-backbone to ec1139d
Date Wed, 14 Sep 2016 09:35:39 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/dead-backbone [created] ec1139d36


remove spinner

all views except replication are react based now


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/b9b89827
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/b9b89827
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/b9b89827

Branch: refs/heads/dead-backbone
Commit: b9b8982780e2011779f0e36f1e3f887f2157a8b4
Parents: ed9aa3c
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Wed Sep 14 11:34:59 2016 +0200
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Wed Sep 14 11:34:59 2016 +0200

----------------------------------------------------------------------
 app/addons/activetasks/routes.js                |  1 -
 app/addons/auth/routes.js                       |  1 -
 app/addons/databases/routes.js                  |  1 -
 app/addons/documentation/routes.js              |  1 -
 app/addons/documents/routes-doc-editor.js       |  2 -
 app/addons/documents/routes-mango.js            |  2 -
 .../documents/tests/nightwatch/viewEdit.js      |  7 --
 app/addons/fauxton/components.js                | 83 --------------------
 app/core/base.js                                |  1 -
 app/core/routeObject.js                         |  1 -
 assets/less/fauxton.less                        |  6 --
 11 files changed, 106 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/addons/activetasks/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/routes.js b/app/addons/activetasks/routes.js
index cee53e3..e81dab2 100644
--- a/app/addons/activetasks/routes.js
+++ b/app/addons/activetasks/routes.js
@@ -19,7 +19,6 @@ import Actions from "./actions";
 var ActiveTasksRouteObject = FauxtonAPI.RouteObject.extend({
   selectedHeader: 'Active Tasks',
   layout: 'one_pane',
-  disableLoader: true,
   routes: {
     'activetasks/:id': 'showActiveTasks',
     'activetasks': 'showActiveTasks'

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/addons/auth/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/routes.js b/app/addons/auth/routes.js
index 2e42f4b..b0e41d5 100644
--- a/app/addons/auth/routes.js
+++ b/app/addons/auth/routes.js
@@ -27,7 +27,6 @@ var AuthRouteObject = FauxtonAPI.RouteObject.extend({
     'createAdmin': 'checkNodes',
     'createAdmin/:node': 'createAdminForNode'
   },
-  disableLoader: true,
   hideNotificationCenter: true,
 
   checkNodes: function () {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/addons/databases/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/routes.js b/app/addons/databases/routes.js
index 00e8b28..6fa5722 100644
--- a/app/addons/databases/routes.js
+++ b/app/addons/databases/routes.js
@@ -32,7 +32,6 @@ var AllDbsRouteObject = FauxtonAPI.RouteObject.extend({
   roles: ['fx_loggedIn'],
 
   selectedHeader: "Databases",
-  disableLoader: true,
 
   initialize: function () {
     this.databases = new Databases.List();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/addons/documentation/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documentation/routes.js b/app/addons/documentation/routes.js
index c253645..5205164 100644
--- a/app/addons/documentation/routes.js
+++ b/app/addons/documentation/routes.js
@@ -17,7 +17,6 @@ import DocumentationComponents from "./components.react";
 var DocumentationRouteObject = FauxtonAPI.RouteObject.extend({
   selectedHeader: 'Documentation',
   layout: 'one_pane',
-  disableLoader: false,
   routes: {
     'documentation': 'documentation'
   },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/addons/documents/routes-doc-editor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-doc-editor.js b/app/addons/documents/routes-doc-editor.js
index 828ec63..718fd9a 100644
--- a/app/addons/documents/routes-doc-editor.js
+++ b/app/addons/documents/routes-doc-editor.js
@@ -23,7 +23,6 @@ import RevBrowserComponents from "./rev-browser/rev-browser.components.react";
 
 const RevBrowserRouteObject = FauxtonAPI.RouteObject.extend({
   layout: 'doc_editor',
-  disableLoader: true,
   selectedHeader: 'Databases',
   roles: ['fx_loggedIn'],
 
@@ -63,7 +62,6 @@ const RevBrowserRouteObject = FauxtonAPI.RouteObject.extend({
 
 const DocEditorRouteObject = FauxtonAPI.RouteObject.extend({
   layout: 'doc_editor',
-  disableLoader: true,
   selectedHeader: 'Databases',
 
   roles: ['fx_loggedIn'],

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/addons/documents/routes-mango.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-mango.js b/app/addons/documents/routes-mango.js
index 7839d82..c9914eb 100644
--- a/app/addons/documents/routes-mango.js
+++ b/app/addons/documents/routes-mango.js
@@ -42,8 +42,6 @@ const MangoIndexEditorAndQueryEditor = FauxtonAPI.RouteObject.extend({
     },
   },
 
-  disableLoader: true,
-
   initialize: function (route, masterLayout, options) {
     var databaseName = options[0];
     this.databaseName = databaseName;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/addons/documents/tests/nightwatch/viewEdit.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/viewEdit.js b/app/addons/documents/tests/nightwatch/viewEdit.js
index f8d9229..fe8ec18 100644
--- a/app/addons/documents/tests/nightwatch/viewEdit.js
+++ b/app/addons/documents/tests/nightwatch/viewEdit.js
@@ -26,7 +26,6 @@ module.exports = {
       .loginToGUI()
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_design/testdesigndoc/_view/stubview/edit')
       .waitForElementPresent('.index-cancel-link', waitTime, true)
-      .waitForElementNotPresent('.spinner', waitTime, true)
       .waitForElementNotPresent('.loading-lines', waitTime, true)
       .waitForElementVisible('#index-name', waitTime, true)
       .waitForElementPresent('.breadcrumb .js-lastelement', waitTime, false)
@@ -65,7 +64,6 @@ module.exports = {
 
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_design/testdesigndoc/_view/stubview/edit')
       .waitForElementPresent('.index-cancel-link', waitTime, true)
-      .waitForElementNotPresent('.spinner', waitTime, true)
       .waitForElementNotPresent('.loading-lines', waitTime, true)
       .waitForElementVisible('#index-name', waitTime, true)
       .waitForElementPresent('.breadcrumb .js-lastelement', waitTime, false)
@@ -89,7 +87,6 @@ module.exports = {
       .checkForStringPresent(viewUrl, 'hasehase6000')
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_design/testdesigndoc/_view/stubview')
       .waitForElementNotPresent('.loading-lines', waitTime, false)
-      .waitForElementNotPresent('.spinner', waitTime, false)
       .waitForElementVisible('.prettyprint', waitTime, false)
       .waitForElementPresent('.breadcrumb .js-lastelement', waitTime, false)
       .waitForAttribute('.breadcrumb .js-lastelement', 'textContent', function (docContents)
{
@@ -120,7 +117,6 @@ module.exports = {
       .waitForElementPresent(dropDownElement, waitTime, false)
       .clickWhenVisible(dropDownElement + ' a')
       .clickWhenVisible(dropDownElement + ' a[href*="new_view"]')
-      .waitForElementNotPresent('.spinner', waitTime, true)
       .waitForElementNotPresent('.loading-lines', waitTime, true)
       .waitForElementPresent('.breadcrumb .js-lastelement', waitTime, false)
       .waitForAttribute('.breadcrumb .js-lastelement', 'textContent', function (docContents)
{
@@ -152,7 +148,6 @@ module.exports = {
       .clickWhenVisible(dropDownElement + ' a[href*="new_view"]')
       .waitForElementPresent('.index-cancel-link', waitTime, false)
       .waitForElementVisible('#new-ddoc', waitTime, false)
-      .waitForElementNotPresent('.spinner', waitTime, true)
       .waitForElementNotPresent('.loading-lines', waitTime, true)
       .waitForElementPresent('.breadcrumb .js-lastelement', waitTime, false)
       .waitForAttribute('.breadcrumb .js-lastelement', 'textContent', function (docContents)
{
@@ -176,7 +171,6 @@ module.exports = {
       // now redirect back to first view and confirm the fields are all populated properly
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_design/view1-name/_view/view1/edit')
 
-      .waitForElementNotPresent('.spinner', waitTime, true)
       .waitForElementNotPresent('.loading-lines', waitTime, true)
       .waitForElementVisible('#save-view', waitTime, false)
       .waitForElementPresent('.breadcrumb .js-lastelement', waitTime, false)
@@ -226,7 +220,6 @@ module.exports = {
 
       .waitForElementPresent('.index-cancel-link', waitTime, true)
       .waitForElementVisible('select#ddoc', waitTime, true)
-      .waitForElementNotPresent('.spinner', waitTime, true)
       .waitForElementNotPresent('.loading-lines', waitTime, true)
 
       .setValue('select#ddoc', 'new-doc')

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index 540f508..4f7eaed 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -229,7 +229,6 @@ Components.Tray = FauxtonAPI.View.extend({
 
 
 Components.ModalView = FauxtonAPI.View.extend({
-  disableLoader: true,
 
   initialize: function (options) {
     _.bindAll(this);
@@ -341,86 +340,4 @@ Components.DbSearchTypeahead = Components.Typeahead.extend({
 });
 
 
-
-//need to make this into a backbone view...
-var routeObjectSpinner;
-
-FauxtonAPI.RouteObject.on('beforeEstablish', function (routeObject) {
-  if (!routeObject.disableLoader) {
-    var opts = {
-      lines: 16, // The number of lines to draw
-      length: 8, // The length of each line
-      width: 4, // The line thickness
-      radius: 12, // The radius of the inner circle
-      color: '#333', // #rbg or #rrggbb
-      speed: 1, // Rounds per second
-      trail: 10, // Afterglow percentage
-      shadow: false // Whether to render a shadow
-    };
-
-    if (routeObjectSpinner) { return; }
-
-    if (!$('.spinner').length) {
-      $('<div class="spinner"></div>')
-        .appendTo('#app-container');
-    }
-
-    routeObjectSpinner = new Spinner(opts).spin();
-    $('.spinner').append(routeObjectSpinner.el);
-  }
-});
-
-var removeRouteObjectSpinner = function () {
-  if (routeObjectSpinner) {
-    routeObjectSpinner.stop();
-    routeObjectSpinner = null;
-    $('.spinner').remove();
-  }
-};
-
-var removeViewSpinner = function (selector) {
-  var viewSpinner = viewSpinners[selector];
-
-  if (viewSpinner) {
-    viewSpinner.stop();
-    $(selector).find('.spinner').remove();
-    delete viewSpinners[selector];
-  }
-};
-
-var viewSpinners = {};
-FauxtonAPI.RouteObject.on('beforeRender', function (routeObject, view, selector) {
-  removeRouteObjectSpinner();
-
-  if (!view.disableLoader) {
-    var opts = _.extend({
-      lines: 16, // The number of lines to draw
-      length: 8, // The length of each line
-      width: 4, // The line thickness
-      radius: 12, // The radius of the inner circle
-      color: '#333', // #rbg or #rrggbb
-      speed: 1, // Rounds per second
-      trail: 10, // Afterglow percentage
-      shadow: false // Whether to render a shadow
-    }, view.loaderStyles);
-
-    var viewSpinner = new Spinner(opts).spin();
-    $('<div class="spinner"></div>')
-      .appendTo(selector)
-      .append(viewSpinner.el);
-
-    viewSpinners[selector] = viewSpinner;
-  }
-});
-
-FauxtonAPI.RouteObject.on('afterRender', function (routeObject, view, selector) {
-  removeViewSpinner(selector);
-});
-
-FauxtonAPI.RouteObject.on('viewHasRendered', function (view, selector) {
-  removeViewSpinner(selector);
-  removeRouteObjectSpinner();
-});
-
-
 export default Components;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/core/base.js
----------------------------------------------------------------------
diff --git a/app/core/base.js b/app/core/base.js
index 0ea2676..510fb7a 100644
--- a/app/core/base.js
+++ b/app/core/base.js
@@ -79,7 +79,6 @@ FauxtonAPI.View = Backbone.View.extend({
   },
   loaderClassname: 'loader',
   manage: true,
-  disableLoader: false,
 
   forceRender: function () {
     this.hasRendered = false;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/app/core/routeObject.js
----------------------------------------------------------------------
diff --git a/app/core/routeObject.js b/app/core/routeObject.js
index 00a37a0..de1a4bb 100644
--- a/app/core/routeObject.js
+++ b/app/core/routeObject.js
@@ -75,7 +75,6 @@ _.extend(RouteObject.prototype, Backbone.Events, {
   layout: "with_sidebar",
   apiUrl: null,
   hideNotificationPanel: null,
-  disableLoader: false,
   loaderClassname: 'loader',
   renderedState: false,
   establish: function () {},

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b9b89827/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/assets/less/fauxton.less b/assets/less/fauxton.less
index 8391f5f..a620fe8 100644
--- a/assets/less/fauxton.less
+++ b/assets/less/fauxton.less
@@ -317,12 +317,6 @@ table.databases {
   color: @fontGrey;
 }
 
-div.spinner {
-  position: absolute;
-  left: 50%;
-  top: 50%;
-}
-
 
 // legacy - remove when soft migration to header toggles is complete
 // missing: add_config_option


Mime
View raw message