Skip to content

Commit

Permalink
ax5modal 95%
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasJang committed Jan 18, 2016
1 parent 341ef37 commit f44cdb5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
15 changes: 10 additions & 5 deletions dist/ax5toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@
this.init = function () {
// after set_config();
self.containerId = ax5.getGuid();
var styles = [];
if(cfg.zIndex){
styles.push("z-index:" + cfg.zIndex);
}
jQuery(document.body).append('<div class="ax5-ui-toast-container ' + cfg.containerPosition + '" data-toast-container="' +
'' + self.containerId + '"></div>');
'' + self.containerId + '" style="' + styles.join(";") + '"></div>');
this.toastContainer = jQuery('[data-toast-container="' + self.containerId + '"]');
};

this.push = function (opts, callBack) {
if(!self.containerId){
if (!self.containerId) {
this.init();
}
if (U.isString(opts)) {
Expand All @@ -85,7 +89,7 @@
};

this.confirm = function (opts, callBack) {
if(!self.containerId){
if (!self.containerId) {
this.init();
}
if (U.isString(opts)) {
Expand Down Expand Up @@ -149,9 +153,10 @@
width: opts.width
};

if(U.left(cfg.containerPosition, '-') == 'bottom'){
if (U.left(cfg.containerPosition, '-') == 'bottom') {
this.toastContainer.append(this.getContent(opts.id, opts));
}else{
}
else {
this.toastContainer.prepend(this.getContent(opts.id, opts));
}

Expand Down
2 changes: 1 addition & 1 deletion dist/ax5toast.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions src/ax5toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@
this.init = function () {
// after set_config();
self.containerId = ax5.getGuid();
var styles = [];
if(cfg.zIndex){
styles.push("z-index:" + cfg.zIndex);
}
jQuery(document.body).append('<div class="ax5-ui-toast-container ' + cfg.containerPosition + '" data-toast-container="' +
'' + self.containerId + '"></div>');
'' + self.containerId + '" style="' + styles.join(";") + '"></div>');
this.toastContainer = jQuery('[data-toast-container="' + self.containerId + '"]');
};

this.push = function (opts, callBack) {
if(!self.containerId){
if (!self.containerId) {
this.init();
}
if (U.isString(opts)) {
Expand All @@ -85,7 +89,7 @@
};

this.confirm = function (opts, callBack) {
if(!self.containerId){
if (!self.containerId) {
this.init();
}
if (U.isString(opts)) {
Expand Down Expand Up @@ -149,9 +153,10 @@
width: opts.width
};

if(U.left(cfg.containerPosition, '-') == 'bottom'){
if (U.left(cfg.containerPosition, '-') == 'bottom') {
this.toastContainer.append(this.getContent(opts.id, opts));
}else{
}
else {
this.toastContainer.prepend(this.getContent(opts.id, opts));
}

Expand Down

0 comments on commit f44cdb5

Please sign in to comment.