Exemplo n.º 1
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= "pageJs.getResults(true, " . $this->pageSize . ");";
     $js .= "pageJs._bindSearchKey();";
     return $js;
 }
Exemplo n.º 2
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= 'pageJs';
     $js .= ".getResults(true, " . $this->pageSize . ");";
     return $js;
 }
Exemplo n.º 3
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $manufactureArray = $supplierArray = $statuses = $productCategoryArray = array();
     foreach (Manufacturer::getAll() as $os) {
         $manufactureArray[] = $os->getJson();
     }
     foreach (Supplier::getAll() as $os) {
         $supplierArray[] = $os->getJson();
     }
     foreach (ProductStatus::getAll() as $os) {
         $statuses[] = $os->getJson();
     }
     foreach (ProductCategory::getAll() as $os) {
         $productCategoryArray[] = $os->getJson();
     }
     $js = parent::_getEndJs();
     if (($product = Product::get($this->Request['id'])) instanceof Product) {
         $js .= "\$('searchPanel').hide();";
         $js .= "pageJs._singleProduct = true;";
     }
     $js .= 'pageJs._loadManufactures(' . json_encode($manufactureArray) . ')';
     $js .= '._loadSuppliers(' . json_encode($supplierArray) . ')';
     $js .= '._loadCategories(' . json_encode($productCategoryArray) . ')';
     $js .= '._loadProductStatuses(' . json_encode($statuses) . ')';
     $js .= "._loadChosen()";
     $js .= "._bindSearchKey()";
     $js .= ".setCallbackId('priceMatching', '" . $this->priceMatchingBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('toggleActive', '" . $this->toggleActiveBtn->getUniqueID() . "')";
     $js .= ".getResults(true, " . $this->pageSize . ");";
     return $js;
 }
Exemplo n.º 4
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= "pageJs";
     $js .= ".setCallbackId('updateInvoiceNo', '" . $this->updateInvoiceNoBtn->getUniqueID() . "')";
     $js .= ".init()";
     $js .= ".getResults(true, " . $this->pageSize . ");";
     return $js;
 }
Exemplo n.º 5
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $preloadData = array('supplierId' => trim($this->Request['supplierId']), 'invoiceNo' => isset($_REQUEST['invoiceNo']) ? trim($this->Request['invoiceNo']) : '');
     $js .= "pageJs";
     $js .= ".setPreloadData(" . json_encode($preloadData) . ")";
     $js .= ".getResults(true, " . $this->pageSize . ");";
     return $js;
 }
Exemplo n.º 6
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= "pageJs._bindSearchKey()";
     $js .= "._loadDataPicker()";
     $js .= ".setCallbackId('deactivateItems', '" . $this->deactivateItemBtn->getUniqueID() . "')";
     $js .= ".getResults(true, " . $this->pageSize . ");";
     return $js;
 }
Exemplo n.º 7
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= "pageJs.setHTMLID('searchPanel', 'searchPanel').setCallbackId('actionTask', '" . $this->actionTaskBtn->getUniqueID() . "');";
     $js .= "\$('searchBtn').click();";
     if (isset($_REQUEST['nosearch']) && intval($_REQUEST['nosearch']) === 1) {
         $js .= "\$(pageJs.getHTMLID('searchPanel')).hide();";
     }
     return $js;
 }
Exemplo n.º 8
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $statusOptions = RMA::getAllStatuses();
     $js = parent::_getEndJs();
     $js .= "pageJs._statusOptions=" . json_encode($statusOptions) . ";";
     $js .= "pageJs._bindSearchKey()";
     $js .= ".setCallbackId('deactivateItems', '" . $this->deactivateItemBtn->getUniqueID() . "')";
     $js .= ".getResults(true, " . $this->pageSize . ");";
     return $js;
 }
Exemplo n.º 9
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= "pageJs.setHTMLID('searchPanel', 'searchPanel')";
     $js .= ";";
     $js .= "\$('searchBtn').click();";
     if (isset($_REQUEST['nosearch']) && intval($_REQUEST['nosearch']) === 1) {
         $js .= "\$(pageJs.getHTMLID('searchPanel')).hide();";
     }
     return $js;
 }
Exemplo n.º 10
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $from = isset($this->Request['from']) ? $this->Request['from'] : '';
     $to = isset($this->Request['to']) ? $this->Request['to'] : '';
     $productId = isset($this->Request['productid']) ? $this->Request['productid'] : '';
     $js = parent::_getEndJs();
     $js .= "pageJs";
     $js .= "._bindSearchKey()";
     $js .= "._loadDataPicker()";
     $js .= ".setPreData(" . json_encode($from) . ", " . json_encode($to) . ", " . json_encode(($product = Product::get($productId)) instanceof Product ? $product->getJson() : '') . ")";
     $js .= ";";
     return $js;
 }
