Commit 69dffdf2 authored by Robert Lyon's avatar Robert Lyon
Browse files

Allow imagebrowser tabs to work outside block edit page (Bug #1440930)



Includes adding overlay div

Change-Id: Iff8bb1472ddda84ab622420193a36018fcbdac9b
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 0d432019
......@@ -22,6 +22,14 @@ tinymce.PluginManager.add('imagebrowser', function(editor) {
}
function loadImageBrowser() {
// Check to see if we need to add an overlay. In block edit
// page we don't as the configure form already has overlay but
// elsewhere we do.
var addoverlay = false;
if (!jQuery('#overlay').length) {
jQuery('body').append(jQuery('<div>').attr('id', 'overlay'));
addoverlay = true;
}
var formname = '#imgbrowserconf';
var win, data = {}, dom = editor.dom, imgElm = editor.selection.getNode();
var width, height;
......@@ -246,6 +254,10 @@ tinymce.PluginManager.add('imagebrowser', function(editor) {
});
jQuery('#imagebrowser').remove();
}, 1);
if (addoverlay) {
// we need to remove the overlay we added
jQuery('#overlay').remove();
}
}
function getFormVals() {
......
......@@ -73,15 +73,13 @@ tr.highlight-file td {
fieldset {
border: 1px solid #BEE3F1;
}
.pseudofieldset .pseudolegend {
background-color: #080d0f;
}
fieldset.collapsed legend a,
.pseudofieldset.collapsed .pseudolegend a,
.pseudofieldset .pseudolegend,
fieldset.collapsible legend a,
.pseudofieldset.collapsible .pseudolegend a,
fieldset.collapsed legend a,
.pseudofieldset.collapsed .pseudolegend a,
.no-js fieldset.collapsed legend a {
background-color: #080d0f;
background-color: #080D0F;
}
/******************** Buttons ********************/
/* Buttons to override with colour */
......
......@@ -764,7 +764,7 @@ legend h4,
margin-top: -28px;
float: left;
padding: 0 2px;
background-color: #ffffff;
background-color: #FFFFFF;
}
.pseudofieldset.collapsed .pseudolegend {
margin-top: -8px;
......@@ -1920,7 +1920,8 @@ div.rel {
.rd-tab-title {
display: none;
}
ul.in-page-tabs {
ul.in-page-tabs,
ul.artefactchooser-tabs {
font-size: 1.167em;
list-style: none;
margin: 0;
......@@ -1929,7 +1930,8 @@ ul.in-page-tabs {
z-index: 1;
clear: both;
}
ul.in-page-tabs li {
ul.in-page-tabs li,
ul.artefactchooser-tabs li {
display: table-cell;
padding: 0;
margin: 0;
......@@ -1941,7 +1943,11 @@ ul.in-page-tabs li a:visited,
ul.in-page-tabs li a:active,
ul.in-page-tabs li input.linkbtn,
ul.in-page-tabs li button.linkbtn,
ul.searchtab li span.inactive {
ul.searchtab li span.inactive,
ul.artefactchooser-tabs li a,
ul.artefactchooser-tabs li a:link,
ul.artefactchooser-tabs li a:visited,
ul.artefactchooser-tabs li a:active {
text-decoration: none;
display: inline-block;
padding: 10px 6px;
......@@ -1957,7 +1963,10 @@ ul.in-page-tabs li a.current-tab:link,
ul.in-page-tabs li a.current-tab:visited,
ul.in-page-tabs li a.current-tab:active,
ul.in-page-tabs li input.current-tab,
ul.in-page-tabs li button.current-tab {
ul.in-page-tabs li button.current-tab,
ul.artefactchooser-tabs li.current a,
ul.artefactchooser-tabs li.current a:link,
ul.artefactchooser-tabs li.current a:visited {
color: #333333;
text-decoration: none;
cursor: default;
......@@ -1966,12 +1975,17 @@ ul.in-page-tabs li button.current-tab {
background: 0;
}
ul.in-page-tabs li a:focus,
ul.in-page-tabs li a.current-tab:focus {
ul.in-page-tabs li a.current-tab:focus,
ul.artefactchooser-tabs li a:active,
ul.artefactchooser-tabs li a:focus,
ul.artefactchooser-tabs li.current a:active,
ul.artefactchooser-tabs li.current a:focus {
outline: none;
background: #D4D4D4;
}
/* tab body */
.subpage {
.subpage,
#artefactchooser-body {
border: 1px solid #D4D4D4;
padding: 10px;
margin-top: -1px;
......@@ -1982,6 +1996,29 @@ ul.in-page-tabs li a.current-tab:focus {
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
/* sub tabs */
ul.artefactchooser-subtabs {
margin: 10px 0;
padding: 0;
line-height: 2em;
list-style: none;
}
ul.artefactchooser-subtabs li {
display: inline;
padding: 0 5px;
margin: 0;
}
ul.artefactchooser-subtabs li.current a,
ul.artefactchooser-subtabs li.current a:link,
ul.artefactchooser-subtabs li.current a:visited,
ul.artefactchooser-subtabs li.current a:active {
font-weight: bold;
text-decoration: none;
color: #333333;
}
ul.artefactchooser-subtabs li.showrightborder {
border-right: 1px solid #D1D1D1;
}
/******************** Sidebar ********************/
/* general sidebar styles */
.sideblock {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment