Skip to content

Commit

Permalink
1.2.10
Browse files Browse the repository at this point in the history
Fixed #38, #39.
  • Loading branch information
ermouth committed Apr 9, 2017
1 parent 8ec4664 commit b08e3c4
Show file tree
Hide file tree
Showing 8 changed files with 4,502 additions and 32 deletions.
4,468 changes: 4,468 additions & 0 deletions Release/1.2/jquerymy-1.2.10.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Release/1.2/jquerymy-1.2.10.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Release/jquery.my.last.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquerymy",
"version": "1.2.9",
"version": "1.2.10",
"description": "A lightweight jQuery plugin for complex two-way data binding in real time.",
"main": "./jquerymy.js",
"authors": [
Expand Down
43 changes: 20 additions & 23 deletions jquerymy.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/*
* jQuery.my 1.2.9
* jQuery.my 1.2.10
* Requires jQuery 2.0+, SugarJS 1.3.9-1.4.x
*
* — replaced $.find() with direct .querySelector calls, where possible
* — some $.my.modal fixes and improvements
* — fixes #38, #39
*
* More details at jquerymy.com
*
* (c) @ermouth, thanks @carpogoryanin, @ftescht
* 2017-04-08
* 2017-04-09
*/

;(function ($) {

var _version = "1.2.9";
var _version = "1.2.10";

// Some shortcuts and constants
var TMP, lang = "en",
Expand Down Expand Up @@ -1956,15 +1955,15 @@
function _broadcast($root, msg) {
var supress = false, fc, next;
if (isO(msg) && msg.channel && msg.message) {
_find($root, ".my-listen-"+_sdbm(msg.channel))
_find($root, ".my-listen-"+_sdbm(msg.channel), true)
.each(function(){
var $c = $(this),
my = $c.data("my"),
fn, v=undefined;
if (my && my.ui.listen && isF(my.ui.listen[msg.channel]) ) {
fn = my.ui.listen[msg.channel];
try{
v = fn.call( my.manifest || my.root.my().manifest, my.data, msg.message, $c);
v = fn.call( my.manifest || my.root.my().manifest, my.data, msg.message, $c);
} catch(e) {
_ERR("Listener failed", e.message, e.stack);
}
Expand Down Expand Up @@ -3653,7 +3652,7 @@

//#############################################################################################

/* jQuery.my.modal 1.1.8
/* jQuery.my.modal 1.2.0
* Requires Sugar 1.4.~, jQuery 2.0+, $.my 1.2.8+
*
* Modal dialog constructor/manager.
Expand Down Expand Up @@ -4180,7 +4179,7 @@
// fullscreen tuneups
if (m.global) {
isOpen = $o;
$("body").css({overflow:"hidden"});
$(document.body).css({overflow:'hidden'});
}

// esc and enter monitors
Expand Down Expand Up @@ -4384,7 +4383,7 @@
+'px!important;}';
$s.text(h);
}
if (m.nose=="left" || m.nose=="right") {
else if (m.nose=="left" || m.nose=="right") {
h+='div.my-modal-'+m.cid+'.nose-'+m.nose+':before {top:'
+ (m.pos.oy - m.pos.py + m.pos.oh/2 - m.pos.vy)
+'px!important;}';
Expand All @@ -4401,17 +4400,15 @@
if (m.screen) {
if (!m.global) $bg.css({
top:0, left:0, position:"absolute",
width: $bg.parent().width()+'px',//m.pos.pw+"px",
height: $bg.parent().height()+'px',//m.pos.ph+"px",
width: $bg.parent().outerWidth()+'px',
height: $bg.parent().outerHeight()+'px',
display:"block",
background:isS(m.screen)? m.screen:'rgba(40,80,120,0.6)',
background:isS(m.screen)? m.screen:'rgba(255,255,255,0.6)',
"z-index":m.z-1
});
else {
$bg.css({
top:0, left:0,
//width:(m.pos.ww*2)+"px",
//height:(m.pos.wh*2)+"px",
width:"100%", height:"100%",
display:"block",
position:"fixed",
Expand All @@ -4426,24 +4423,24 @@

if (m.height> m.pos.wh) {
$m.height(m.pos.wh-30);
$f.css({"overflow-y":$.browser.webkit?"overlay":"scroll"});
$f.css({'overflow-y':'scroll'});
} else {
$f.css({"overflow-y":"none"});
$f.css({'overflow-y':''});
}

$m.animate({top: m.pos.vy+"px", opacity:"1"}, m.animate);
$m.animate({top: m.pos.vy+'px', opacity:'1'}, m.animate);
}

// - - - - - - - - - - - - - - - - - -

function _remove(){
try { $f.my("remove"); } catch(e){}
try { $f.my('remove'); } catch(e){}
try {
// root may not exist
$r.data("modals")[m.cid] = null;
$r.data('modals')[m.cid] = null;
} catch(e){}
$f.parent().off(".my").remove();
$bg.off(".my"+ m.cid);
$f.parent().off('.my').remove();
$bg.off('.my'+ m.cid);
if (m.screen) {
(function(g){
if (!g || !isOpen) $bg.hide();
Expand All @@ -4455,7 +4452,7 @@
}
if (m.global) {
isOpen = false;
$("body")[0].style.overflow = null;
$(document.body).css({overflow:''});
}
}

Expand Down
6 changes: 3 additions & 3 deletions jquerymy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion my.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"keywords": [
"MVVM", "framework", "ui", "form", "validation", "data binding"
],
"version": "1.2.9",
"version": "1.2.10",
"author": {
"name": "ermouth",
"url": "https://github.com/ermouth"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquerymy",
"version": "1.2.9",
"version": "1.2.10",
"description": "A lightweight jQuery plugin for complex two-way data binding in real time.",
"homepage": "http://jquerymy.com/",
"author": "ermouth <[email protected]>",
Expand Down

0 comments on commit b08e3c4

Please sign in to comment.