$(".ne-add-el").click(function(){ var elid = $(this).parent().attr("id"); var elqty = $("#di-elqty").val(); if(elid!="" && elqty!="" && elqty !="0") { var msgb = $("#di-msg"); msgb.html("Adding Element..."); msgb.addClass("green"); msgb.fadeIn(); $.post(url, { me_action: "ELEMENTSUSEDADD", pid: pid, elid: elid, elqty: elqty}, addElementsToProductsDirectly, "html"); } }); function resizeUi() { var w = $(window).width(); $("#products-add-elements-tabs").css("width", w-300); $("#products-add-elements-tabs").css("margin-left", "240px"); $(".draft-comment-view-area").css("width", w-300); //$(".ui-tabs-panel").css("width", w-240 ); }; resizeUi(); '; $act_btn_funcs = ' $(".filters-act-btn").click(function(){ var elid = $(this).parents(".filters-lists-elements").attr("id"); $.post(url, { me_action: "ELEMENTSUSEDADDDIRECT", pid: pid, elid: elid, elqty: 1}, addElementsToProducts, "html"); }); '; $javascript .= $class_es->constructJS('<input class="filters-act-btn blue bold" type="button" title="Add this element to product" value="Add" />', $act_btn_funcs, array('box_width' => '245', 'box_min_height' => '250'));
<?php ######################################### # Author : D3W4 & SAHAT # # Created : Mar 10, 2011 3:40:53 PM # ######################################### use_class('elements_search'); $class_es = new elements_search(); if (isset($_POST['me_action'])) { $class_es->postProcess($_POST); } $content .= $class_es->createFilterBox(); $content .= $class_es->createResultBox(); $title = "Add Element"; $javascript = $class_es->constructJS();