Browse Source

#1: IE8 support

modules
RubaXa 11 years ago
parent
commit
a5b79e876a
  1. 2
      Ply.min.js
  2. 3
      index.html
  3. 4
      ply.css
  4. 13
      src/Ply.es6
  5. 4
      src/Ply.ui.es6

2
Ply.min.js vendored

File diff suppressed because one or more lines are too long

3
index.html

@ -156,7 +156,8 @@
children: [{
tag: 'img',
src: 'http://www.saintjn.org/wp-content/uploads/2013/07/welcome.png?1',
width: 400
width: 400,
height: 116
}],
ok: "Next"
},

4
ply.css

@ -91,10 +91,10 @@
.ply-footer {
}
.ply-footer button {
.ply-footer .ply-ctrl {
margin-left: 20px;
}
.ply-footer button:first-child {
.ply-footer .ply-ctrl:first-child {
margin-left: 0;
}

13
src/Ply.es6

@ -253,10 +253,9 @@
* @private
*/
function _appendChild(parent, el) {
/* istanbul ignore else */
if (parent && el) {
parent.appendChild(el);
}
try {
parent && el && parent.appendChild(el);
} catch (e) {}
}
@ -423,9 +422,7 @@
_css(el, spec.css);
}
else if (name === 'text') {
try {
(value != null) && _appendChild(el, document.createTextNode(value));
} catch (e) {}
(value != null) && _appendChild(el, document.createTextNode(value));
}
else if (name === 'html') {
(value != null) && (el.innerHTML = value);
@ -821,7 +818,7 @@
// Подписываемся кнопку «отмена» и «крестик»
_this.on('click', ':close', (evt, el) => {
evt.preventDefault();
_this.closeBy(el.type === 'reset' ? 'cancel' : 'x');
_this.closeBy(el.nodeName === 'BUTTON' ? 'cancel' : 'x');
});

4
src/Ply.ui.es6

@ -142,7 +142,7 @@
ui.factory('ok', function (data) {
return {
ply: ':ok',
tag: 'button.ply-ok',
tag: 'button.ply-ctrl.ply-ok',
text: data === true ? _lang.ok : data
};
});
@ -152,7 +152,7 @@
ui.factory('cancel', function (data) {
return {
ply: ':close',
tag: 'button.ply-cancel',
tag: 'button.ply-ctrl.ply-cancel',
type: 'reset',
text: data === true ? _lang.cancel : data
};

Loading…
Cancel
Save