Exemplo n.º 11
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $applyToOptions = CreditNote::getApplyToTypes();
     $js = parent::_getEndJs();
     if (isset($_REQUEST['orderid']) && ($order = Order::get(trim($_REQUEST['orderid']))) instanceof Order) {
         $js .= "pageJs._order=" . json_encode($order->getJson()) . ";";
     }
     $js .= "pageJs._applyToOptions=" . json_encode($applyToOptions) . ";";
     $js .= "pageJs._bindSearchKey()";
     $js .= ".setCallbackId('deactivateItems', '" . $this->deactivateItemBtn->getUniqueID() . "')";
     $js .= ".init(true, " . $this->pageSize . ");";
     return $js;
 }
Exemplo n.º 12
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $statusOptions = PurchaseOrder::getStatusOptions();
     $js = parent::_getEndJs();
     $js .= "pageJs._status=" . json_encode($statusOptions) . ";";
     $js .= 'pageJs';
     $js .= ".setCallbackId('deactivateItems', '" . $this->deactivateItemBtn->getUniqueID() . "')";
     $js .= "._bindSearchKey()";
     $js .= "._loadChosen()";
     $js .= "._loadDataPicker();";
     $js .= "\$('searchBtn').click();";
     return $js;
 }
Exemplo n.º 13
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $manufactureArray = $supplierArray = $statuses = $productCategoryArray = array();
     foreach (Manufacturer::getAll() as $os) {
         $manufactureArray[] = $os->getJson();
     }
     foreach (Supplier::getAll() as $os) {
         $supplierArray[] = $os->getJson();
     }
     foreach (ProductStatus::getAll() as $os) {
         $statuses[] = $os->getJson();
     }
     foreach (ProductCategory::getAll() as $os) {
         $productCategoryArray[] = $os->getJson();
     }
     $js = parent::_getEndJs();
     if (($product = Product::get($this->Request['id'])) instanceof Product) {
         $js .= "\$('searchPanel').hide();";
         $js .= "pageJs._singleProduct = true;";
     }
     $js .= 'pageJs.totalValueId = "total-found-value";';
     $js .= 'pageJs.totalQtyId = "total-found-qty";';
     $js .= 'pageJs._loadManufactures(' . json_encode($manufactureArray) . ')';
     $js .= '._loadSuppliers(' . json_encode($supplierArray) . ')';
     $js .= '._loadCategories(' . json_encode($productCategoryArray) . ')';
     $js .= '._loadProductStatuses(' . json_encode($statuses) . ')';
     $js .= "._loadChosen()";
     $js .= "._bindSearchKey()";
     $js .= "._bindNewRuleBtn()";
     $js .= ".setCallbackId('priceMatching', '" . $this->priceMatchingBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('toggleActive', '" . $this->toggleActiveBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('toggleSellOnWeb', '" . $this->toggleSellOnWebBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('updatePrice', '" . $this->updatePriceBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('updateStockLevel', '" . $this->updateStockLevelBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('toggleIsKit', '" . $this->toggleIsKitBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('toggleManualFeed', '" . $this->toggleManualFeedBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('newRule', '" . $this->newRuleBtn->getUniqueID() . "')";
     $js .= ".getResults(true, " . $this->pageSize . ");";
     return $js;
 }
Exemplo n.º 14
0
 /**
  * (non-PHPdoc)
  * @see CRUDPageAbstract::_getEndJs()
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= "pageJs.setCallbackId('deleteItem', '" . $this->deleteItemBtn->getUniqueID() . "');";
     if (isset($_REQUEST['productid']) || isset($_REQUEST['purchaseorderid'])) {
         if (isset($_REQUEST['productid'])) {
             if (!($product = Product::get(trim($_REQUEST['productid']))) instanceof Product) {
                 die('Invalid Product Provided');
             }
             $js .= "\$('searchBtn').up('.panel').down('.panel-body').insert({'bottom': new Element('input', {'type': 'hidden', 'search_field': 'productid', 'value': '" . $product->getId() . "'}) });";
             $js .= "\$('searchBtn').up('.panel').hide();";
         }
         if (isset($_REQUEST['purchaseorderid'])) {
             if (!($purchaseOrder = PurchaseOrder::get(trim($_REQUEST['purchaseorderid']))) instanceof PurchaseOrder) {
                 die('Invalid PurchaseOrder Provided');
             }
             $js .= "\$('searchBtn').up('.panel').down('.panel-body').insert({'bottom': new Element('input', {'type': 'hidden', 'search_field': 'purchaseorderid', 'value': '" . $purchaseOrder->getId() . "'}) });";
             $js .= "\$('searchBtn').up('.panel').hide();";
         }
         $js .= "\$('searchBtn').click();";
     }
     $js .= "pageJs._bindSearchKey();";
     return $js;
 }