Removed ve.init's dependencies on ve.ui styles

* Things broke when ve.ui stuff was refactored
* Save dialog is now completely stand-alone

This is an alterantive to Ib028e6967e8d2e158b05fd7582620c21cf9b85fb
which I believe is a better approach.

Change-Id: I7cb52d0750e859c4052e2008d929d197b88b9877
This commit is contained in:
Trevor Parscal 2012-11-05 10:32:09 -08:00
parent 138905e49c
commit 289e762812
2 changed files with 36 additions and 5 deletions

View file

@ -136,8 +136,14 @@
}
.ve-init-mw-viewPageTarget-saveDialog-closeButton {
right: .025em;
width: 22px;
position: absolute;
top: 0.5em;
right: 0.5em;
width: 1.5em;
height: 1.5em;
cursor: pointer;
filter: alpha(opacity=8);
opacity: 0.8;
/* @see ve.init.mw.Icons */
background-position: center center;
background-repeat: no-repeat;
@ -150,6 +156,21 @@
top: 0.25em;
right: 0.5em;
width: 29em;
font-family: sans-serif;
position: absolute;
border: solid 1px #ccc;
-webkit-border-radius: 0.25em;
-moz-border-radius: 0.25em;
-o-border-radius: 0.25em;
border-radius: 0.25em;
background-color: #fff;
-webkit-box-shadow: 0 0.15em 0.5em 0 rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0.15em 0.5em 0 rgba(0, 0, 0, 0.2);
box-shadow: 0 0.15em 0.5em 0 rgba(0, 0, 0, 0.2);
padding: 0.75em;
padding-top: 2.5em;
min-width: 15em;
z-index: 3;
}
.ve-init-mw-viewPageTarget-saveDialog-body {
@ -165,6 +186,16 @@
color: #999;
}
.ve-init-mw-viewPageTarget-saveDialog-title {
position: absolute;
top: 0;
left: 1em;
height: 2.8em;
line-height: 2.8em;
color: #333;
font-size: 0.9em;
}
.ve-init-mw-viewPageTarget-saveDialog-summary {
background-color: #fff;
border: solid 1px #cccccc;

View file

@ -30,7 +30,7 @@ ve.init.mw.ViewPageTarget = function VeInitMwViewPageTarget() {
this.$toolbarFeedbackButton =
$( '<div class="ve-init-mw-viewPageTarget-toolbar-feedbackButton"><a href="#"></a></div>' );
this.$saveDialog =
$( '<div class="ve-ui-inspector ve-init-mw-viewPageTarget-saveDialog"></div>' );
$( '<div class="ve-init-mw-viewPageTarget-saveDialog"></div>' );
this.$saveDialogSaveButton = null;
this.onBeforeUnloadFallback = null;
this.proxiedOnBeforeUnload = null;
@ -142,8 +142,8 @@ ve.init.mw.ViewPageTarget.compatibility = {
/*jshint multistr: true*/
ve.init.mw.ViewPageTarget.saveDialogTemplate = '\
<div class="ve-ui-inspector-title ve-init-mw-viewPageTarget-saveDialog-title"></div>\
<div class="ve-ui-inspector-button ve-init-mw-viewPageTarget-saveDialog-closeButton"></div>\
<div class="ve-init-mw-viewPageTarget-saveDialog-title"></div>\
<div class="ve-init-mw-viewPageTarget-saveDialog-closeButton"></div>\
<div class="ve-init-mw-viewPageTarget-saveDialog-body">\
<div class="ve-init-mw-viewPageTarget-saveDialog-summary">\
<label class="ve-init-mw-viewPageTarget-saveDialog-editSummary-label"\