Esempio n. 1
0
 public function getHtml()
 {
     $gridId = $gridHtmlObjName = '';
     if ($this->getColumn() && $this->getColumn()->getGrid()) {
         $gridHtmlObjName = $this->getColumn()->getGrid()->getJsObjectName();
         $gridId = $this->getColumn()->getGrid()->getId();
     }
     if (Mage::getStoreConfigFlag('udropship/vendor/autocomplete_htmlselect')) {
         $html = '<input id="_autocomplete_' . $this->_getHtmlId() . '" class="input-text" name="_autocomplete_' . $this->_getHtmlName() . '" value="' . $this->getEscapedNameValue() . '" ' . $this->serialize($this->getHtmlAttributes()) . '/>' . "\n";
         $html .= '
         <input type="hidden" name="' . $this->_getHtmlName() . '" id="' . $this->_getHtmlId() . '" value="' . $this->getEscapedValue() . '">
         <div class="autocomplete" style="display: none; font-weight:bold;" id="_autocomplete_container_' . $this->_getHtmlId() . '"></div>
         <script type="text/javascript">
         	var acObserve = function(){
             	if ($("_autocomplete_' . $this->_getHtmlId() . '").value=="") $("' . $this->_getHtmlId() . '").value = ""
         	}
         	$("_autocomplete_' . $this->_getHtmlId() . '").observe("change", acObserve)
         	varienGlobalEvents.attachEventHandler("uGridInitAfter", function(gridObj) {
         		if (gridObj.containerId=="' . $gridId . '") {
     				gridObj.filterKeyPress = gridObj.filterKeyPress.wrap(function(proceed, event){
     					acObserve()
     					proceed(event)
     				})
     			}
     		})
         	new Ajax.Autocompleter(
                 "_autocomplete_' . $this->_getHtmlId() . '",
                 "_autocomplete_container_' . $this->_getHtmlId() . '",
                 "' . Mage::getModel('core/url')->getUrl('udropship/index/vendorAutocomplete') . '",
                 {
                     paramName: "vendor_name",
                     method: "get",
                     minChars: 2,
                     updateElement: function(el) {
                         $("' . $this->_getHtmlId() . '").value = el.title;
                         $("_autocomplete_' . $this->_getHtmlId() . '").value = el.innerHTML.stripTags();
         			},
                     onShow : function(element, update) {
                         if(!update.style.position || update.style.position=="absolute") {
                             update.style.position = "absolute";
                             Position.clone(element, update, {
                                 setHeight: false,
                                 offsetTop: element.offsetHeight
                             });
                         }
                         Effect.Appear(update,{duration:0});
                     }
 
 	            }
 	        )
         </script>        	
         ';
         self::$_gridInit = true;
     } else {
         $html = parent::getHtml();
     }
     return $html;
 }
 public function getHtml()
 {
     return '<span class="head-massaction">' . parent::getHtml() . '</span>';
 }
Esempio n. 3
0
 public function __construct()
 {
     self::$_statuses = array(null => null, Mage_Newsletter_Model_Queue::STATUS_SENT => Mage::helper('customer')->__('Sent'), Mage_Newsletter_Model_Queue::STATUS_CANCEL => Mage::helper('customer')->__('Cancel'), Mage_Newsletter_Model_Queue::STATUS_NEVER => Mage::helper('customer')->__('Not Sent'), Mage_Newsletter_Model_Queue::STATUS_SENDING => Mage::helper('customer')->__('Sending'), Mage_Newsletter_Model_Queue::STATUS_PAUSE => Mage::helper('customer')->__('Paused'));
     parent::__construct();
 }
 public function __construct()
 {
     $this->_triggers = array(null => null, Crizza_Stock_Model_Variation::TRIGGER_ADMIN => $this->__('Admin'), Crizza_Stock_Model_Variation::TRIGGER_API => $this->__('Api'), Crizza_Stock_Model_Variation::TRIGGER_PURCHASE => $this->__('Purchase'));
     parent::__construct();
 }