Permalink
Browse files

interface redesign, added hooks before every form element and listed …

…element, some bugfixes and mnor improvments
  • Loading branch information...
madalinungureanu committed Jan 16, 2012
1 parent 39af3ce commit 1eb27aebf47bff68696d5cec480ce7b74f7c2ae0
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -1,3 +1,25 @@
+.mb-list-entry-fields li{
+ margin-bottom:15px;
+ clear:both;
+ overflow:hidden;
+}
+
+.mb-right-column{
+ padding-left:200px;
+}
+
+.field-label{
+ width:190px;
+ float:left;
+ min-height:34px;
+ font-weight:bold;
+ padding-right:10px;
+}
+
+.mb-right-column label{
+ padding:0 6px 0 3px;
+}
+
#mb-ajax-loading{
position:absolute;
top:0;
@@ -7,29 +29,12 @@
background:url(images/ajax-loader.gif) center center no-repeat; z-index:999;
}
-.mbedit span{
- padding:0px 5px;
- background:url(images/settings.png) center center no-repeat;
-}
-.mbdelete span{
- padding:0px 5px;
- background:url(images/delete.png) center center no-repeat;
-}
-.mbadd{
- display:inline-block !important;
- padding:10px 20px !important;
+.mbdelete{
+ color:#BC0B0B;
}
-.mbadd span{
- padding:0px 5px;
- background:url(images/plus.png) center center no-repeat;
-}
-.mbupdate{
- display:inline-block !important;
- padding:10px 20px !important;
-}
-.mbupdate span{
- padding:2px 8px;
- background:url(images/save.png) center center no-repeat;
+
+.mbdelete:hover{
+ color:#FF0000;
}
.mb-list-entry-fields{
View
@@ -28,10 +28,12 @@ function addMeta(value, id, nonce){
else
values[key.toString()] = jQuery(this).val().toString();
- });
+ });
+
+ console.log(values);
jQuery.post( ajaxurl , { action:"wck_add_meta"+value, meta:value, id:id, values:values, _ajax_nonce:nonce}, function(response) {
- //alert(response);
+ console.log(response);
/* refresh the list */
jQuery.post( ajaxurl , { action:"wck_refresh_list"+value, meta:value, id:id}, function(response) {
@@ -145,16 +147,23 @@ jQuery(mb_sortable_elements);
/* show the update form */
function showUpdateFormMeta(value, id, element_id, nonce){
- jQuery('#'+value).parent().css({'opacity':'0.4', 'position':'relative'}).append('<div id="mb-ajax-loading"></div>');
-
- jQuery( '#container_' + value + " tbody" ).sortable("disable");
-
- jQuery.post( ajaxurl , { action:"wck_show_update"+value, meta:value, id:id, element_id:element_id, _ajax_nonce:nonce}, function(response) {
- //jQuery('#container_'+value+' #element_'+element_id).append(response);
- jQuery(response).insertAfter('#container_'+value+' #element_'+element_id);
- jQuery('#'+value).parent().css('opacity','1');
- jQuery('#mb-ajax-loading').remove();
- });
+ if( jQuery( '#update_container_' + value + '_' + element_id ).length == 0 ){
+ jQuery('#'+value).parent().css({'opacity':'0.4', 'position':'relative'}).append('<div id="mb-ajax-loading"></div>');
+
+ jQuery( '#container_' + value + " tbody" ).sortable("disable");
+
+ jQuery.post( ajaxurl , { action:"wck_show_update"+value, meta:value, id:id, element_id:element_id, _ajax_nonce:nonce}, function(response) {
+ //jQuery('#container_'+value+' #element_'+element_id).append(response);
+ jQuery(response).insertAfter('#container_'+value+' #element_'+element_id);
+ jQuery('#'+value).parent().css('opacity','1');
+ jQuery('#mb-ajax-loading').remove();
+ });
+ }
+}
+
+/* remove the update form */
+function removeUpdateForm( id ){
+ jQuery( '#'+id ).remove();
}
/* update reccord */
Oops, something went wrong.

0 comments on commit 1eb27ae

Please sign in to comment.