Sha256: 933933bf217d5d09441f1a51c84ada2c5f3e3bedfa9045151b2178caa6835be8
Contents?: true
Size: 1.68 KB
Versions: 1
Compression:
Stored size: 1.68 KB
Contents
window.JqAjaxCore2.Loading = <% actionview = ActionView::Base.new %> <% actionview.view_paths += [File.expand_path("../../../../views", __FILE__)] %> showLoading: -> <% if JqajaxCore2::Config.overlay[:enable] == true %> @overlay().height($("body").height()); @overlay().width($("body").width()); # Center the info container info = $(@overlay().children()[0]) w_info = info.width() h_info = info.height() w_window = $(window).width() h_window = $(window).height() info.css({left: (w_window*0.5)-(w_info*0.5)+"px" }) info.css({top: (h_window*0.5)-(h_info*0.5)+"px" }) @overlay().fadeIn(200); <% end %> hideLoading: -> @overlay().fadeOut(200); # get the overlay overlay: -> $("#<%= JqajaxCore2::Config.overlay[:div_id] %>") # get The flash Area flashArea: -> $('#<%= JqajaxCore2::Config.loading[:flash_area_div] %>') # Flash Notify Tools flashNoticeDisplay: (text, mode) -> mode = mode || 'ok' text = text.replace(/\'/g, "\"") html_notice = "<div class='jqac2-notify " + mode + "' style='display:none'>" + text + "</div>" @flashArea().html(html_notice) @flashArea().children().slideDown(500) window.setTimeout('JqAjaxCore2.Loading.flashFadeOut()', 5000) flashFadeOut: -> @flashArea().children().fadeOut(500) loadAjaxFlashNotice: -> $.getJSON '/jqca2/jqac2_flash', (data) -> $(data).each -> @flashNoticeDisplay(this[1], this[0]) addLoader: (div, text) -> $('#'+div).html(JqAjaxCore2.Loading.loaderHtml.replace('{TXT}', text)) loaderHtml: '<%= actionview.render "/jqajax/loader" %>'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jqajax_core2-0.0.81 | app/assets/javascripts/jqac2/loading.js.coffee.erb |