share/views/public/js/rbbt.modal.js in rbbt-rest-1.6.17 vs share/views/public/js/rbbt.modal.js in rbbt-rest-1.6.18
- old
+ new
@@ -19,10 +19,12 @@
controller._set = function(content, title){
vm.content(content)
if (undefined !== title)
vm.title(title)
+ else
+ vm.title("")
vm.visible(true)
}
controller.show = function(content, title){
controller._set(content, title)
@@ -41,10 +43,17 @@
controller.show_url = function(url, title){
if (typeof url == 'string') params = {url: url, method: 'GET',deserialize: function(v){return v}}
else params = url
+ vm.visible(true)
+ vm.title("loading")
+ vm.content(m('.ui.loading.basic.segment'))
+ $(rbbt.modal.element).addClass('loading')
+ $(rbbt.modal.element).addClass('active')
+ m.redraw()
return rbbt.insist_request(params).then(function(content){
+ $(rbbt.modal.element).removeClass('loading')
controller.show(content, title)
})
}
controller.close = function(){