Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change AJAX indicator image

  • Loading branch information...
commit b3a4c5c75fcb6a2e8a2f1bd4431dc1ef315ae9a4 1 parent 84d7547
@norbertlaposa norbertlaposa authored
View
BIN  share/images/ajax-indicator/indicator_facebook.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 share/js/backoffice.js
@@ -1,6 +1,7 @@
/**
* backoffice and fe_edit
- * Author: Norbert @ Laposa Ltd 2010
+ * Author: Norbert @ Laposa Ltd 2010, 2012
+ * TODO: move to global Onxshop object
*/
function openEdit(url, el, ajax) {
@@ -14,7 +15,7 @@ function openEdit(url, el, ajax) {
function openAjaxRequestInDialog(url, title) {
$('#dialog').dialog( "destroy" );
- $('#dialog').html("<img src='/share/images/ajax-indicator/indicator_verybig.gif' alt='Loading ...'/>").load(url, '', function (responseText, textStatus, XMLHttpRequest) {
+ $('#dialog').html(onxshop_load_indicator_html_snippet).load(url, '', function (responseText, textStatus, XMLHttpRequest) {
//popupMessage("#dialog div.onxshop_messages");
})
.dialog({
View
33 share/js/common.js
@@ -1,17 +1,30 @@
/**
- * Norbert @ Laposa Ltd, 2009
+ * Norbert @ Laposa Ltd, 2009, 2012
+ * TODO: create Onxshop global object and move all functions there
*
*/
+/**
+ * open new window with unique name
+ */
+
function nOpenWin(src, width, height) {
window.open(src,'nWin'+unixtime(),'width='+width+',height='+height+',toolbar=0,directories=0,menubar=0,status=no,resizable=1,location=0,scrollbars=1,dialog=0,modal=0');
}
+/**
+ * open image in popup window
+ */
+
function openImg(src) {
url = '/popupimage/' + src;
nOpenWin(url, 400, 300);
}
+/**
+ * unixtime used in nOpenWin
+ */
+
function unixtime() {
var unixtime = new Date().getTime();
unixtime = unixtime/1000;
@@ -19,10 +32,19 @@ function unixtime() {
return unixtime;
}
+/**
+ * HTML snippet for AJAX loader
+ */
+
+var onxshop_load_indicator_html_snippet = "<div style='width: 100%; padding-top: 10px; text-align: center;'><img src='/share/images/ajax-indicator/indicator_facebook.gif' alt='Loading ...'/></div>";
+
+/**
+ * ajax loader
+ */
+
function makeAjaxRequest(jquery_selector, url, complete_callback) {
- jQuery(jquery_selector).html("<div style='width: 100%; padding-top: 100px; text-align: center;'><img src='/share/images/ajax-indicator/indicator_verybig.gif' alt='Loading ...'/></div>").load(url, '', function (responseText, textStatus, XMLHttpRequest) {
+ jQuery(jquery_selector).html(onxshop_load_indicator_html_snippet).load(url, '', function (responseText, textStatus, XMLHttpRequest) {
popupMessage( jquery_selector + ' div.onxshop_messages');
-
if (jQuery.isFunction(complete_callback)) complete_callback();
}
);
@@ -65,7 +87,10 @@ function button_fix(onlyInt) {
}
}
-
+/**
+ * ajax loader in Growl
+ */
+
function openAjaxRequestInGrowl(url, title) {
jQuery.jGrowl('<div class="onxshop_messages in_jGrowl"><img src="/share/images/ajax-indicator/ajax-loader-bar.gif" alt="Loading ..."/></div>', {
beforeOpen: function(e, m, o) {
View
33 share/js/compiled.js
@@ -1313,19 +1313,32 @@ function log() {
(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);/**
- * Norbert @ Laposa Ltd, 2009
+ * Norbert @ Laposa Ltd, 2009, 2012
+ * TODO: create Onxshop global object and move all functions there
*
*/
+/**
+ * open new window with unique name
+ */
+
function nOpenWin(src, width, height) {
window.open(src,'nWin'+unixtime(),'width='+width+',height='+height+',toolbar=0,directories=0,menubar=0,status=no,resizable=1,location=0,scrollbars=1,dialog=0,modal=0');
}
+/**
+ * open image in popup window
+ */
+
function openImg(src) {
url = '/popupimage/' + src;
nOpenWin(url, 400, 300);
}
+/**
+ * unixtime used in nOpenWin
+ */
+
function unixtime() {
var unixtime = new Date().getTime();
unixtime = unixtime/1000;
@@ -1333,10 +1346,19 @@ function unixtime() {
return unixtime;
}
+/**
+ * HTML snippet for AJAX loader
+ */
+
+var onxshop_load_indicator_html_snippet = "<div style='width: 100%; padding-top: 10px; text-align: center;'><img src='/share/images/ajax-indicator/indicator_facebook.gif' alt='Loading ...'/></div>";
+
+/**
+ * ajax loader
+ */
+
function makeAjaxRequest(jquery_selector, url, complete_callback) {
- jQuery(jquery_selector).html("<div style='width: 100%; padding-top: 100px; text-align: center;'><img src='/share/images/ajax-indicator/indicator_verybig.gif' alt='Loading ...'/></div>").load(url, '', function (responseText, textStatus, XMLHttpRequest) {
+ jQuery(jquery_selector).html(onxshop_load_indicator_html_snippet).load(url, '', function (responseText, textStatus, XMLHttpRequest) {
popupMessage( jquery_selector + ' div.onxshop_messages');
-
if (jQuery.isFunction(complete_callback)) complete_callback();
}
);
@@ -1379,7 +1401,10 @@ function button_fix(onlyInt) {
}
}
-
+/**
+ * ajax loader in Growl
+ */
+
function openAjaxRequestInGrowl(url, title) {
jQuery.jGrowl('<div class="onxshop_messages in_jGrowl"><img src="/share/images/ajax-indicator/ajax-loader-bar.gif" alt="Loading ..."/></div>', {
beforeOpen: function(e, m, o) {
View
2  templates/bo/component/search_box.html
@@ -3,7 +3,7 @@
$(function(){
var options = {
target: '#onxshopBackofficeWrapper',
- beforeSubmit: function () {$("#onxshopBackofficeWrapper").html("<img src='/share/images/ajax-indicator/indicator_verybig.gif' alt='Loading ...'/>");}
+ beforeSubmit: function () {$("#onxshopBackofficeWrapper").html(onxshop_load_indicator_html_snippet);}
};
$('#systemSearch form').ajaxForm(options);
});
View
8 templates/bo/pages/news.html
@@ -7,17 +7,17 @@
autoclose: true,
afterClick:function(node){
var node_id = $('a:first', node).attr('href').match("[0-9]{1,}$");
- $("#sub_content").html('<img src=\'/share/images/ajax-indicator/indicator_verybig.gif\' alt=\'Loading ...\'/>').load("/request/bo/component/news_list~show_all_from_bo=1:taxonomy_tree_id="+node_id+"~");
+ $("#sub_content").html(onxshop_load_indicator_html_snippet).load("/request/bo/component/news_list~show_all_from_bo=1:taxonomy_tree_id="+node_id+"~");
},
afterDblClick:function(node){
- alert("text-"+$('span:first',node).text());
+ //alert("text-"+$('span:first',node).text());
},
afterMove:function(destination, source, pos){
- alert("destination-"+$('span:first',destination).text()+" source-"+$('span:first',source).text()+" pos-"+pos);
+ //alert("destination-"+$('span:first',destination).text()+" source-"+$('span:first',source).text()+" pos-"+pos);
},
afterAjax:function()
{
- alert('Loaded');
+ //alert('Loaded');
},
animate: true,
docToFolderConvert: true
View
2  templates/bo/pages/statistic.html
@@ -7,7 +7,7 @@
url: '/request/bo/component/ecommerce/orders_graph',
target: '#orders_graph',
beforeSubmit: function () {
- $("#orders_graph").html("<img src='/share/images/ajax-indicator/indicator_verybig.gif' alt='Loading ...'/>")
+ $("#orders_graph").html(onxshop_load_indicator_html_snippet)
},
success: function(responseText, statusText) {
popupMessage("#orders_graph div.onxshop_messages");
Please sign in to comment.
Something went wrong with that request. Please try again.