mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fixed <loot-dialog>.
The issues seem to have been due to the layered attribute being true by default in Polymer 0.5.0. The layering complicates matters (it moves dialogs into shadow DOM), and I don't think I need it, so it's been disabled. I also removed the open property, as it conflicts with an existing function name.
This commit is contained in:
@@ -11,30 +11,23 @@ Still missing compared to <dialog> are:
|
||||
<link rel="import" href="../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="../bower_components/paper-dialog/paper-action-dialog.html">
|
||||
|
||||
<polymer-element name="loot-dialog" extends="paper-action-dialog" attributes="open" transition="core-transition-center" autoCloseDisabled backdrop>
|
||||
<polymer-element name="loot-dialog" extends="paper-action-dialog" transition="core-transition-center" layered="false">
|
||||
<script>
|
||||
Polymer({
|
||||
open: false,
|
||||
|
||||
openedChanged: function(oldValue, newValue) {
|
||||
this.open = newValue;
|
||||
},
|
||||
|
||||
openChanged: function(oldValue, newValue) {
|
||||
this.opened = newValue;
|
||||
},
|
||||
|
||||
show: function() {
|
||||
this.backdrop = false;
|
||||
this.autoCloseDisabled = false;
|
||||
this.setAttribute(opened, true);
|
||||
},
|
||||
showModal: function() {
|
||||
this.backdrop = true;
|
||||
this.autoCloseDisabled = true;
|
||||
this.open();
|
||||
this.setAttribute('opened', true);
|
||||
},
|
||||
close: function(retVal) {
|
||||
this.setAttribute('returnValue', retVal);
|
||||
this.removeAttribute(opened);
|
||||
this.super();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -686,14 +686,14 @@ function showProgress(message) {
|
||||
if (message) {
|
||||
progressDialog.getElementsByTagName('h1')[0].textContent = message;
|
||||
}
|
||||
if (!progressDialog.open) {
|
||||
if (!progressDialog.opened) {
|
||||
progressDialog.showModal();
|
||||
progressDialog.querySelector('.progress').classList.toggle('running');
|
||||
}
|
||||
}
|
||||
function closeProgressDialog() {
|
||||
var progressDialog = document.getElementById('progressDialog');
|
||||
if (progressDialog.open) {
|
||||
if (progressDialog.opened) {
|
||||
progressDialog.close();
|
||||
progressDialog.querySelector('.progress').classList.toggle('running');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user