From c385db4fc017f3319ff4d57bc19efe81585bc5dd Mon Sep 17 00:00:00 2001 From: Adam Young Date: Mon, 10 Jan 2011 21:14:51 -0500 Subject: spinning wheel display a spinning icon gif during network traffic. Fixes the following from first patch: 1 primary key set in span as opposed to appended, so it only appears once. 2. call hide for the network activity icon only in success or failure functions, not multiple times --- install/static/Makefile.am | 3 +++ install/static/details.js | 12 +++++++++--- install/static/index.html | 5 ++++- install/static/ipa.css | 18 ++++++++++++++++++ install/static/ipa.js | 38 +++++++++++++++++++++++++++++++++----- install/static/search.js | 2 ++ install/static/spinner_header.gif | Bin 0 -> 2841 bytes install/static/spinner_large.gif | Bin 0 -> 6030 bytes install/static/spinner_small.gif | Bin 0 -> 3532 bytes install/static/widget.js | 2 ++ ipa.spec.in | 1 + 11 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 install/static/spinner_header.gif create mode 100644 install/static/spinner_large.gif create mode 100644 install/static/spinner_small.gif diff --git a/install/static/Makefile.am b/install/static/Makefile.am index a539eb8b..c1a5a755 100644 --- a/install/static/Makefile.am +++ b/install/static/Makefile.am @@ -70,6 +70,9 @@ app_DATA = \ ui-icons_ffffff_256x240.png \ FreeWay.otf \ FreeWay-Bold.otf \ + spinner_header.gif \ + spinner_large.gif \ + spinner_small.gif \ $(NULL) EXTRA_DIST = \ diff --git a/install/static/details.js b/install/static/details.js index 84dbe8b5..b5c74a62 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -554,6 +554,11 @@ IPA.details_facet = function (spec) { container.attr('title', that.entity_name); + $('

',{ + html: ""+that.entity_name + ' Settings' + }).append(IPA.create_network_spinner()). + appendTo(container); + var details = $('
', { 'class': 'content' }).appendTo(container); @@ -573,8 +578,6 @@ IPA.details_facet = function (spec) { 'name': 'update' }).appendTo(buttons); - details.append('
'); - details.append('
'); for (var i = 0; i < that.sections.length; ++i) { var section = that.sections[i]; @@ -651,14 +654,17 @@ IPA.details_facet = function (spec) { function load(record) { that.record = record; - for (var i=0; i - +
+ + + Logged in as: user@FREEIP.ORG diff --git a/install/static/ipa.css b/install/static/ipa.css index 38b68dd0..2e61d6d9 100644 --- a/install/static/ipa.css +++ b/install/static/ipa.css @@ -22,6 +22,10 @@ body{ margin: 0; } +.network-activity-indicator{ + display:none; +} + .center-container { margin-left: auto; margin-right: auto; @@ -133,6 +137,20 @@ div.content div.content-buttons img { border: 0; } + +.entity-container h1{ + -moz-border-radius: 0.3em; + font-family: "FreeWayBold", "Liberation Sans", Arial, sans-serif; + color: #333333; + margin: 0; + background: #EEEEEE; + margin-top: 0.5em; + padding: .5em; + text-transform: uppercase; + font-size: 1.2em; +} + + h2 { font-family: "FreeWayBold","Liberation Sans", Arial, sans-serif; font-size: 1.5em; diff --git a/install/static/ipa.js b/install/static/ipa.js index f84028b8..ed43d550 100644 --- a/install/static/ipa.js +++ b/install/static/ipa.js @@ -229,6 +229,7 @@ IPA.batch_command = function (spec) { that.args, that.options, function(data, text_status, xhr) { + for (var i=0; i',{ + 'class':'network-activity-indicator', + html: ''}); +} diff --git a/install/static/search.js b/install/static/search.js index d449a8e1..535ad3fc 100644 --- a/install/static/search.js +++ b/install/static/search.js @@ -41,6 +41,8 @@ IPA.search_widget = function (spec) { 'name': 'search-filter' }).appendTo(search_controls); + search_controls.append(IPA.create_network_spinner()); + this.filter = $('', { 'type': 'text', 'name': 'search-' + that.entity_name + '-filter' diff --git a/install/static/spinner_header.gif b/install/static/spinner_header.gif new file mode 100644 index 00000000..ba9fb781 Binary files /dev/null and b/install/static/spinner_header.gif differ diff --git a/install/static/spinner_large.gif b/install/static/spinner_large.gif new file mode 100644 index 00000000..276dd5a7 Binary files /dev/null and b/install/static/spinner_large.gif differ diff --git a/install/static/spinner_small.gif b/install/static/spinner_small.gif new file mode 100644 index 00000000..1a2da81c Binary files /dev/null and b/install/static/spinner_small.gif differ diff --git a/install/static/widget.js b/install/static/widget.js index 297a44ac..f26ee2a1 100644 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -1105,6 +1105,8 @@ IPA.adder_dialog = function (spec) { label.appendTo(search_panel); + search_panel.append(IPA.create_network_spinner()); + var results_panel = $('
', { 'class': 'adder-dialog-results' }).appendTo(that.container); diff --git a/ipa.spec.in b/ipa.spec.in index cb0a8872..9e44d327 100644 --- a/ipa.spec.in +++ b/ipa.spec.in @@ -398,6 +398,7 @@ fi %dir %{_usr}/share/ipa/static %{_usr}/share/ipa/static/index.html %{_usr}/share/ipa/static/*.png +%{_usr}/share/ipa/static/*.gif %{_usr}/share/ipa/static/*.css %{_usr}/share/ipa/static/*.js %{_usr}/share/ipa/static/*.otf -- cgit