wip: global UI refactoring

* More work on the webmail

see #204
This commit is contained in:
Antoine Nguyen
2012-03-30 11:15:34 +02:00
parent e10bba2d4e
commit 28e8e736ee
21 changed files with 142 additions and 191 deletions
+1
View File
@@ -15,6 +15,7 @@ body {
left: 0;
right: 0;
bottom: 0;
margin-bottom: 0;
}
#pagination_bar {
+7 -5
View File
@@ -61,6 +61,7 @@ History.prototype = {
? value.substring(1).split('?') : value.split('?');
if (splits.length == 0) {
this.base = this.options.deflocation;
return this;
}
if (reset === undefined) {
@@ -69,11 +70,12 @@ History.prototype = {
if (reset) {
this.reset();
}
this.base = (splits[0] == "") ? this.options.deflocation : splits[0];
var re = new RegExp("/$");
if (!this.base.match(re)) {
this.base += '/';
if ((this.base = splits[0]) != "") {
var re = new RegExp("/$");
if (!this.base.match(re)) {
this.base += '/';
}
}
if (splits.length > 1) {
var params = splits[1].split('&');
@@ -101,7 +103,7 @@ History.prototype = {
},
update: function(force, noupdate) {
$(window).trigger("pageRefresh");
/*$(window).trigger("pageRefresh");*/
location.hash = this.serialize();
if (noupdate === undefined) {
+8 -4
View File
@@ -2,10 +2,10 @@
* Collection of functions that are accessible to every page.
*/
function modalbox(e, css) {
function modalbox(e, css, defhref, defcb) {
e.preventDefault();
var href = $(this).attr('href');
var modalcb = $(this).attr('modalcb');
var href = (defhref != undefined) ? defhref : $(this).attr('href');
var modalcb = (defcb != undefined) ? defcb : $(this).attr('modalcb');
if (href.indexOf('#') == 0) {
$(href).modal('open');
@@ -22,7 +22,11 @@ function modalbox(e, css) {
.modal()
.one('shown', function() {
if (modalcb != undefined) {
eval(modalcb + '()');
if (typeof modalcb === "function") {
modalcb();
} else {
eval(modalcb + '()');
}
}
})
.on('hidden', function() {