Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some cosmetic changes to insert-menu
  • Loading branch information
torinfo committed Mar 20, 2015
1 parent dde2ae5 commit d76f585
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 22 deletions.
29 changes: 28 additions & 1 deletion editor/css/complex.css
Expand Up @@ -425,8 +425,30 @@ span.button-close-east:hover { background: url(../img/go-rt-on.gif) no-repeat c
}

/* INSERT MENU STYLES */
.ui-menu {
width: 250px;
}

#insert-info {
width: 60%; display: block; float: right;
}

.hide {
display: none;
}

.dark{
width: 100%;
height: 100%;
background: rgba(20,20,20,0.4);
z-index: 1;
display: none;
position: absolute;
}

#insert_menu {
position: absolute;
z-index: 100;
}

#insert_menu #menu, #insert_menu #menu > li > ul > li {
Expand Down Expand Up @@ -478,6 +500,10 @@ span.button-close-east:hover { background: url(../img/go-rt-on.gif) no-repeat c
margin: 5px;
}

.preview_thumb {
width: 250px;
}

/* XERTE ADDITIONS */
div.ui-layout-north div.content {
background-image:url(../img/TopBar.jpg);
Expand Down Expand Up @@ -653,4 +679,5 @@ td.flashonly, td.deprecated{

.hotspotLightboxImg {
width:400px;
}
}

4 changes: 3 additions & 1 deletion editor/js/toolbox.js
Expand Up @@ -58,7 +58,7 @@ var EDITOR = (function ($, parent) {
// it's a page type
} else if (itemData.item != undefined) {
var hint = itemData.hint != undefined ? '<p>' + itemData.hint + '</p>' : "";
hint = itemData.thumb != undefined ? '<div>' + language.insertDialog.$preview + ':</div><img alt="' + itemData.name + ' ' + language.insertDialog.$preview + '" src="modules/xerte/parent_templates/Nottingham/' + itemData.thumb + '" />' + hint : hint;
hint = itemData.thumb != undefined ? '<div>' + language.insertDialog.$preview + ':</div><img class="preview_thumb" alt="' + itemData.name + ' ' + language.insertDialog.$preview + '" src="modules/xerte/parent_templates/Nottingham/' + itemData.thumb + '" />' + hint : hint;
hint = hint != "" ? '<hr/>' + hint : hint;

var $insertInfo = $('<ul class="details"><li><a href="#"><div class="insert_buttons"/>' + hint + '</a></li></ul>'),
Expand Down Expand Up @@ -110,8 +110,10 @@ var EDITOR = (function ($, parent) {
collapseAll: function(e) {
if (e.type == "click" && e.target.id != "insert_button") {
$("#insert_menu").hide();
$("#shadow").hide();
} else if (e.type == "keydown" && $(e.target).parent().hasClass("insert_buttons")) {
$("#insert_menu").hide();
$("#shadow").hide();
parent.tree.addNode($(e.target).closest("[item]").attr("item"), $(e.target).attr("value"));
}
return this._super();
Expand Down
4 changes: 3 additions & 1 deletion editor/js/tree.js
Expand Up @@ -55,12 +55,14 @@ var EDITOR = (function ($, parent) {
// Add the buttons
do_buttons = function () {
var insert_page = function() {
$("#shadow").show();
$("#insert_menu")
.css({
"top": $(".pane-west").position().top + $(".pane-west .content").position().top,
"left": $(".pane-west").position().left
"left": $("#insert_button").position().left
})
.show();

},

delete_page = function() {
Expand Down
7 changes: 1 addition & 6 deletions modules/decision/edithtml.php
Expand Up @@ -144,12 +144,6 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
<style type="text/css"> body { font-size: 85%; } </style>
<![endif]-->

<style>
.ui-menu { width: 200px; }
#insert-info {width: 60%; display: block; float: right; }
.hide {display: none;}
</style>

</head>
<body>
<img id="loader" src="editor/img/loading16.gif" />
Expand Down Expand Up @@ -208,6 +202,7 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
</div>
</div>

<div id="shadow" class="dark" class="hide"></div>
<div id="insert_menu" class="hide"></div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Expand Down
7 changes: 1 addition & 6 deletions modules/site/edithtml.php
Expand Up @@ -144,12 +144,6 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
<style type="text/css"> body { font-size: 85%; } </style>
<![endif]-->

<style>
.ui-menu { width: 200px; }
#insert-info {width: 60%; display: block; float: right; }
.hide {display: none;}
</style>

</head>
<body>
<img id="loader" src="editor/img/loading16.gif" />
Expand Down Expand Up @@ -208,6 +202,7 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
</div>
</div>

<div id="shadow" class="dark" class="hide"></div>
<div id="insert_menu" class="hide"></div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Expand Down
9 changes: 2 additions & 7 deletions modules/xerte/edithtml.php
Expand Up @@ -183,12 +183,6 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
<style type="text/css"> body { font-size: 85%; } </style>
<![endif]-->

<style>
.ui-menu { width: 200px; }
#insert-info {width: 60%; display: block; float: right; }
.hide {display: none;}
</style>

</head>
<body>
<img id="loader" src="editor/img/loading16.gif" />
Expand Down Expand Up @@ -246,7 +240,8 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
<div id="checkbox_outer"><table><tr><td id="checkbox_holder"></td></tr></table></div>
</div>
</div>


<div id="shadow" class="dark" class="hide"></div>
<div id="insert_menu" class="hide"></div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Expand Down

0 comments on commit d76f585

Please sign in to comment.