From c3fb50d47020c0f453fbbbea444240f9c2c3d194 Mon Sep 17 00:00:00 2001 From: sanj Date: Fri, 9 Jul 2010 21:49:47 +0530 Subject: [PATCH] styling of resources bin --- edgware/static/css/editor.css | 60 ++++++++++++++++++++++++-------- edgware/static/js/placeholder.js | 19 ++++++++++ edgware/templates/editor.html | 25 +++++++------ 3 files changed, 80 insertions(+), 24 deletions(-) create mode 100644 edgware/static/js/placeholder.js diff --git a/edgware/static/css/editor.css b/edgware/static/css/editor.css index 5d150c1..50f2f69 100644 --- a/edgware/static/css/editor.css +++ b/edgware/static/css/editor.css @@ -39,13 +39,15 @@ p { .newTextBox { background-color:grey; - padding-top:10px; border-style:solid; border-width:1px; height:13px; - width:140px; + width:78px; font-size: 11px; + float: left; + padding: 10px; cursor: move; + margin-left: 7px; } .arabic { @@ -158,14 +160,21 @@ p { width: 16px; } +.placeholder { + font-size: 11px; + color: #808080; + font-style: italic; +} .navControls { - background-color:lightgrey; border-bottom-style:solid; border-bottom-width:1px; - font-size:13px; + font-size:11px; width: 100%; height: 30px; + font-weight: bold; + position: relative; + text-align: center; /* margin-left: -10px; */ } @@ -174,7 +183,7 @@ p { border-width:1px; left: 850px; top: 20px; - width: 300px; + width: 224px; height: 90%; position:fixed; } @@ -188,7 +197,6 @@ p { #searchCat { - background-color:lightgrey; margin-left: auto; margin-right: auto; padding-top:10px; @@ -198,6 +206,7 @@ p { .searchBin { margin-top:5px; + font-size: 11px; } #addElements a { @@ -205,18 +214,41 @@ p { text-decoration:none; } +.nextPage { + display: block; + position: absolute; + right: 4px; +} + +.prevPage { + display: block; + position: absolute; + left: 4px; +} + +#searchSelect { + width: 208px; + font-size: 12px; + margin-left: 7px; +} + #addElements { - width: 80%; - margin-left: auto; - margin-right: auto; - background-color:lightgrey; +/* background-color:lightgrey; */ padding-left:0px; padding-top:15px; height:60px; - background-color:grey; +/* background-color:grey; */ color:white; - border-style:solid; - border-width:1px; +} + +.addTextBoxWrapper { + width: 250px; + margin-left: auto; + margin-right: auto; +} + +.addTextBoxWrapper .english { + } .resource { @@ -256,7 +288,7 @@ p { } .binResources { - padding-top: 60px; + padding-top: 20px; } .textbox_canvas_toolbox a { diff --git a/edgware/static/js/placeholder.js b/edgware/static/js/placeholder.js new file mode 100644 index 0000000..22e0912 --- /dev/null +++ b/edgware/static/js/placeholder.js @@ -0,0 +1,19 @@ +$(document).ready(function() { + $('.placeholder').each(function() { + var that = this; + $(this).data("placeholder", $(that).attr("data-placeholder")); + $(this).val($(this).data("placeholder")); + $(this).focus(function() { + if ($(this).val() == $(this).data("placeholder")) { + $(this).val(''); + $(this).removeClass("placeholder"); + } + }); + $(this).blur(function() { + if ($.trim($(this).val()) == '') { + $(this).val($(this).data("placeholder")); + $(this).addClass("placeholder"); + } + }); + }); +}); diff --git a/edgware/templates/editor.html b/edgware/templates/editor.html index 678ec33..9e083c1 100644 --- a/edgware/templates/editor.html +++ b/edgware/templates/editor.html @@ -15,6 +15,7 @@ + @@ -194,28 +195,32 @@
+
+
+ + TEXTBOX +
+
+ إضافة مربع +
+
+
+
-
-
-
- + TEXTBOX -
-
- إضافة مربع -
+
+