diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index cf9e436f03f0311e01d63976b2e96e51cba5a085..c8816df725678398c73accf37f340c2f903c0a3d 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,3 +1,53 @@ +2.0.0.0-dev39 +============= +* Visual design editor improvements: + * VDE changes can be saved to DB for current store and theme. Layout updates composed by VDE are combined into one record + * Introduced temporary layout changes which should store non-applied modifications made during VDE functioning. Added new column `updated_at` to `core_layout_update` table for this, added observers and cron jobs to clean outdated layout updates + * Added `vde/` prefix to all links inside VDE frame + * Disabled caching (layout, blocks HTML, etc) in Design mode + * Reviewed and improved "Quit" action to properly cleanup session, cache and cookies + * Visual enhancements added when block is being dragged (block display, highlighting, cursor shape) + * Added ability to set placeholder for a draggable block in VDE canvas + * Fixed sorting of items within container + * Improved logic of VDE canvas iframe sizing according to window size to have one scroll bar and static toolbar at the bottom of the page +* Improved themes management: + * New separate tab on theme edit page which allows to view and download CSS files used on frontend. Files are divided to framework files, library files and theme files + * Added an ability to upload and store custom CSS file which can be applied on frontend + * Improved renaming of virtual themes, restricted modifying of physical themes +* Implemented changes in product creation process in admin interface: + * Added "Variations" block with configurable product attributes in "General" tab. With this block all final prices of configurable product variations can be easily added and configured in one place. Easy sorting mechanism helps understand the order of applying price modifications. "Variations" block can be reloaded itself without reloading all product creation page. All product variations are being created automatically with saving the parent configurable product + * Improved image management control. Multiple image control is placed in General tab. It provides easier upload and basic management of product's images than image gallery does. + * Changed Save button on product edit page. Save button is implemented as a split-button with the following options: "Save & New", "Save & Duplicate", "Save & Close" +* Changed representation of a configurable product's image on frontend to use product's variation image instead of parent product's one +* Implemented js-plugin `mage` to give an ability to extend Magento js-code and modify initializing parameters during the runtime. Replaced instantiation of `form` and `validation` instances with `mage` widget +* Implemented autocomplete js-component on backend based on jQuery-ui +* Refactored frontend design theme to use jQuery library instead of Prototype for the following frontend components: + * Varien Product class – class handles product price calculations on the client side as product price options are changed: `Product.Config`, `Product.Zoom`, `Product.Super`, `Product.OptionsPrice` + * `RegionUpdater` & `ZipUpdater` classes – classes handle dynamically changing State/Province field from drop down to text field depending on selected country. They also handle "required" setting for State/Province and Zip/Postal Code fields. + * `Varien.searchForm` – class handles quick search autocomplete functionality +* `VarienForm` class is deprecated +* Improved floating toolbar in backend +* Refactored the following grids in backend to make them configurable through layout, rather than hard-coded: `Mage_Adminhtml_Block_Newsletter_Queue_Grid`, `Mage_Adminhtml_Block_Report_Refresh_Statistics` +* Dependency injection improvements: + * Added ability to generate proxy and factory classes on-the-fly for use with DI implementations. Generators can be managed in DI configuration + * Implemented tools (shell scripts) that allow generating skeletons of factory and proxy classes for use with DI implementations + * Added ability to set preferences to object manager and specify them through configuration +* Refactored the following modules to utilize `Magento_Filesystem` library instead of using built-in PHP core functions directly: `Mage_Adminhtml`, `Mage_Backend`, `Mage_Backup`, `Mage_Captcha`, `Mage_Catalog`, `Mage_Cms`, `Mage_Connect`, `Mage_Core`, `Mage_Install` +* Bug fixes: + * Fixed bug with incorrect order processing in `Mage_Authorizenet_Model_Directpost` + * Fixed bug with unnecessary "loading" image on Category field during product editing in backend + * Fixed bug in `Mage_Adminhtml_CustomerController` with error message during subscription to newsletter + * Fixed bug in custom option template with incorrect import of custom option during product creation + * Fixed JavaScript bug with image uploader control on product edit page on backend in IE9 + * Fixed bug with incorrect CSS directives in `app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml` + * Replaced usages of Validation Prototype class with jQuery analog in modules `Manage Attributes Sets`, `Reports` and `Order` + * Fixed bug with Javascript errors in "accordion" tabs and incorrect tab content during product creation. + * Fixed XSS vulnerability in configurable product on backend product page + * Fixed inability to update values in PayPal system configuration + * Fixed "The command line is too long" error triggered by static code analysis CLI tools when the lists become too large + * Fixed inability to create shipping label for DHL caused by wrong logo image path + * Fixed inactive navigation menu item of "Import/Export Tax Rates" page + 2.0.0.0-dev38 ============= * Changed application initialization procedure diff --git a/app/Mage.php b/app/Mage.php index 7efc86ed8a56f65e7c4faceff04624f1a68c0bd7..6629187adfc32230e93d27b532762af0eeaf3ee2 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -163,7 +163,7 @@ final class Mage 'revision' => '0', 'patch' => '0', 'stability' => 'dev', - 'number' => '38', + 'number' => '39', ); } @@ -638,15 +638,6 @@ final class Mage return self::$_app; } - /** - * @static - * @param string $areaCode - */ - public static function setCurrentArea($areaCode) - { - self::getObjectManager()->loadAreaConfiguration($areaCode); - } - /** * @static * @param string $code diff --git a/app/bootstrap.php b/app/bootstrap.php index 3f0ecab940d05a13e034cd5ed24105145cc46de9..22da0bd5b7a7099a2ea0af1a05365f33b7b1f2aa 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -100,6 +100,7 @@ Magento_Autoload_IncludePath::addIncludePath(array( BP . DS . 'app' . DS . 'code' . DS . 'community', BP . DS . 'app' . DS . 'code' . DS . 'core', BP . DS . 'lib', + BP . DS . 'var' . DS . 'generation', )); $classMapPath = BP . DS . 'var/classmap.ser'; if (file_exists($classMapPath)) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php index 13d1e1441baff8c8eeca046231dbee1c77e1c779..392930b231906cf42518799110e8e68c7fec8dab 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php @@ -69,8 +69,10 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit extends Mage_Adminhtml array( 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), 100 @@ -78,8 +80,10 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit extends Mage_Adminhtml } $this->_updateButton('save', 'label', Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute')); - $this->_updateButton('save', 'data_attr', array( - 'widget-button' => array('event' => 'save', 'related' => '#edit_form') + $this->_updateButton('save', 'data_attribute', array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#edit_form'), + ), )); if (!Mage::registry('entity_attribute') || !Mage::registry('entity_attribute')->getIsUserDefined()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php index f4a1820b453d186844a6a0d0e4e6c04f1715fb8d..d0e79eeb1c1996a180969f41251b2fca2ea87412 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php @@ -41,9 +41,11 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Toolbar_Add extends Mag $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#set-prop-form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#set-prop-form'), + ), + ), )); $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'), diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php index ee6d79248376f51b8f35d8588c3b16d3a9d439b6..899686dbed451a0653a2ff894ce2495b55ee7114 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php @@ -61,17 +61,17 @@ class Mage_Adminhtml_Block_Catalog_Product_Created extends Mage_Adminhtml_Block_ } /** - * Indentifies edit mode of popup + * Identifies edit mode of popup * * @return boolean */ public function isEdit() { - return (bool) $this->getRequest()->getParam('edit'); + return (bool)$this->getRequest()->getParam('edit'); } /** - * Retrive serialized json with configurable attributes values of simple + * Retrieve serialized json with configurable attributes values of simple * * @return string */ @@ -91,41 +91,43 @@ class Mage_Adminhtml_Block_Catalog_Product_Created extends Mage_Adminhtml_Block_ return Mage::helper('Mage_Core_Helper_Data')->jsonEncode($result); } + /** + * Retrieve array of attributes + * + * @return array + */ public function getAttributes() { - if ($this->getConfigurableProduct()->getId()) { - return $this->getConfigurableProduct() + $configurableProduct = $this->getConfigurableProduct(); + if ($configurableProduct->getId()) { + return $configurableProduct ->getTypeInstance() - ->getUsedProductAttributes($this->getConfigurableProduct()); + ->getUsedProductAttributes($configurableProduct); } $attributes = array(); - $attributesIds = $this->getRequest()->getParam('required'); if ($attributesIds) { - $attributesIds = explode(',', $attributesIds); - foreach ($attributesIds as $attributeId) { - $attribute = $this->getProduct() - ->getTypeInstance() - ->getAttributeById($attributeId, $this->getProduct()); - if (!$attribute) { - continue; + $product = $this->getProduct(); + $typeInstance = $product->getTypeInstance(); + foreach (explode(',', $attributesIds) as $attributeId) { + $attribute = $typeInstance->getAttributeById($attributeId, $product); + if ($attribute) { + $attributes[] = $attribute; } - $attributes[] = $attribute; } } - return $attributes; } /** - * Retrive configurable product for created/edited simple + * Retrieve configurable product for created/edited simple * * @return Mage_Catalog_Model_Product */ public function getConfigurableProduct() { - if (is_null($this->_configurableProduct)) { + if ($this->_configurableProduct === null) { $this->_configurableProduct = Mage::getModel('Mage_Catalog_Model_Product') ->setStore(0) ->load($this->getRequest()->getParam('product')); @@ -134,17 +136,17 @@ class Mage_Adminhtml_Block_Catalog_Product_Created extends Mage_Adminhtml_Block_ } /** - * Retrive product + * Retrieve product * * @return Mage_Catalog_Model_Product */ public function getProduct() { - if (is_null($this->_product)) { + if ($this->_product === null) { $this->_product = Mage::getModel('Mage_Catalog_Model_Product') ->setStore(0) ->load($this->getRequest()->getParam('id')); } return $this->_product; } -} // Class Mage_Adminhtml_Block_Catalog_Product_Created End +} diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php index 071522a8e93c853f6494c3e5829123d46d8712c3..1191baec997544c16c53e5bcc19b99f4a2bb073c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php @@ -60,68 +60,57 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit extends Mage_Adminhtml_Block_Wid { if (!$this->getRequest()->getParam('popup')) { $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'), - 'onclick' => 'setLocation(\'' - . $this->getUrl('*/*/', array('store'=>$this->getRequest()->getParam('store', 0))).'\')', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'), + 'onclick' => 'setLocation(\'' + . $this->getUrl('*/*/', array('store' => $this->getRequest()->getParam('store', 0))) . '\')', 'class' => 'back' )); } else { $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Close Window'), - 'onclick' => 'window.close()', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Close Window'), + 'onclick' => 'window.close()', 'class' => 'cancel' )); } if (!$this->getProduct()->isReadonly()) { if (!$this->getProduct()->isConfigurable() || !$this->getIsConfigured()) { - $this->addChild('change_attribute_set_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Change Attribute Set'), - 'onclick' => "jQuery('#attribute-set-info').dialog('open');" - )); + $this->addChild( + 'change_attribute_set_button', + 'Mage_Backend_Block_Widget_Button', + array( + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Change Attribute Set'), + 'onclick' => "jQuery('#attribute-set-info').dialog('open');", + 'id' => 'change-attribute-set-button' + ) + ); } $this->addChild('reset_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'), - 'onclick' => 'setLocation(\''.$this->getUrl('*/*/*', array('_current'=>true)).'\')' - )); - - $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save'), - 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#product-edit-form') - ) + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'), + 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/*', array('_current' => true)) . '\')' )); } if (!$this->getRequest()->getParam('popup')) { - if (!$this->getProduct()->isReadonly()) { - $this->addChild('save_and_edit_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save and Continue Edit'), - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#product-edit-form') - ), - 'class' => 'save' - )); - } if ($this->getProduct()->isDeleteable()) { $this->addChild('delete_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete'), - 'onclick' => 'confirmSetLocation(\'' - . Mage::helper('Mage_Catalog_Helper_Data')->__('Are you sure?').'\', \''.$this->getDeleteUrl().'\')', - 'class' => 'delete' - )); - } - - if ($this->getProduct()->isDuplicable()) { - $this->addChild('duplicate_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Duplicate'), - 'onclick' => 'setLocation(\'' . $this->getDuplicateUrl() . '\')', - 'class' => 'add' + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete'), + 'onclick' => 'confirmSetLocation(\'' + . Mage::helper('Mage_Catalog_Helper_Data')->__('Are you sure?') . '\', \'' . $this->getDeleteUrl() . '\')', + 'class' => 'delete' )); } } + if (!$this->getProduct()->isReadonly()) { + $this->addChild('save-split-button', 'Mage_Backend_Block_Widget_Button_Split', array( + 'id' => 'save-split-button', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save'), + 'class_name' => 'Mage_Backend_Block_Widget_Button_Split', + 'button_class' => 'widget-button-save', + 'options' => $this->_getSaveSplitButtonOptions() + )); + } return parent::_prepareLayout(); } @@ -166,6 +155,16 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit extends Mage_Adminhtml_Block_Wid return $this->getChildHtml('duplicate_button'); } + /** + * Get Save Split Button html + * + * @return string + */ + public function getSaveSplitButtonHtml() + { + return $this->getChildHtml('save-split-button'); + } + public function getValidationUrl() { return $this->getUrl('*/*/validate', array('_current'=>true)); @@ -308,4 +307,58 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit extends Mage_Adminhtml_Block_Wid } return $attributes; } + + /** + * Get dropdown options for save split button + * + * @return array + */ + protected function _getSaveSplitButtonOptions() + { + $options = array(); + if (!$this->getRequest()->getParam('popup')) { + $options[] = array( + 'id' => 'edit-button', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save & Edit'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#product-edit-form'), + ), + ), + 'default' => true, + ); + } + $options[] = array( + 'id' => 'new-button', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save & New'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndNew', 'target' => '#product-edit-form'), + ), + ), + ); + if (!$this->getRequest()->getParam('popup') && $this->getProduct()->isDuplicable()) { + $options[] = array( + 'id' => 'duplicate-button', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save & Duplicate'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => '', 'target' => '#product-edit-form'), + ), + ), + 'onclick' => $this->getRequest()->getActionName() == 'new' ? '' + : 'setLocation(\'' . $this->getDuplicateUrl() . '\')', + ); + } + $options[] = array( + 'id' => 'close-button', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save & Close'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#product-edit-form'), + ), + ), + ); + return $options; + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php index f50a31d8489bdea70385d49bd1d0c6266c781458..d4b92ae39668f6fbdc21147bfa816b309eb939f5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php @@ -51,9 +51,11 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute extends Mage_Ad $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#attributes-edit-form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#attributes-edit-form'), + ), + ), )); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/AttributeSet.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/AttributeSet.php index f34318e32af82397d38612dd6b4ed437a35d5955..517c73d76d11216bc7418745b8e3fa21b9697a7f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/AttributeSet.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/AttributeSet.php @@ -36,10 +36,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet extends Mage_Backen protected function _prepareForm() { $form = new Varien_Data_Form(); - - $fieldset = $form->addFieldset('settings', array( - 'legend' => Mage::helper('Mage_Catalog_Helper_Data')->__('Product Settings') - )); + $fieldset = $form->addFieldset('settings', array()); $entityType = Mage::registry('product')->getResource()->getEntityType(); @@ -53,15 +50,10 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet extends Mage_Backen ->load() ->toOptionArray() )); - - $fieldset->addField( - 'type_id', - 'hidden', - array( - 'name' => 'type_id', - 'value' => Mage::registry('product')->getTypeId(), - ) - ); + $fieldset->addField('type_id', 'hidden', array( + 'name' => 'type_id', + 'value' => Mage::registry('product')->getTypeId(), + )); $this->setForm($form); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php index 822d03ee16f6eaa860f8c356187f75e2c22333f5..78a39205fbc38f1a729b5bc181cbb0f04b6b8835 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php @@ -130,6 +130,26 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config extends Mage_Ad )); } + $this->addChild( + 'generate', + 'Mage_Backend_Block_Widget_Button', + array( + 'id' => 'generate-variations-button', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Generate Variations'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'generate', + 'target' => '#product-variations-matrix', + 'eventData' => array( + 'url' => $this->getUrl('*/*/variationsMatrix', array('_current' => true)), + ), + ), + ), + ), + ) + ); + return parent::_prepareLayout(); } @@ -150,20 +170,38 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config extends Mage_Ad */ public function getAttributes() { - $attributes = (array)$this->_getProductType()->getConfigurableAttributesAsArray($this->_getProduct()); - foreach ($attributes as &$attribute) { - if (isset($attribute['values']) && is_array($attribute['values'])) { - foreach ($attribute['values'] as &$attributeValue) { - if (!$this->getCanReadPrice()) { - $attributeValue['pricing_value'] = ''; - $attributeValue['is_percent'] = 0; + if (!$this->hasData('attributes')) { + $attributes = (array)$this->_getProductType()->getConfigurableAttributesAsArray($this->_getProduct()); + $productData = (array)$this->getRequest()->getParam('product'); + if (isset($productData['configurable_attributes_data'])) { + $configurableData = $productData['configurable_attributes_data']; + foreach ($attributes as $key => &$attribute) { + if (isset($configurableData[$key])) { + $attribute['values'] = array_merge( + isset($attribute['values']) ? $attribute['values'] : array(), + isset($configurableData[$key]['values']) + ? array_filter($configurableData[$key]['values']) + : array() + ); } - $attributeValue['can_edit_price'] = $this->getCanEditPrice(); - $attributeValue['can_read_price'] = $this->getCanReadPrice(); } } + + foreach ($attributes as &$attribute) { + if (isset($attribute['values']) && is_array($attribute['values'])) { + foreach ($attribute['values'] as &$attributeValue) { + if (!$this->getCanReadPrice()) { + $attributeValue['pricing_value'] = ''; + $attributeValue['is_percent'] = 0; + } + $attributeValue['can_edit_price'] = $this->getCanEditPrice(); + $attributeValue['can_read_price'] = $this->getCanReadPrice(); + } + } + } + $this->setData('attributes', $attributes); } - return $attributes; + return $this->getData('attributes'); } /** @@ -263,21 +301,6 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config extends Mage_Ad ); } - /** - * Retrieve Quick create product URL - * - * @return string - */ - public function getQuickCreationUrl() - { - return $this->getUrl( - '*/*/quickCreate', - array( - 'product' => $this->_getProduct()->getId() - ) - ); - } - /** * Retrieve Required attributes Ids (comma separated) * @@ -357,51 +380,4 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config extends Mage_Ad ? array_filter($this->_getProductType()->getUsedProductAttributes($this->_getProduct())) : array(); } - - /** - * Retrieve all possible attribute values combinations - * - * @return array - */ - public function getVariations() - { - $attributesCount = 0; - $variationalAttributes = array(); - $usedProductAttributes = $this->getSelectedAttributes(); - foreach ($usedProductAttributes as $attribute) { - /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ - $variationalAttributes[] = array( - 'id' => $attribute->getId(), - 'values' => $attribute->getSource()->getAllOptions(false), - ); - $attributesCount++; - } - - $variations = array(); - $currentVariation = array_fill(0, $attributesCount, 0); - $variationalAttributes = array_reverse($variationalAttributes); - $lastAttribute = $attributesCount - 1; - do { - for ($attributeIndex = 0; $attributeIndex < $attributesCount - 1; ++$attributeIndex) { - if ($currentVariation[$attributeIndex] >= count($variationalAttributes[$attributeIndex]['values'])) { - $currentVariation[$attributeIndex] = 0; - ++$currentVariation[$attributeIndex + 1]; - } - } - if ($currentVariation[$lastAttribute] >= count($variationalAttributes[$lastAttribute]['values'])) { - break; - } - - $filledVariation = array(); - for ($attributeIndex = $attributesCount; $attributeIndex--;) { - $currentAttribute = $variationalAttributes[$attributeIndex]; - $filledVariation[$currentAttribute['id']] = - $currentAttribute['values'][$currentVariation[$attributeIndex]]; - } - - $variations[] = $filledVariation; - $currentVariation[0]++; - } while (1); - return $variations; - } } diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Attribute.php similarity index 68% rename from app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php rename to app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Attribute.php index 5c87db86e03d256a5d0a46d79aee867f696b14eb..68343b08c9d5b1756cd68416060e7a9d81fab69c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Attribute.php @@ -25,24 +25,24 @@ */ /** - * Adminhtml queue grid block. + * Renderer for attribute block * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Newsletter_Queue extends Mage_Adminhtml_Block_Template +class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Attribute + extends Mage_Backend_Block_Template { - - protected $_template = 'newsletter/queue/list.phtml'; - - protected function _beforeToHtml() + /** + * Render block + * + * @param array $arguments + * @return string + */ + public function render(array $arguments) { - $this->setChild( - 'grid', - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Newsletter_Queue_Grid', 'newsletter.queue.grid') - ); - return parent::_beforeToHtml(); + $this->assign($arguments); + return $this->toHtml(); } - } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Matrix.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Matrix.php new file mode 100644 index 0000000000000000000000000000000000000000..ec2c229d3ebfc460cc0c722400a7c98d7c4be2f8 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Matrix.php @@ -0,0 +1,229 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Adminhtml + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Product variations matrix block + * + * @category Mage + * @package Mage_Adminhtml + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix + extends Mage_Backend_Block_Template +{ + /** + * Get configurable product type + * + * @return Mage_Catalog_Model_Product_Type_Configurable + */ + protected function _getProductType() + { + return Mage::getSingleton('Mage_Catalog_Model_Product_Type_Configurable'); + } + + /** + * Retrieve currently edited product object + * + * @return Mage_Catalog_Model_Product + */ + protected function _getProduct() + { + return Mage::registry('current_product'); + } + + /** + * Retrieve all possible attribute values combinations + * + * @return array + */ + public function getVariations() + { + $variationalAttributes = array(); + $usedProductAttributes = $this->getAttributes(); + foreach ($usedProductAttributes as &$attribute) { + $options = array(); + foreach ($attribute['options'] as $valueInfo) { + foreach ($attribute['values'] as $priceData) { + if ($priceData['value_index'] == $valueInfo['value'] + && (!isset($priceData['include']) || $priceData['include']) + ) { + $valueInfo['price'] = $priceData; + $options[] = $valueInfo; + } + } + } + /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + $variationalAttributes[] = array( + 'id' => $attribute['attribute_id'], + 'values' => $options, + ); + + } + $attributesCount = count($variationalAttributes); + if ($attributesCount === 0) { + return array(); + } + + $variations = array(); + $currentVariation = array_fill(0, $attributesCount, 0); + $variationalAttributes = array_reverse($variationalAttributes); + $lastAttribute = $attributesCount - 1; + do { + for ($attributeIndex = 0; $attributeIndex < $attributesCount - 1; ++$attributeIndex) { + if ($currentVariation[$attributeIndex] >= count($variationalAttributes[$attributeIndex]['values'])) { + $currentVariation[$attributeIndex] = 0; + ++$currentVariation[$attributeIndex + 1]; + } + } + if ($currentVariation[$lastAttribute] >= count($variationalAttributes[$lastAttribute]['values'])) { + break; + } + + $filledVariation = array(); + for ($attributeIndex = $attributesCount; $attributeIndex--;) { + $currentAttribute = $variationalAttributes[$attributeIndex]; + $filledVariation[$currentAttribute['id']] = + $currentAttribute['values'][$currentVariation[$attributeIndex]]; + } + + $variations[] = $filledVariation; + $currentVariation[0]++; + } while (1); + return $variations; + } + + /** + * Get url for product edit + * + * @param $id + * + * @return string + */ + public function getEditProductUrl($id) + { + return $this->getUrl('*/*/edit', array('id' => $id)); + } + + + /** + * Retrieve attributes data + * + * @return array + */ + public function getAttributes() + { + if (!$this->hasData('attributes')) { + $attributes = (array)$this->_getProductType()->getConfigurableAttributesAsArray($this->_getProduct()); + $productData = (array)$this->getRequest()->getParam('product'); + if (isset($productData['configurable_attributes_data'])) { + $configurableData = $productData['configurable_attributes_data']; + foreach ($attributes as $key => &$attribute) { + if (isset($configurableData[$key])) { + $attribute['values'] = array_merge( + isset($attribute['values']) ? $attribute['values'] : array(), + isset($configurableData[$key]['values']) + ? array_filter($configurableData[$key]['values']) + : array() + ); + } + } + } + + $this->setData('attributes', $attributes); + } + return $this->getData('attributes'); + } + + /** + * Get used product attributes + * + * @return array + */ + public function getUsedAttributes() + { + return $this->_getProductType()->getUsedProductAttributes($this->_getProduct()); + } + + /** + * Retrieve actual list of associated products, array key is obtained from varying attributes values + * + * @return array + */ + public function getAssociatedProducts() + { + $productByUsedAttributes = array(); + foreach ($this->_getAssociatedProducts() as $product) { + $keys = array(); + foreach ($this->getUsedAttributes() as $attribute) { + /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + $keys[] = $product->getData($attribute->getAttributeCode()); + } + $productByUsedAttributes[implode('-', $keys)] = $product; + } + return $productByUsedAttributes; + } + + /** + * Retrieve actual list of associated products (i.e. if product contains variations matrix form data + * - previously saved in database relations are not considered) + * + * @return array + */ + protected function _getAssociatedProducts() + { + $product = $this->_getProduct(); + $ids = $this->_getProduct()->getAssociatedProductIds(); + if ($ids === null) { // form data overrides any relations stored in database + return $this->_getProductType()->getUsedProducts($product); + } + $products = array(); + foreach ($ids as $productId) { + /** @var $product Mage_Catalog_Model_Product */ + $product = Mage::getModel('Mage_Catalog_Model_Product')->load($productId); + if ($product->getId()) { + $products[] = $product; + } + } + return $products; + } + + /** + * Get html class for attribute + * + * @param string $code + * @return string + */ + public function getAttributeFrontendClass($code) + { + /** @var $config Mage_Catalog_Model_Config */ + $config = Mage::getSingleton('Mage_Catalog_Model_Config'); + /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + $attribute = $config->getAttribute(Mage_Catalog_Model_Product::ENTITY, $code); + return $attribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract + ? $attribute->getFrontend()->getClass() + : ''; + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php index e4f78a4581e3d9484aa0b460a4383f5517d06635..97c78fda751181df3ff189326f57a9032429781a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php @@ -171,15 +171,6 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple )); } - - $fieldset->addField('create_button', 'note', array( - 'text' => $this->getButtonHtml( - Mage::helper('Mage_Catalog_Helper_Data')->__('Quick Create'), - 'superProduct.quickCreateNewProduct()', - 'save' - ) - )); - $this->setForm($form); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php index b3818e4e920982d2fa2cda8d7fecb70af6920bf8..4e837aa6c0c64cbc1421712db5c55144d396d7d4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php @@ -70,45 +70,37 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Settings extends Mage_ { $form = new Varien_Data_Form(); $fieldset = $form->addFieldset('settings', array( - 'legend'=>Mage::helper('Mage_Catalog_Helper_Data')->__('Select Configurable Attributes') + 'legend' => Mage::helper('Mage_Catalog_Helper_Data')->__('Select Configurable Attributes') )); - $product = $this->_getProduct(); - $attributes = $product->getTypeInstance() - ->getSetAttributes($product); + $fieldset->addField('attribute-selector', 'text', array( + 'label' => 'Select Attribute', + 'title' => 'Select Attribute', + )); - $hasAttributes = false; + $product = $this->_getProduct(); + /** @var $configurableType Mage_Catalog_Model_Product_Type_Configurable */ + $configurableType = Mage::getSingleton('Mage_Catalog_Model_Product_Type_Configurable'); $usedAttributes = $product->isConfigurable() - ? $this->_getProduct()->getTypeInstance()->getUsedProductAttributeIds($this->_getProduct()) + ? $configurableType->getUsedProductAttributes($product) : array(); - - $configurableType = Mage::getSingleton('Mage_Catalog_Model_Product_Type_Configurable'); - - foreach ($attributes as $attribute) { + foreach ($usedAttributes as $attribute) { + /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ if ($configurableType->canUseAttribute($attribute, $product)) { - $hasAttributes = true; $fieldset->addField('attribute_' . $attribute->getAttributeId(), 'checkbox', array( - 'label' => $attribute->getFrontend()->getLabel(), - 'title' => $attribute->getFrontend()->getLabel(), + 'label' => $attribute->getFrontendLabel(), + 'title' => $attribute->getFrontendLabel(), 'name' => 'attributes[]', 'class' => 'configurable-attribute-checkbox', 'value' => $attribute->getAttributeId(), - 'checked' => in_array($attribute->getAttributeId(), $usedAttributes) + 'checked' => true )); } } - if ($hasAttributes) { - $fieldset->addField('continue_button', 'note', array( - 'text' => $this->getChildHtml('continue_button'), - )); - } else { - $fieldset->addField('note_text', 'note', array( - 'text' => $this->__('This attribute set does not have attributes which we can use for configurable product') - )); - } - - + $fieldset->addField('continue_button', 'note', array( + 'text' => $this->getChildHtml('continue_button'), + )); $this->setForm($form); return parent::_prepareForm(); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImage.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImage.php index 7d66d1ec45916762e4425e78358e4cc3991b9948..04859509b5aec7e6c53bd089d03f253f3556aee8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImage.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImage.php @@ -31,7 +31,7 @@ * @package Mage_Adminhtml * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage extends Varien_Data_Form_Element_Hidden +class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage extends Varien_Data_Form_Element_Abstract { /** * Maximum file size to upload in bytes. @@ -55,25 +55,14 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage extends Varien_ protected $_url; /** - * Media Config instance - * - * @var Mage_Catalog_Model_Product_Media_Config - */ - protected $_mediaConfig; - - /** - * Design Package instance - * - * @var Mage_Core_Model_Design_Package + * @var Mage_Core_Helper_Data */ - protected $_design; + protected $_coreHelper; /** - * Data instance - * - * @var Mage_Core_Helper_Data + * @var Mage_Catalog_Helper_Data */ - protected $_helperData; + protected $_catalogHelperData; /** * Constructor @@ -88,16 +77,26 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage extends Varien_ : Mage::getSingleton('Mage_Adminhtml_Block_Media_Uploader'); $this->_url = isset($attributes['url']) ? $attributes['url'] : Mage::getModel('Mage_Backend_Model_Url'); - $this->_mediaConfig = isset($attributes['mediaConfig']) ? $attributes['mediaConfig'] - : Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config'); - $this->_design = isset($attributes['design']) ? $attributes['design'] - : Mage::getSingleton('Mage_Core_Model_Design_Package'); - $this->_helperData = isset($attributes['helperData']) ? $attributes['helperData'] + $this->_coreHelper = isset($attributes['coreHelper']) ? $attributes['coreHelper'] : Mage::helper('Mage_Core_Helper_Data'); + $this->_catalogHelperData = isset($attributes['catalogHelperData']) ? $attributes['catalogHelperData'] + : Mage::helper('Mage_Catalog_Helper_Data'); $this->_maxFileSize = $this->_getFileMaxSize(); } + public function getDefaultHtml() + { + $html = $this->getData('default_html'); + if (is_null($html)) { + $html = ($this->getNoSpan() === true) ? '' : '<span class="field-row">' . "\n"; + $html .= $this->getLabelHtml(); + $html .= $this->getElementHtml(); + $html .= ($this->getNoSpan() === true) ? '' : '</span>' . "\n"; + } + return $html; + } + /** * Return element html code * @@ -105,16 +104,32 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage extends Varien_ */ public function getElementHtml() { - $imageUrl = $this->_helperData->escapeHtml($this->_getImageUrl($this->getValue())); - $htmlId = $this->_helperData->escapeHtml($this->getHtmlId()); - $uploadUrl = $this->_helperData->escapeHtml($this->_getUploadUrl()); - - $html = '<input id="' . $htmlId .'_upload" type="file" name="image" ' - . 'data-url="' . $uploadUrl . '" style="display: none;" />' - . parent::getElementHtml() - . '<img align="left" src="' . $imageUrl . '" id="' . $htmlId . '_image"' - . ' title="' . $imageUrl . '" alt="' . $imageUrl . '" class="base-image-uploader"' - . ' onclick="jQuery(\'#' . $htmlId . '_upload\').trigger(\'click\')"/>'; + $htmlId = $this->_coreHelper->escapeHtml($this->getHtmlId()); + $uploadUrl = $this->_coreHelper->escapeHtml($this->_getUploadUrl()); + /** @var $product Mage_Catalog_Model_Product */ + $product = $this->getForm()->getDataObject(); + $gallery = $product->getMediaGalleryImages(); + $html = '<input id="' . $htmlId .'-upload" type="file" name="image" ' + . 'data-url="' . $uploadUrl . '" style="display:none" />' + . '<input id="' . $htmlId . '" type="hidden" name="'. $this->getName() .'" />' + . '<div id="' . $htmlId . '-container" data-main="' . $this->getEscapedValue() . '" ' + . 'data-images="' . $this->_coreHelper->escapeHtml( + $this->_coreHelper->jsonEncode($gallery ? $gallery->toArray() : array()) + ) . '">' + . '<span id="' . $htmlId . '-upload-placeholder"></span>' + . '<script id="' . $htmlId . '-template" type="text/x-jquery-tmpl">' + . '<span class="container">' + . '<span class="main-sticker">' . $this->helper('Mage_Catalog_Helper_Data')->__('Main') . '</span>' + . '<span class="close">×</span>' + . '<img class="base-image-uploader" src="${url}" data-position="${position}" alt="${label}" />' + . '<div class="drag-zone">' + . '<button class="make-main" type="button">' + . $this->helper('Mage_Catalog_Helper_Data')->__('Make Main') + . '</button>' + . '</div>' + . '</span>' + . '</script>' + . '</div>'; $html .= $this->_getJs(); return $html; @@ -128,33 +143,11 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage extends Varien_ protected function _getJs() { return "<script>/* <![CDATA[ */" - . "jQuery(function(){" - . "BaseImageUploader({$this->_helperData->jsonEncode($this->getHtmlId())}, " - . "{$this->_helperData->jsonEncode($this->_maxFileSize)});" - . " });" - . "/*]]>*/</script>"; - } - - /** - * Get full url for image - * - * @param string $imagePath - * - * @return string - */ - protected function _getImageUrl($imagePath) - { - if (!in_array($imagePath, array(null, 'no_selection', '/'))) { - if (pathinfo($imagePath, PATHINFO_EXTENSION) == 'tmp') { - $imageUrl = $this->_mediaConfig->getTmpMediaUrl(substr($imagePath, 0, -4)); - } else { - $imageUrl = $this->_mediaConfig->getMediaUrl($imagePath); - } - } else { - $imageUrl = $this->_design->getViewFileUrl('Mage_Adminhtml::images/image-placeholder.png'); - } - - return $imageUrl; + . "jQuery(function(){" + . "BaseImageUploader({$this->_coreHelper->jsonEncode($this->getHtmlId())}, " + . "{$this->_coreHelper->jsonEncode($this->_maxFileSize)});" + . " });" + . "/*]]>*/</script>"; } /** @@ -176,4 +169,16 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage extends Varien_ { return $this->_mediaUploader->getDataMaxSizeInBytes(); } + + /** + * Dummy function to give translation tool the ability to pick messages + * Must be called with Mage_Catalog_Helper_Data $className only + * + * @param string $className + * @return Mage_Catalog_Helper_Data|Mage_Core_Helper_Data + */ + private function helper($className) + { + return $className === 'Mage_Catalog_Helper_Data' ? $this->_catalogHelperData : $this->_coreHelper; + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php index 4cdf587efe7a0fc4943f574f51b0ca4694f6f9f4..a6035cdfc55abc7e900e5e08e50a54d770383ea8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php @@ -47,8 +47,10 @@ class Mage_Adminhtml_Block_Cms_Block_Edit extends Mage_Adminhtml_Block_Widget_Fo $this->_addButton('saveandcontinue', array( 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), -100); diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php index 7859ddcef5102037353719bdb693c28df3b79a3b..841634d8fe6d1c19c13a5d79b9f3af4ba1f37185 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php @@ -50,9 +50,11 @@ class Mage_Adminhtml_Block_Cms_Page_Edit extends Mage_Adminhtml_Block_Widget_For $this->_addButton('saveandcontinue', array( 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), + ), ), -100); } else { $this->_removeButton('save'); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php index d4bacb08ad30bcb425ddb63636e9df45038e0f82..533f229d187c2e222645227c42fb382b5f4da3b1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php @@ -106,8 +106,10 @@ class Mage_Adminhtml_Block_Customer_Edit extends Mage_Adminhtml_Block_Widget_For $this->_addButton('save_and_continue', array( 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), 10); } diff --git a/app/code/core/Mage/Adminhtml/Block/Html/Date.php b/app/code/core/Mage/Adminhtml/Block/Html/Date.php index f2057496fc52beb354ccc85bc4ab8ea634a2ef97..63927e368da695be2e489e34bdf706ccd93d515a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Html/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Html/Date.php @@ -47,6 +47,7 @@ class Mage_Adminhtml_Block_Html_Date extends Mage_Core_Block_Html_Date * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -63,10 +64,11 @@ class Mage_Adminhtml_Block_Html_Date extends Mage_Core_Block_Html_Date Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Messages.php b/app/code/core/Mage/Adminhtml/Block/Messages.php index 984ce5923d0ca1c59e9c9f92855476ba8fb68e68..84d07a3a1da95d5fbf7ffce22e82a806b5999e76 100644 --- a/app/code/core/Mage/Adminhtml/Block/Messages.php +++ b/app/code/core/Mage/Adminhtml/Block/Messages.php @@ -46,6 +46,7 @@ class Mage_Adminhtml_Block_Messages extends Mage_Core_Block_Messages * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -62,10 +63,10 @@ class Mage_Adminhtml_Block_Messages extends Mage_Core_Block_Messages Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data - ); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php index df262eec1c4cdd8c057aa4cecb8801437371ca21..b22f8c41382004e20c6d25ac15f58705821f122a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php @@ -92,23 +92,27 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit extends Mage_Adminhtml_Block_Te $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Save Newsletter'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#queue_edit_form'), - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#queue_edit_form'), + ), + ), )); $this->addChild('save_and_resume', 'Mage_Adminhtml_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Save and Resume'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'save', - 'related' => '#queue_edit_form', - 'eventData' => array( - 'action' => array( - 'args' => array('_resume' => 1), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'save', + 'target' => '#queue_edit_form', + 'eventData' => array( + 'action' => array( + 'args' => array('_resume' => 1), + ), ), - ) + ), ), ), )); diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php deleted file mode 100644 index 4acc257749651c14b598ee5b030f6de6213039d8..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category Mage - * @package Mage_Adminhtml - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Adminhtml newsletter queue grid block - * - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> - */ -class Mage_Adminhtml_Block_Newsletter_Queue_Grid extends Mage_Adminhtml_Block_Widget_Grid -{ - - protected function _construct() - { - parent::_construct(); - $this->setId('queueGrid'); - $this->setDefaultSort('start_at'); - $this->setDefaultDir('desc'); - $this->setSaveParametersInSession(true); - $this->setUseAjax(true); - } - - protected function _prepareCollection() - { - $collection = Mage::getResourceModel('Mage_Newsletter_Model_Resource_Queue_Collection') - ->addSubscribersInfo(); - - $this->setCollection($collection); - - return parent::_prepareCollection(); - } - - protected function _prepareColumns() - { - $this->addColumn('queue_id', array( - 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('ID'), - 'index' => 'queue_id', - 'width' => 10 - )); - - $this->addColumn('start_at', array( - 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Start'), - 'type' => 'datetime', - 'index' => 'queue_start_at', - 'gmtoffset' => true, - 'default' => ' ---- ' - )); - - $this->addColumn('finish_at', array( - 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Finish'), - 'type' => 'datetime', - 'index' => 'queue_finish_at', - 'gmtoffset' => true, - 'default' => ' ---- ' - )); - - $this->addColumn('newsletter_subject', array( - 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Subject'), - 'index' => 'newsletter_subject' - )); - - $this->addColumn('status', array( - 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Status'), - 'index' => 'queue_status', - 'type' => 'options', - 'options' => array( - Mage_Newsletter_Model_Queue::STATUS_SENT => Mage::helper('Mage_Newsletter_Helper_Data')->__('Sent'), - Mage_Newsletter_Model_Queue::STATUS_CANCEL => Mage::helper('Mage_Newsletter_Helper_Data')->__('Cancelled'), - Mage_Newsletter_Model_Queue::STATUS_NEVER => Mage::helper('Mage_Newsletter_Helper_Data')->__('Not Sent'), - Mage_Newsletter_Model_Queue::STATUS_SENDING => Mage::helper('Mage_Newsletter_Helper_Data')->__('Sending'), - Mage_Newsletter_Model_Queue::STATUS_PAUSE => Mage::helper('Mage_Newsletter_Helper_Data')->__('Paused'), - ), - 'width' => '100px', - )); - - $this->addColumn('subscribers_sent', array( - 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Processed'), - 'type' => 'number', - 'index' => 'subscribers_sent' - )); - - $this->addColumn('subscribers_total', array( - 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Recipients'), - 'type' => 'number', - 'index' => 'subscribers_total' - )); - - $this->addColumn('action', array( - 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Action'), - 'filter' => false, - 'sortable' => false, - 'no_link' => true, - 'width' => '100px', - 'renderer' => 'Mage_Adminhtml_Block_Newsletter_Queue_Grid_Renderer_Action' - )); - - return parent::_prepareColumns(); - } - - public function getRowUrl($row) - { - return $this->getUrl('*/*/edit', array('id'=>$row->getId())); - } - -} - diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Head.php b/app/code/core/Mage/Adminhtml/Block/Page/Head.php index abf0eb53a4e96c5705cefcf6228a3408e758adca..2ea53cbc5694e7512a724405e9b5e3613258c4f9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Head.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Head.php @@ -47,6 +47,7 @@ class Mage_Adminhtml_Block_Page_Head extends Mage_Page_Block_Html_Head * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -63,10 +64,11 @@ class Mage_Adminhtml_Block_Page_Head extends Mage_Page_Block_Html_Head Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); } diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php index 1c9a36b6309f42a234485e510a6bbeb2b61fb5b8..22f35248bde7f0a7e8db534290f3ef288341a173 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php @@ -46,15 +46,17 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit extends Mage_Adminhtml_Block_Widge $this->_addButton('save_apply', array( 'class' => 'save', 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Save and Apply'), - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'save', - 'related' => '#edit_form', - 'eventData' => array( - 'action' => array( - 'args' => array('auto_apply' => 1), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'save', + 'target' => '#edit_form', + 'eventData' => array( + 'action' => array( + 'args' => array('auto_apply' => 1), + ), ), - ) + ), ), ), )); @@ -62,8 +64,10 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit extends Mage_Adminhtml_Block_Widge $this->_addButton('save_and_continue_edit', array( 'class' => 'save', 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Save and Continue Edit'), - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), 10); } diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php index 83b465225dfc29e59aaaf4edef80b123ad18887f..beb3539d8d975bc61e63015fef4fbf85223a252d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php @@ -46,8 +46,10 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit extends Mage_Adminhtml_Block_Widget_ $this->_addButton('save_and_continue_edit', array( 'class' => 'save', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Save and Continue Edit'), - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), 10); } diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php index 413b39db04816fb44e45a2cd82b69ad0b527b218..06288f4a741dd2e603eb659bbee1bbc1c42c49c5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php @@ -47,6 +47,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Labels * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_App $app * @param array $data * @@ -64,12 +65,13 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Labels Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_App $app, array $data = array() ) { $this->_app = $app; parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); } diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php index 994b211d1f44b2d8bd9e8251c11f0bd301c8ec91..b1305f7896741f54b2f33ed20665e9ced707e04f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php @@ -53,6 +53,7 @@ class Mage_Adminhtml_Block_Rating_Edit_Tab_Form extends Mage_Backend_Block_Widge * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_App $app * @param array $data * @@ -70,12 +71,13 @@ class Mage_Adminhtml_Block_Rating_Edit_Tab_Form extends Mage_Backend_Block_Widge Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_App $app, array $data = array() ) { $this->_app = $app; parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); } diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php deleted file mode 100644 index 78da314d39f31b967bb3921ac5cfeef83159de26..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php +++ /dev/null @@ -1,169 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category Mage - * @package Mage_Adminhtml - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Adminhtml sales report grid block - * - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> - */ -class Mage_Adminhtml_Block_Report_Refresh_Statistics_Grid extends Mage_Adminhtml_Block_Widget_Grid -{ - protected function _construct() - { - parent::_construct(); - $this->setFilterVisibility(false); - $this->setPagerVisibility(false); - $this->setUseAjax(false); - } - - protected function _getUpdatedAt($reportCode) - { - $flag = Mage::getModel('Mage_Reports_Model_Flag')->setReportFlagCode($reportCode)->loadSelf(); - return ($flag->hasData()) - ? Mage::app()->getLocale()->storeDate( - 0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true - ) - : ''; - } - - protected function _prepareCollection() - { - $collection = new Varien_Data_Collection(); - - $data = array( - array( - 'id' => 'sales', - 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Orders'), - 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Ordered Report'), - 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_ORDER_FLAG_CODE) - ), - array( - 'id' => 'tax', - 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Tax'), - 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Order Taxes Report Grouped by Tax Rates'), - 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_TAX_FLAG_CODE) - ), - array( - 'id' => 'shipping', - 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Shipping'), - 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Shipped Report'), - 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_SHIPPING_FLAG_CODE) - ), - array( - 'id' => 'invoiced', - 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Invoiced'), - 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Invoiced VS Paid Report'), - 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_INVOICE_FLAG_CODE) - ), - array( - 'id' => 'refunded', - 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Refunded'), - 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Refunded Report'), - 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_REFUNDED_FLAG_CODE) - ), - array( - 'id' => 'coupons', - 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Coupons'), - 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Promotion Coupons Usage Report'), - 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_COUPONS_FLAG_CODE) - ), - array( - 'id' => 'bestsellers', - 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Bestsellers'), - 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Products Bestsellers Report'), - 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_BESTSELLERS_FLAG_CODE) - ), - array( - 'id' => 'viewed', - 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Most Viewed'), - 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Most Viewed Products Report'), - 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_PRODUCT_VIEWED_FLAG_CODE) - ), - ); - - foreach ($data as $value) { - $item = new Varien_Object(); - $item->setData($value); - $collection->addItem($item); - } - - $this->setCollection($collection); - - return parent::_prepareCollection(); - } - - protected function _prepareColumns() - { - $this->addColumn('report', array( - 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Report'), - 'index' => 'report', - 'type' => 'string', - 'width' => 150, - 'sortable' => false - )); - - $this->addColumn('comment', array( - 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Description'), - 'index' => 'comment', - 'type' => 'string', - 'sortable' => false - )); - - $this->addColumn('updated_at', array( - 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Updated At'), - 'index' => 'updated_at', - 'type' => 'datetime', - 'width' => 200, - 'default' => Mage::helper('Mage_Reports_Helper_Data')->__('undefined'), - 'sortable' => false - )); - - return parent::_prepareColumns(); - } - - protected function _prepareMassaction() - { - $this->setMassactionIdField('id'); - $this->getMassactionBlock()->setFormFieldName('code'); - - $this->getMassactionBlock()->addItem('refresh_lifetime', array( - 'label' => Mage::helper('Mage_Reports_Helper_Data')->__('Refresh Lifetime Statistics'), - 'url' => $this->getUrl('*/*/refreshLifetime'), - 'confirm' => Mage::helper('Mage_Reports_Helper_Data')->__('Are you sure you want to refresh lifetime statistics? There can be performance impact during this operation.') - )); - - $this->getMassactionBlock()->addItem('refresh_recent', array( - 'label' => Mage::helper('Mage_Reports_Helper_Data')->__('Refresh Statistics for the Last Day'), - 'url' => $this->getUrl('*/*/refreshRecent'), - 'confirm' => Mage::helper('Mage_Reports_Helper_Data')->__('Are you sure you want to refresh statistics for last day?'), - 'selected' => true - )); - - return $this; - } -} diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Edit.php b/app/code/core/Mage/Adminhtml/Block/Review/Edit.php index 04034dcdc0cc3c1ee4d9742549bbe78cabd10b64..6aea4266cdd069b433a822941042384485be7e1c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Edit.php @@ -57,13 +57,15 @@ class Mage_Adminhtml_Block_Review_Edit extends Mage_Adminhtml_Block_Widget_Form_ $this->addButton('save_and_previous', array( 'label' => Mage::helper('Mage_Review_Helper_Data')->__('Save and Previous'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'save', - 'related' => '#edit_form', - 'eventData' => array( - 'action' => array( - 'args' => array('next_item' => $prevId), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'save', + 'target' => '#edit_form', + 'eventData' => array( + 'action' => array( + 'args' => array('next_item' => $prevId), + ), ), ), ), @@ -74,13 +76,15 @@ class Mage_Adminhtml_Block_Review_Edit extends Mage_Adminhtml_Block_Widget_Form_ $this->addButton('save_and_next', array( 'label' => Mage::helper('Mage_Review_Helper_Data')->__('Save and Next'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'save', - 'related' => '#edit_form', - 'eventData' => array( - 'action' => array( - 'args' => array('next_item' => $nextId), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'save', + 'target' => '#edit_form', + 'eventData' => array( + 'action' => array( + 'args' => array('next_item' => $nextId), + ), ), ), ), diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php index 88e7cda175b8c907a7dae5e76b5cfd952a373fbd..6829e62fb008ac422c20037472f9273a435a9823 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php @@ -47,14 +47,16 @@ class Mage_Adminhtml_Block_Sitemap_Edit extends Mage_Adminhtml_Block_Widget_Form $this->_addButton('generate', array( 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save & Generate'), - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'save', - 'related' => '#edit_form', - 'eventData' => array( - 'action' => array('args' => array( - 'generate' => '1' - )), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'save', + 'target' => '#edit_form', + 'eventData' => array( + 'action' => array('args' => array( + 'generate' => '1' + )), + ), ), ), ), diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php index c84645d7c910e6c507169056628d2a305b39b857..dfb22c37ae1598f348c6a5e80fab70616f8e1a79 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php @@ -32,7 +32,6 @@ */ class Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Link extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { - /** * Prepare link to display in grid * @@ -46,7 +45,7 @@ class Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Link extends Mage_Adminhtml_Blo $url = $this->escapeHtml($sitemap->getSitemapUrl($row->getSitemapPath(), $row->getSitemapFilename())); $fileName = preg_replace('/^\//', '', $row->getSitemapPath() . $row->getSitemapFilename()); - if (file_exists(BP . DS . $fileName)) { + if ($this->_filesystem->isFile(BP . DS . $fileName)) { return sprintf('<a href="%1$s">%1$s</a>', $url); } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php index 2309e8a0a0a4d38a2314bf3b2334fe42d9a91f23..2f92e992d07311ebddaa04a17e1fb5a19ca7435c 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php @@ -48,9 +48,11 @@ class Mage_Adminhtml_Block_System_Cache_Edit extends Mage_Adminhtml_Block_Widget $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save Cache Settings'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#config-edit-form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#config-edit-form'), + ), + ), )); return parent::_prepareLayout(); } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency.php b/app/code/core/Mage/Adminhtml/Block/System/Currency.php index 48a52eb4abda6505e0c30d0b4ebffc0a8e7ca77b..f0be7a91360db9cc7863947d2bfb7a0dc19cab44 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency.php @@ -42,9 +42,11 @@ class Mage_Adminhtml_Block_System_Currency extends Mage_Adminhtml_Block_Template $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save Currency Rates'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#rate-form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#rate-form'), + ), + ), )); $this->addChild('reset_button', 'Mage_Adminhtml_Block_Widget_Button', array( diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php index 7e5c6b4b17020c139e1c47233e85129a6a2c3f00..7f49292966cb4e1b828450609e7642d95e9504e9 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php @@ -47,9 +47,11 @@ class Mage_Adminhtml_Block_System_Design_Edit extends Mage_Adminhtml_Block_Widge $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Core_Helper_Data')->__('Save'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#design-edit-form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#design-edit-form'), + ), + ), )); $this->addChild('delete_button', 'Mage_Adminhtml_Block_Widget_Button', array( diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php index d7ce331d6ef8b7e01226b536fc1c8eb47d00c173..1f6840ff29950e4dafd7ee24081f7851484fa11f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php @@ -61,6 +61,7 @@ class Mage_Adminhtml_Block_System_Email_Template_Edit extends Mage_Adminhtml_Blo * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_Registry $registry * @param Mage_Backend_Model_Menu_Config $menuConfig * @param Mage_Backend_Model_Config_Structure $configStructure @@ -80,6 +81,7 @@ class Mage_Adminhtml_Block_System_Email_Template_Edit extends Mage_Adminhtml_Blo Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_Registry $registry, Mage_Backend_Model_Menu_Config $menuConfig, Mage_Backend_Model_Config_Structure $configStructure, @@ -87,8 +89,7 @@ class Mage_Adminhtml_Block_System_Email_Template_Edit extends Mage_Adminhtml_Blo ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, - $designPackage, $session, $storeConfig, $frontController, $helperFactory, $data - ); + $designPackage, $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); $this->_registryManager = $registry; $this->_menuConfig = $menuConfig; $this->_configStructure = $configStructure; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php index e1bd02fe291c20319f18df7b82ef8b7ad53f204d..6eed2f8b72f512821e1382429212ec4dfd6face8 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php @@ -52,8 +52,10 @@ class Mage_Adminhtml_Block_System_Store_Delete extends Mage_Adminhtml_Block_Widg $this->_updateButton('delete', 'region', 'footer'); $this->_updateButton('delete', 'onclick', null); - $this->_updateButton('delete', 'data_attr', - array('widget-button' => array('event' => 'save', 'related' => '#edit_form')) + $this->_updateButton('delete', 'data_attribute', + array('mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#edit_form'), + )) ); $this->_addButton('cancel', array( diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php index 40d9e69a81208301aeb2e8ad1795756229d4dac2..956e0a2a737a0e3766d9c929e08b92dcb8f1a713 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php @@ -66,8 +66,10 @@ class Mage_Adminhtml_Block_System_Variable_Edit extends Mage_Adminhtml_Block_Wid $this->_addButton('save_and_edit', array( 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), 100); if (!$this->getVariable()->getId()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php index bc7e53ad917eb1987aa3f7bcb3ff6cd8e0397c7f..ccdb04feac7823fa80164df21616ce87629902dd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php @@ -84,8 +84,10 @@ class Mage_Adminhtml_Block_Tax_Rate_Toolbar_Save extends Mage_Adminhtml_Block_Te { $formId = $this->getLayout()->getBlock('tax_rate_form')->getDestElementId(); $button = $this->getChildBlock('saveButton'); - $button->setDataAttr(array( - 'widget-button' => array('event' => 'save', 'related' => '#' . $formId) + $button->setDataAttribute(array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#' . $formId), + ), )); return $this->getChildHtml('saveButton'); } diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php index 2a467a4969c9fe2a5f5ab8475ab56b6527b64883..dea610ee9b064d8e0be4e8beb0ac15b26eb4a5f6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php @@ -51,8 +51,10 @@ class Mage_Adminhtml_Block_Tax_Rule_Edit extends Mage_Adminhtml_Block_Widget_For $this->_addButton('save_and_continue', array( 'label' => Mage::helper('Mage_Tax_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), 10); } diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php index 258aeccaaf4ddc6e06b99fbe24a69dbaa3bc85ae..e386a6b831dc95aa3aae0b9fb184ca7c7ecb7fa4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php @@ -170,8 +170,10 @@ class Mage_Adminhtml_Block_Urlrewrite_Edit extends Mage_Adminhtml_Block_Widget_C 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save'), 'class' => 'save', 'level' => -1, - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#edit_form'), + ), ), )); } diff --git a/app/code/core/Mage/Adminhtml/Model/Extension.php b/app/code/core/Mage/Adminhtml/Model/Extension.php index a2c43b27c9bc166689b84cdd5daa3a1cff4bb301..f28c0b5c32a18708df0edb3a639ac6f1066bfa9f 100644 --- a/app/code/core/Mage/Adminhtml/Model/Extension.php +++ b/app/code/core/Mage/Adminhtml/Model/Extension.php @@ -28,6 +28,25 @@ class Mage_Adminhtml_Model_Extension extends Varien_Object { protected $_roles; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * Constructor + * + * @param Magento_Filesystem $filesystem + * @param array $data + */ + public function __construct(Magento_Filesystem $filesystem, array $data = array()) + { + $this->_filesystem = $filesystem; + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->setWorkingDirectory($this->getRoleDir('mage')); + parent::__construct($data); + } + public function getPear() { return Varien_Pear::getInstance(); @@ -158,8 +177,6 @@ class Mage_Adminhtml_Model_Extension extends Varien_Object protected function _setContents($pfm) { - $baseDir = $this->getRoleDir('mage').DS; - $pfm->clearContents(); $contents = $this->getData('contents'); $usesRoles = array(); @@ -175,14 +192,15 @@ class Mage_Adminhtml_Model_Extension extends Varien_Object switch ($contents['type'][$i]) { case 'file': - if (!is_file($fullPath)) { + if (!$this->_filesystem->isFile($fullPath)) { Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__("Invalid file: %s", $fullPath)); } - $pfm->addFile('/', $contents['path'][$i], array('role'=>$role, 'md5sum'=>md5_file($fullPath))); + $pfm->addFile('/', $contents['path'][$i], + array('role' => $role, 'md5sum' => $this->_filesystem->getFileMd5($fullPath))); break; case 'dir': - if (!is_dir($fullPath)) { + if (!$this->_filesystem->isDirectory($fullPath)) { Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__("Invalid directory: %s", $fullPath)); } $path = $contents['path'][$i]; @@ -206,7 +224,7 @@ class Mage_Adminhtml_Model_Extension extends Varien_Object protected function _addDir($pfm, $role, $roleDir, $path, $include, $ignore) { $roleDirLen = strlen($roleDir); - $entries = @glob($roleDir.$path.DS."*"); + $entries = $this->_filesystem->getNestedKeys($roleDir . $path . DS); if (!empty($entries)) { foreach ($entries as $entry) { $filePath = substr($entry, $roleDirLen); @@ -216,14 +234,9 @@ class Mage_Adminhtml_Model_Extension extends Varien_Object if (!empty($ignore) && preg_match($ignore, $filePath)) { continue; } - if (is_dir($entry)) { - $baseName = basename($entry); - if ('.'===$baseName || '..'===$baseName) { - continue; - } - $this->_addDir($pfm, $role, $roleDir, $filePath, $include, $ignore); - } elseif (is_file($entry)) { - $pfm->addFile('/', $filePath, array('role'=>$role, 'md5sum'=>md5_file($entry))); + if ($this->_filesystem->isFile($entry)) { + $pfm->addFile('/', $filePath, + array('role' => $role, 'md5sum' => $this->_filesystem->getFileMd5($entry))); } } } @@ -278,7 +291,9 @@ class Mage_Adminhtml_Model_Extension extends Varien_Object $pear = Varien_Pear::getInstance(); $dir = Mage::getBaseDir('var').DS.'pear'; - if (!@file_put_contents($dir.DS.'package.xml', $this->getPackageXml())) { + try { + $this->_filesystem->write($dir.DS.'package.xml', $this->getPackageXml()); + } catch (Magento_Filesystem_Exception $e) { return false; } @@ -288,17 +303,9 @@ class Mage_Adminhtml_Model_Extension extends Varien_Object $xml = Mage::helper('Mage_Core_Helper_Data')->assocToXml($this->getData()); $xml = new Varien_Simplexml_Element($xml->asXML()); - // prepare dir to save - $parts = explode(DS, $fileName); - array_pop($parts); - $newDir = implode(DS, $parts); - if ((!empty($newDir)) && (!is_dir($dir . DS . $newDir))) { - if (!@mkdir($dir . DS . $newDir, 0777, true)) { - return false; - } - } - - if (!@file_put_contents($dir . DS . $fileName . '.xml', $xml->asNiceXml())) { + try { + $this->_filesystem->write($dir . DS . $fileName . '.xml', $xml->asNiceXml()); + } catch (Magento_Filesystem_Exception $e) { return false; } diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php index 4c15e5f95d2277cd9849e9f2304555ac3a223ecf..72790cf7d52c3850752ed9c5a999977c8ba95219 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php @@ -176,7 +176,6 @@ class Mage_Adminhtml_Catalog_Product_AttributeController extends Mage_Adminhtml_ $session = Mage::getSingleton('Mage_Adminhtml_Model_Session'); $isNewAttributeSet = false; - if (isset($data['new_attribute_set_name']) && !empty($data['new_attribute_set_name'])) { /** @var $attributeSet Mage_Eav_Model_Entity_Attribute_Set */ $attributeSet = Mage::getModel('Mage_Eav_Model_Entity_Attribute_Set'); @@ -403,6 +402,22 @@ class Mage_Adminhtml_Catalog_Product_AttributeController extends Mage_Adminhtml_ $this->_redirect('*/*/'); } + /** + * Search for attributes by part of attribute's label in admin store + */ + public function suggestConfigurableAttributesAction() + { + $this->getResponse()->setBody($this->_objectManager->get('Mage_Core_Helper_Data')->jsonEncode( + $this->getLayout()->createBlock('Mage_Catalog_Block_Product_Configurable_AttributeSelector') + ->getSuggestedAttributes($this->getRequest()->getParam('label_part')) + )); + } + + /** + * ACL check + * + * @return bool + */ protected function _isAllowed() { return Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed('Mage_Catalog::attributes_attributes'); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php index 3e85130d30597d8f66a978e6a47276b1c11cd131..f4836e6593e08663893cb6e452c6e64c11d8dffa 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php @@ -152,10 +152,22 @@ class Mage_Adminhtml_Catalog_Product_SetController extends Mage_Adminhtml_Contro } if ($isNewSet) { - if ($hasError) { - $this->_redirect('*/*/add'); + if ($this->getRequest()->getPost('return_session_messages_only')) { + /** @var $block Mage_Core_Block_Messages */ + $block = $this->_objectManager->get('Mage_Core_Block_Messages'); + $block->setMessages($this->_getSession()->getMessages(true)); + $body = $this->_objectManager->get('Mage_Core_Helper_Data')->jsonEncode(array( + 'messages' => $block->getGroupedHtml(), + 'error' => $hasError, + 'id' => $model->getId(), + )); + $this->getResponse()->setBody($body); } else { - $this->_redirect('*/*/edit', array('id' => $model->getId())); + if ($hasError) { + $this->_redirect('*/*/add'); + } else { + $this->_redirect('*/*/edit', array('id' => $model->getId())); + } } } else { $response = array(); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php index 93e33862e5ae7b4898dd608d41a59a044735cce8..52548bc6ee61aa037e85b686ce2e673aed73bc42 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php @@ -338,6 +338,17 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller ); } + /** + * Get variations matrix block + * + */ + public function variationsMatrixAction() + { + $this->_initProductSave($this->_initProduct()); + $this->loadLayout(); + $this->renderLayout(); + } + /** * Get categories fieldset block * @@ -517,7 +528,7 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller $attributes = $product->getAttributes(); foreach ($attributes as $attrKey => $attribute) { if ($attribute->getBackend()->getType() == 'datetime') { - if (array_key_exists($attrKey, $productData) && $productData[$attrKey] != ''){ + if (array_key_exists($attrKey, $productData) && $productData[$attrKey] != '') { $dateFields[] = $attrKey; } } @@ -534,6 +545,14 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller $resource->getAttribute('custom_design_from') ->setMaxValue($product->getCustomDesignTo()); + if ($products = $this->getRequest()->getPost('variations-matrix')) { + $validationResult = $this->_validateProductVariations($product, $products); + if (!empty($validationResult)) { + $response->setError(true) + ->setMessage(Mage::helper('Mage_Catalog_Helper_Data')->__('Some product variations fields are not valid.')) + ->setAttributes($validationResult); + } + } $product->validate(); /** * @todo implement full validation process with errors returning which are ignoring now @@ -566,6 +585,40 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller $this->getResponse()->setBody($response->toJson()); } + /** + * Product variations attributes validation + * + * @param Mage_Catalog_Model_Product $parentProduct + * @param array $products + * + * @return array + */ + protected function _validateProductVariations($parentProduct, $products) + { + $validationResult = array(); + foreach ($products as $productData) { + $product = $this->_objectManager->create('Mage_Catalog_Model_Product'); + $product->setData('_edit_mode', true); + if ($storeId = $this->getRequest()->getParam('store')) { + $product->setStoreId($storeId); + } + $product->setAttributeSetId($parentProduct->getAttributeSetId()); + + $product->addData($productData); + $product->setCollectExceptionMessages(true); + $configurableAttribute = Mage::helper('Mage_Core_Helper_Data') + ->jsonDecode($productData['configurable_attribute']); + $configurableAttribute = implode('-', $configurableAttribute); + foreach ($product->validate() as $attributeCode => $result) { + if (is_string($result)) { + $validationResult['variations-matrix-' . $configurableAttribute . '-' . $attributeCode] = $result; + } + } + } + + return $validationResult; + } + /** * Initialize product before saving * @@ -650,25 +703,23 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller $attributes = $this->getRequest()->getParam('attributes'); if (!empty($attributes)) { - $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE); $this->_objectManager->get('Mage_Catalog_Model_Product_Type_Configurable')->setUsedProductAttributeIds( $attributes, $product ); - $product->setAssociatedProductIds($this->getRequest()->getPost('associated_product_ids', array())); - - $data = $this->getRequest()->getPost('configurable_attributes_data'); - if ($data) { - $product->setConfigurableAttributesData(Mage::helper('Mage_Core_Helper_Data')->jsonDecode($data)); + $product->setNewVariationsAttributeSetId($this->getRequest()->getPost('new-variations-attribute-set-id')); + $associatedProductIds = $this->getRequest()->getPost('associated_product_ids', array()); + if ($this->getRequest()->getActionName() != 'variationsMatrix') { + $generatedProductIds = $this->_objectManager->get('Mage_Catalog_Model_Product_Type_Configurable') + ->generateSimpleProducts($product, $this->getRequest()->getPost('variations-matrix', array())); + $associatedProductIds = array_merge($associatedProductIds, $generatedProductIds); } + $product->setAssociatedProductIds(array_filter($associatedProductIds)); $product->setCanSaveConfigurableAttributes( (bool)$this->getRequest()->getPost('affect_configurable_product_attributes') ); - } elseif ($product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) { - $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL); - $product->setTypeInstance(null); } /** @@ -774,10 +825,15 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller } } - if ($redirectBack) { + if ($redirectBack === 'new') { + $this->_redirect('*/*/new', array( + 'set' => $product->getAttributeSetId(), + 'type' => $product->getTypeId() + )); + } elseif ($redirectBack) { $this->_redirect('*/*/edit', array( 'id' => $productId, - '_current' =>true + '_current' => true )); } elseif ($this->getRequest()->getParam('popup')) { $this->_redirect('*/*/created', array( @@ -943,133 +999,6 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller } } - public function quickCreateAction() - { - $result = array(); - - /* @var $configurableProduct Mage_Catalog_Model_Product */ - $configurableProduct = $this->_objectManager->create('Mage_Catalog_Model_Product') - ->setStoreId(Mage_Core_Model_App::ADMIN_STORE_ID) - ->load($this->getRequest()->getParam('product')); - - if (!$configurableProduct->isConfigurable()) { - // If invalid parent product - $this->_redirect('*/*/'); - return; - } - - /* @var $product Mage_Catalog_Model_Product */ - - $product = $this->_objectManager->create('Mage_Catalog_Model_Product') - ->setStoreId(0) - ->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) - ->setAttributeSetId($configurableProduct->getAttributeSetId()); - - - foreach ($product->getTypeInstance()->getEditableAttributes($product) as $attribute) { - if ($attribute->getIsUnique() - || $attribute->getAttributeCode() == 'url_key' - || $attribute->getFrontend()->getInputType() == 'gallery' - || $attribute->getFrontend()->getInputType() == 'media_image' - || !$attribute->getIsVisible()) { - continue; - } - - $product->setData( - $attribute->getAttributeCode(), - $configurableProduct->getData($attribute->getAttributeCode()) - ); - } - $requestData = $this->getRequest()->getParam('simple_product', array()); - $product->addData($requestData); - $product->setWebsiteIds($configurableProduct->getWebsiteIds()); - - $autogenerateOptions = array(); - $result['attributes'] = array(); - - $configurableAttributes = $configurableProduct->getTypeInstance() - ->getConfigurableAttributes($configurableProduct); - foreach ($configurableAttributes as $attribute) { - $value = $product->getAttributeText($attribute->getProductAttribute()->getAttributeCode()); - $autogenerateOptions[] = $value; - $result['attributes'][] = array( - 'label' => $value, - 'value_index' => $product->getData($attribute->getProductAttribute()->getAttributeCode()), - 'attribute_id' => $attribute->getProductAttribute()->getId() - ); - } - - if ($product->getNameAutogenerate()) { - $product->setName($configurableProduct->getName() . '-' . implode('-', $autogenerateOptions)); - } - - if ($product->getSkuAutogenerate()) { - $product->setSku($configurableProduct->getSku() . '-' . implode('-', $autogenerateOptions)); - } - - if (is_array($product->getPricing())) { - $result['pricing'] = $product->getPricing(); - $additionalPrice = 0; - foreach ($product->getPricing() as $pricing) { - if (empty($pricing['value'])) { - continue; - } - - if (!empty($pricing['is_percent'])) { - $pricing['value'] = ($pricing['value']/100)*$product->getPrice(); - } - - $additionalPrice += $pricing['value']; - } - - $product->setPrice($product->getPrice() + $additionalPrice); - $product->unsPricing(); - } - - try { - /** - * @todo implement full validation process with errors returning which are ignoring now - */ -// if (is_array($errors = $product->validate())) { -// $strErrors = array(); -// foreach($errors as $code=>$error) { -// $codeLabel = $product->getResource()->getAttribute($code)->getFrontend()->getLabel(); -// $strErrors[] = ($error === true) ? -// Mage::helper('Mage_Catalog_Helper_Data')->__('Value for "%s" is invalid.', $codeLabel) : -// Mage::helper('Mage_Catalog_Helper_Data')->__('Value for "%s" is invalid: %s', $codeLabel, $error); -// } -// Mage::throwException('data_invalid', implode("\n", $strErrors)); -// } - if (isset($requestData[$product->getIdFieldName()])) { - throw new Mage_Core_Exception($this->__('Unable to create product')); - } - - $product->validate(); - $product->save(); - $result['product_id'] = $product->getId(); - $this->_getSession()->addSuccess( - Mage::helper('Mage_Catalog_Helper_Data')->__('The product has been created.')); - $this->_initLayoutMessages('Mage_Adminhtml_Model_Session'); - $result['messages'] = $this->getLayout()->getMessagesBlock()->getGroupedHtml(); - } catch (Mage_Core_Exception $e) { - $result['error'] = array( - 'message' => $e->getMessage(), - 'fields' => array( - 'sku' => $product->getSku() - ) - ); - - } catch (Exception $e) { - Mage::logException($e); - $result['error'] = array( - 'message' => $this->__('An error occurred while saving the product. ') . $e->getMessage() - ); - } - - $helper = $this->_objectManager->get('Mage_Core_Helper_Data'); - $this->getResponse()->setBody($helper->jsonEncode($result)); - } - /** * Check for is allowed * diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php index f9adafc7f65112f13ba2fa5b8d33133bf26ce9f0..5981a3307664617443772e5e78514a478502ee6a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php @@ -128,11 +128,12 @@ class Mage_Adminhtml_Cms_Wysiwyg_ImagesController extends Mage_Adminhtml_Control $path = $this->getStorage()->getSession()->getCurrentPath(); foreach ($files as $file) { $file = $helper->idDecode($file); - $_filePath = realpath($path . DS . $file); - if (strpos($_filePath, realpath($path)) === 0 && - strpos($_filePath, realpath($helper->getStorageRoot())) === 0 - ) { - $this->getStorage()->deleteFile($path . DS . $file); + $_filePath = $path . DS . $file; + /** @var Magento_Filesystem $filesystem */ + $filesystem = $this->_objectManager->get('Magento_Filesystem'); + $filesystem->setWorkingDirectory($helper->getStorageRoot()); + if ($filesystem->isFile($_filePath)) { + $this->getStorage()->deleteFile($_filePath); } } } catch (Exception $e) { diff --git a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php index 0ccaa35c640b5cf9543cdd7b959f3904e8da067e..5e9d6add18ce08bb74e78df053f9992b5d4a2985 100644 --- a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php @@ -310,7 +310,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action /** @var Mage_Core_Model_Authorization $acl */ $acl = $this->_objectManager->get('Mage_Core_Model_Authorization'); if ($acl->isAllowed(Mage_Backend_Model_Acl_Config::ACL_RESOURCE_ALL)) { - $customerData['is_subscribed'] = (bool)$this->getRequest()->getPost('subscription', false); + $customerData['is_subscribed'] = $this->getRequest()->getPost('subscription') !== null; } if (isset($customerData['disable_auto_group_change'])) { @@ -785,12 +785,11 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action $path = Mage::getBaseDir('media') . DS . 'customer'; - $ioFile = new Varien_Io_File(); - $ioFile->open(array('path' => $path)); - $fileName = $ioFile->getCleanPath($path . $file); - $path = $ioFile->getCleanPath($path); - - if ((!$ioFile->fileExists($fileName) || strpos($fileName, $path) !== 0) + /** @var Magento_Filesystem $filesystem */ + $filesystem = $this->_objectManager->get('Magento_Filesystem'); + $filesystem->setWorkingDirectory($path); + $fileName = $path . $file; + if (!$filesystem->isFile($fileName) && !Mage::helper('Mage_Core_Helper_File_Storage')->processStorageFile(str_replace('/', DS, $fileName)) ) { return $this->norouteAction(); @@ -813,9 +812,8 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action break; } - $ioFile->streamOpen($fileName, 'r'); - $contentLength = $ioFile->streamStat('size'); - $contentModify = $ioFile->streamStat('mtime'); + $contentLength = $filesystem->getFileSize($fileName); + $contentModify = $filesystem->getMTime($fileName); $this->getResponse() ->setHttpResponseCode(200) @@ -826,9 +824,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action ->clearBody(); $this->getResponse()->sendHeaders(); - while (false !== ($buffer = $ioFile->streamRead())) { - echo $buffer; - } + echo $filesystem->read($fileName); } else { $name = pathinfo($fileName, PATHINFO_BASENAME); $this->_prepareDownloadResponse($name, array( diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php index df2a565da62e772608aaa364df39894ee0c74695..2927b5892704ee30e6f3e017b31784045f7a27cd 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php @@ -49,10 +49,6 @@ class Mage_Adminhtml_Newsletter_QueueController extends Mage_Adminhtml_Controlle $this->_setActiveMenu('Mage_Newsletter::newsletter_queue'); - $this->_addContent( - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Newsletter_Queue', 'queue') - ); - $this->_addBreadcrumb(Mage::helper('Mage_Newsletter_Helper_Data')->__('Newsletter Queue'), Mage::helper('Mage_Newsletter_Helper_Data')->__('Newsletter Queue')); $this->renderLayout(); @@ -92,9 +88,8 @@ class Mage_Adminhtml_Newsletter_QueueController extends Mage_Adminhtml_Controlle */ public function gridAction() { - $this->getResponse()->setBody( - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Newsletter_Queue_Grid')->toHtml() - ); + $this->loadLayout(false); + $this->renderLayout(); } public function startAction() diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php b/app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php index c1f4e5ba3953de94b540175e3e5de0970bc29f53..ed3bb87adfb1c78bd80b01295644198f8542d56f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php @@ -42,11 +42,6 @@ class Mage_Adminhtml_Report_StatisticsController extends Mage_Adminhtml_Controll public function _initAction() { - $act = $this->getRequest()->getActionName(); - if(!$act) { - $act = 'default'; - } - $this->loadLayout() ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Reports'), Mage::helper('Mage_Reports_Helper_Data')->__('Reports')) ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Statistics'), Mage::helper('Mage_Reports_Helper_Data')->__('Statistics')); diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php index 64a086ba16a7fab6f8420d9d128783515454b77f..73409bcd1ff778176859c0ce924d5041891ed3d2 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php @@ -679,6 +679,8 @@ class Mage_Adminhtml_Sales_Order_ShipmentController extends Mage_Adminhtml_Contr */ protected function _createPdfPageFromImageString($imageString) { + /** @var Magento_Filesystem $filesystem */ + $filesystem = $this->_objectManager->get('Magento_Filesystem'); $image = imagecreatefromstring($imageString); if (!$image) { return false; @@ -694,7 +696,7 @@ class Mage_Adminhtml_Sales_Order_ShipmentController extends Mage_Adminhtml_Contr imagepng($image, $tmpFileName); $pdfImage = Zend_Pdf_Image::imageWithPath($tmpFileName); $page->drawImage($pdfImage, 0, 0, $xSize, $ySize); - unlink($tmpFileName); + $filesystem->delete($tmpFileName); return $page; } diff --git a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php index a12f348adfcb32af13e9fd17dabfe69c42ab580d..f08d4de6b9dc6d52cfa0daffa1205e156eac4aed 100644 --- a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php +++ b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php @@ -122,6 +122,7 @@ class Mage_Adminhtml_SitemapController extends Mage_Adminhtml_Controller_Action // check if data sent if ($data = $this->getRequest()->getPost()) { // init model and set data + /** @var Mage_Sitemap_Model_Sitemap $model */ $model = Mage::getModel('Mage_Sitemap_Model_Sitemap'); //validate path to generate @@ -145,12 +146,15 @@ class Mage_Adminhtml_SitemapController extends Mage_Adminhtml_Controller_Action return; } } + /** @var Magento_Filesystem $filesystem */ + $filesystem = $this->_objectManager->get('Magento_Filesystem'); + $filesystem->setWorkingDirectory($model->getSitemapPath()); if ($this->getRequest()->getParam('sitemap_id')) { $model ->load($this->getRequest()->getParam('sitemap_id')); - - if ($model->getSitemapFilename() && file_exists($model->getPreparedFilename())){ - unlink($model->getPreparedFilename()); + $fileName = $model->getSitemapFilename(); + if ($fileName && $filesystem->isFile($fileName)) { + $filesystem->delete($fileName); } } @@ -200,6 +204,8 @@ class Mage_Adminhtml_SitemapController extends Mage_Adminhtml_Controller_Action */ public function deleteAction() { + /** @var Magento_Filesystem $filesystem */ + $filesystem = $this->_objectManager->get('Magento_Filesystem'); // check if we know what should be deleted if ($id = $this->getRequest()->getParam('sitemap_id')) { try { @@ -211,8 +217,8 @@ class Mage_Adminhtml_SitemapController extends Mage_Adminhtml_Controller_Action /* @var $sitemap Mage_Sitemap_Model_Sitemap */ $model->load($id); // delete file - if ($model->getSitemapFilename() && file_exists($model->getPreparedFilename())){ - unlink($model->getPreparedFilename()); + if ($model->getSitemapFilename() && $filesystem->isFile($model->getPreparedFilename())) { + $filesystem->delete($model->getPreparedFilename()); } $model->delete(); // display success message diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php index b2e084d203e1faab5fd5b43209f5f77388d94446..516b781a255c53955c460d52226c6a2d7a56cac5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php @@ -330,7 +330,7 @@ class Mage_Adminhtml_Tax_RateController extends Mage_Adminhtml_Controller_Action $this->_title($this->__('Import and Export Tax Rates')); $this->loadLayout() - ->_setActiveMenu('Mage_Tax::sales_tax_import_export') + ->_setActiveMenu('Mage_Tax::system_convert_tax') ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Tax_Rate_ImportExportHeader')) ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Tax_Rate_ImportExport')) ->renderLayout(); diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml index ebfd2b3a2e15d004aba6c029e0d09c872520a5f8..ea6d1a6990891b67211eb82222760066296105c1 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml @@ -43,8 +43,7 @@ <adminhtml_catalog_product_new> <update handle="editor"/> <reference name="head"> - <action method="addCss"><file>Mage_Adminhtml::css/ui-lightness/jquery-ui-1.8.21.custom.css</file></action> - <action method="addCss"><file>Mage_Adminhtml::css/ui-lightness/tabs.css</file></action> + <action method="addCss"><file>Mage_Catalog::product/product.css</file></action> <action method="addCss"><file>Mage_Adminhtml::jquery/fileUploader/css/jquery.fileupload-ui.css</file></action> <action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.iframe-transport.js</file></action> <action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.fileupload.js</file></action> @@ -54,6 +53,7 @@ <action method="addCss"><file>Mage_Adminhtml::catalog/category-selector.css</file></action> <action method="addJs"><file>Mage_Adminhtml::catalog/category-selector.js</file></action> <action method="addJs"><file>Mage_Adminhtml::catalog/type-switcher.js</file></action> + <action method="addJs"><file>Mage_Adminhtml::catalog/product-variation.js</file></action> <action method="addJs"><file>Mage_Adminhtml::catalog/base-image-uploader.js</file></action> <action method="addCss"><file>Mage_Adminhtml::catalog/base-image-uploader.css</file></action> <action method="addCss"><file>Mage_Adminhtml::catalog/configurable-product.css</file></action> @@ -63,23 +63,35 @@ <container name="product-type-tabs" label="Tabs"> </container> </block> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet" name="attribute-set-info" template="Mage_Adminhtml::catalog/product/edit/attribute_set.phtml"></block> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory" name="new-category" template="Mage_Adminhtml::catalog/product/edit/category/new/form.phtml"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet" name="attribute-set-info" + template="Mage_Adminhtml::catalog/product/edit/attribute_set.phtml"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory" name="new-category" + template="Mage_Adminhtml::catalog/product/edit/category/new/form.phtml"/> + <block type="Mage_Core_Block_Template" name="affected-attribute-set-form" + template="Mage_Catalog::product/configurable/affected-attribute-set-selector/form.phtml"/> </reference> <reference name="left"> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs" name="product_tabs"></block> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs" name="product_tabs"/> </reference> <reference name="js"> - <block type="Mage_Core_Block_Template" name="change-attribute-set" template="Mage_Adminhtml::catalog/product/change_attribute_set_widget.phtml"/> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory" name="new-category-js" template="Mage_Adminhtml::catalog/product/edit/category/new/js.phtml"/> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Js" template="catalog/product/js.phtml" name="catalog_product_js"/> + <block type="Mage_Core_Block_Template" name="change-attribute-set" + template="Mage_Adminhtml::catalog/product/change_attribute_set_widget.phtml"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory" name="new-category-js" + template="Mage_Adminhtml::catalog/product/edit/category/new/js.phtml"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Js" name="catalog_product_js" + template="catalog/product/js.phtml" /> <block type="Mage_Core_Block_Template" template="Mage_Adminhtml::catalog/wysiwyg/js.phtml"/> + <block type="Mage_Catalog_Block_Product_Configurable_AttributeSelector" + template="Mage_Catalog::product/configurable/attribute-selector/js.phtml"/> + <block type="Mage_Catalog_Block_Product_Configurable_AttributeSelector" + template="Mage_Catalog::product/configurable/affected-attribute-set-selector/js.phtml"/> </reference> </adminhtml_catalog_product_new> <adminhtml_catalog_product_edit> <update handle="editor"/> <reference name="head"> + <action method="addCss"><file>Mage_Catalog::product/product.css</file></action> <action method="addCss"><file>Mage_Adminhtml::jquery/fileUploader/css/jquery.fileupload-ui.css</file></action> <action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.iframe-transport.js</file></action> <action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.fileupload.js</file></action> @@ -89,6 +101,7 @@ <action method="addCss"><file>Mage_Adminhtml::catalog/category-selector.css</file></action> <action method="addJs"><file>Mage_Adminhtml::catalog/category-selector.js</file></action> <action method="addJs"><file>Mage_Adminhtml::catalog/type-switcher.js</file></action> + <action method="addJs"><file>Mage_Adminhtml::catalog/product-variation.js</file></action> <action method="addJs"><file>Mage_Adminhtml::catalog/base-image-uploader.js</file></action> <action method="addCss"><file>Mage_Adminhtml::catalog/base-image-uploader.css</file></action> <action method="addCss"><file>Mage_Adminhtml::catalog/configurable-product.css</file></action> @@ -98,18 +111,29 @@ <container name="product-type-tabs" label="Tabs"> </container> </block> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet" name="attribute-set-info" template="Mage_Adminhtml::catalog/product/edit/attribute_set.phtml"></block> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory" name="new-category" template="Mage_Adminhtml::catalog/product/edit/category/new/form.phtml"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet" name="attribute-set-info" + template="Mage_Adminhtml::catalog/product/edit/attribute_set.phtml"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory" name="new-category" + template="Mage_Adminhtml::catalog/product/edit/category/new/form.phtml"/> + <block type="Mage_Core_Block_Template" name="affected-attribute-set-form" + template="Mage_Catalog::product/configurable/affected-attribute-set-selector/form.phtml"/> </reference> <reference name="left"> - <block type="Mage_Backend_Block_Store_Switcher" name="store_switcher" before="-"></block> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs" name="product_tabs"></block> + <block type="Mage_Backend_Block_Store_Switcher" name="store_switcher" before="-"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs" name="product_tabs"/> </reference> <reference name="js"> - <block type="Mage_Core_Block_Template" name="change-attribute-set" template="Mage_Adminhtml::catalog/product/change_attribute_set_widget.phtml"/> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory" name="new-category-js" template="Mage_Adminhtml::catalog/product/edit/category/new/js.phtml"/> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Js" template="catalog/product/js.phtml" name="catalog_product_js"/> + <block type="Mage_Core_Block_Template" name="change-attribute-set" + template="Mage_Adminhtml::catalog/product/change_attribute_set_widget.phtml"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory" name="new-category-js" + template="Mage_Adminhtml::catalog/product/edit/category/new/js.phtml"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Js" name="catalog_product_js" + template="catalog/product/js.phtml" /> <block type="Mage_Core_Block_Template" template="Mage_Adminhtml::catalog/wysiwyg/js.phtml"/> + <block type="Mage_Catalog_Block_Product_Configurable_AttributeSelector" + template="Mage_Catalog::product/configurable/attribute-selector/js.phtml"/> + <block type="Mage_Catalog_Block_Product_Configurable_AttributeSelector" + template="Mage_Catalog::product/configurable/affected-attribute-set-selector/js.phtml"/> </reference> </adminhtml_catalog_product_edit> @@ -195,6 +219,7 @@ <arguments> <header translate="true" module="Mage_Core">Name</header> <type>text</type> + <escape>1</escape> <index>name</index> <id>name</id> <filter>0</filter> @@ -217,6 +242,7 @@ <arguments> <header translate="true" module="Mage_Core">SKU</header> <type>text</type> + <escape>1</escape> <index>sku</index> <id>sku</id> <filter>0</filter> @@ -311,7 +337,17 @@ Layout handle for simple products <action method="addTab"><name>downloadable_items</name><block>Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable</block></action> </reference> <reference name="product-type-tabs"> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" name="admin.product.edit.tab.super.config.grid.container"></block> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" name="admin.product.edit.tab.super.config.grid.container"> + <block type="Mage_Core_Block_Template" name="attribute-block-template" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-js-template.phtml" + as="template"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Attribute" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-template.phtml" + as="attribute-renderer"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix" + template="Mage_Adminhtml::catalog/product/edit/super/matrix.phtml" + as="matrix"/> + </block> </reference> </adminhtml_catalog_product_simple> <!-- @@ -323,7 +359,17 @@ Layout handle for virtual products <action method="addTab"><name>downloadable_items</name><block>Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable</block></action> </reference> <reference name="product-type-tabs"> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" name="admin.product.edit.tab.super.config.grid.container"></block> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" name="admin.product.edit.tab.super.config.grid.container"> + <block type="Mage_Core_Block_Template" name="attribute-block-template" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-js-template.phtml" + as="template"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Attribute" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-template.phtml" + as="attribute-renderer"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix" + template="Mage_Adminhtml::catalog/product/edit/super/matrix.phtml" + as="matrix"/> + </block> </reference> </adminhtml_catalog_product_virtual> @@ -361,6 +407,14 @@ Layout handle for grouped products <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Group" name="catalog.product.edit.tab.super.group" /> </container> </adminhtml_catalog_product_supergroupgridonly> + + <adminhtml_catalog_product_variationsmatrix> + <container name="root" label="Root" output="1"> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix" + template="Mage_Adminhtml::catalog/product/edit/super/matrix.phtml" + as="matrix"/> + </container> + </adminhtml_catalog_product_variationsmatrix> <!-- Layout handle for configurable products --> @@ -368,14 +422,34 @@ Layout handle for configurable products <adminhtml_catalog_product_configurable_new> <update handle="adminhtml_catalog_product_superconfig_config"/> <reference name="product-type-tabs"> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" name="admin.product.edit.tab.super.config.grid.container"></block> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" name="admin.product.edit.tab.super.config.grid.container"> + <block type="Mage_Core_Block_Template" name="attribute-block-template" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-js-template.phtml" + as="template"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Attribute" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-template.phtml" + as="attribute-renderer"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix" + template="Mage_Adminhtml::catalog/product/edit/super/matrix.phtml" + as="matrix"/> + </block> </reference> </adminhtml_catalog_product_configurable_new> <adminhtml_catalog_product_configurable> <update handle="adminhtml_catalog_product_superconfig_config"/> <reference name="product-type-tabs"> - <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" name="admin.product.edit.tab.super.config.grid.container"></block> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" name="admin.product.edit.tab.super.config.grid.container"> + <block type="Mage_Core_Block_Template" name="attribute-block-template" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-js-template.phtml" + as="template"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Attribute" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-template.phtml" + as="attribute-renderer"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix" + template="Mage_Adminhtml::catalog/product/edit/super/matrix.phtml" + as="matrix"/> + </block> </reference> </adminhtml_catalog_product_configurable> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.css b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.css index 6921b01e0fe2b5fc6158da4a594a892351e1c7f5..dcf636b05a8b28965df663af239ff9450bb2bab9 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.css +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.css @@ -23,26 +23,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -#product-edit-form-tabs .base-image-uploader { - max-height: 265px; - max-width: 180px; -} - -#product-edit-form-tabs > div:first-of-type { - min-width: 940px; -} - #product-edit-form-tabs > div:first-of-type .hor-scroll { width: auto; - padding-right: 200px; overflow: visible; position: relative; } -#product-edit-form-tabs #image_image { - position: absolute; - right: 0; -} + #product-edit-form-tabs #qty { width: 50px; @@ -59,3 +46,111 @@ height: auto; min-height: 3em; } + +#product-edit-form-tabs #image-container { + border: 2px dotted #CCC; + border-radius: 5px; + padding: 6px 15px; + margin-right: 8px; + height: 140px; +} + +#product-edit-form-tabs #image-container > span.container { + padding: 3px; + margin: 3px; + cursor: move; + display: inline-block; + vertical-align: top; + background: #fff; + border: 1px solid #ccc; + border-radius: 3px; + width: 100px; + height: 120px; + overflow: hidden; +} + +#product-edit-form-tabs #image-container > span:hover { + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); +} + +#product-edit-form-tabs .base-image-uploader { + max-height: 80px; + max-width: 100px; +} + +#product-edit-form-tabs #image-upload-placeholder { + width: 100px; + height: 120px; + background: #fff url('Mage_Adminhtml::images/image-placeholder.png') no-repeat; + vertical-align: top; + display: inline-block; + border: 1px solid #ccc; + border-radius: 3px; + padding: 3px; + margin: 3px; +} + +#product-edit-form-tabs #image-container .container .main-sticker { + display: none; +} + +#product-edit-form-tabs #image-container .container.base-image .main-sticker { + color: #fff; + background-color: orange; + padding: 0 39px 0 25px; + -moz-transform: rotate(-50deg); + -webkit-transform: rotate(-50deg); + -o-transform: rotate(-50deg); + -ms-transform: rotate(-50deg); + transform: rotate(-50deg); + display: block; + margin-left: -64px; +} + +#product-edit-form-tabs #image-container .container .close { + font-size: 20px; + line-height: 10px; + float: right; + cursor: pointer; + position: relative; + margin-bottom: -20px; + padding-top: 10px; + z-index: 1; + visibility: hidden; + background: #fff; +} + +#product-edit-form-tabs #image-container .container.base-image .close { + top: -18px; +} + +#product-edit-form-tabs #image-container .container.active .close { + visibility: visible; +} + +#product-edit-form-tabs #image-container .container .drag-zone button, +#product-edit-form-tabs #image-container .container.base-image .drag-zone button.make-main { + display: none; +} + +#product-edit-form-tabs #image-container .container, #product-edit-form-tabs #image-container .container .drag-zone { + text-align: center; +} + +#product-edit-form-tabs #image-container .container .drag-zone { + position: absolute; + top: 145px; + width: 100px; +} + +#product-edit-form-tabs #image-container .container.active .drag-zone button { + display: inline-block; +} + +#product-edit-form-tabs #image-container .container img { + margin-top: 10px; +} + +#product-edit-form-tabs #image-container .container.base-image img { + margin-top: -8px; +} diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.js index ac7bebe4e8879f0e9a5ea207b5958f7f7b7771a8..f9bdf5ecb86d94ac3ecd2be0d9177949034c30cf 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.js @@ -22,36 +22,137 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ +/*global media_gallery_contentJsObject*/ +// @todo: refactor as widget function BaseImageUploader(id, maxFileSize) { (function ($) { - $('#' + id + '_upload').fileupload({ + var $container = $('#' + id + '-container'), + $template = $('#' + id + '-template'), + $dropPlaceholder = $('#' + id + '-upload-placeholder'), + images = $container.data('images'), + mainImage = $container.data('main'), + mainClass = 'base-image', + currentImageCount = 0, + maximumImageCount = 5, + isInitialized = false; + + $container.on('add', function(event, data) { + if (currentImageCount < maximumImageCount) { + var $element = $template.tmpl(data); + $element.insertBefore($dropPlaceholder) + .data('image', data); + if (isInitialized && !currentImageCount) { + $.each('image,small_image,thumbnail'.split(','), function () { + if ($('input[name="product[' + this + ']"][value=no_selection]').is(':checked')) { + media_gallery_contentJsObject.imagesValues[this] = data.file; + if (this == 'image') { + mainImage = data.file; + } + } + }); + } + if (data.file == mainImage) { + $element.addClass(mainClass); + } + currentImageCount++; + } + if (currentImageCount >= maximumImageCount) { + $dropPlaceholder.hide(); + } + $('input[name="product[name]"]').focus().blur(); // prevent just inserted image selection + }); + + $container.on('click', '.container', function (event) { + $(this).toggleClass('active').siblings().removeClass('active'); + }); + $container.on('click', '.make-main', function (event) { + var $imageContainer = $(this).closest('.container'), + image = $imageContainer.data('image'); + + $container.find('.container').removeClass(mainClass); + $imageContainer.addClass(mainClass); + mainImage = image.file; + + var $galleryContainer = $('#media_gallery_content_grid'), + $currentImage = $galleryContainer.find('input[name="product[image]"]:checked'), + $currentSmallImage = $galleryContainer.find('input[name="product[small_image]"]:checked'), + $currentThumbnail = $galleryContainer.find('input[name="product[thumbnail]"]:checked'), + radiosToSwitch = 'input[name="product[image]"]'; + if ($currentImage.attr('onclick') == $currentSmallImage.attr('onclick') + && $currentImage.attr('onclick') == $currentThumbnail.attr('onclick') + ) { + radiosToSwitch += ',input[name="product[small_image]"],input[name="product[thumbnail]"]'; + } + _getGalleryRowByImage(image).find(radiosToSwitch).trigger('click'); + }); + + $container.on('click', '.close', function (event) { + var $imageContainer = $(this).closest('.container'), + image = $imageContainer.data('image'), + $galleryRow = _getGalleryRowByImage(image); + + $galleryRow.find('.cell-remove input[type=checkbox]').prop('checked', true).trigger('click'); + $.each('image,small_image,thumbnail'.split(','), function () { + if ($galleryRow.find('input[name="product[' + this + ']"]').is(':checked')) { + $('input[name="product[' + this + ']"][value=no_selection]').prop('checked', true).trigger('click'); + } + }); + media_gallery_contentJsObject.updateImages(); + $imageContainer.remove(); + + currentImageCount--; + if (currentImageCount < maximumImageCount) { + $dropPlaceholder.css('display', 'inline-block'); + } + }); + + function _getGalleryRowByImage(image) + { + var escapedFileName = image.file.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g, '\\$1'); + return $('input[onclick*="\'' + escapedFileName + '\'"]').closest('tr'); + } + + $container.sortable({ + axis: 'x', + handle: '.container' + }); + + $dropPlaceholder.on('click', function(e) { + $('#' + id + '-upload').trigger(e); + }); + $('#' + id + '-upload').fileupload({ dataType: 'json', - dropZone: '#' + id + '_image', + dropZone: $dropPlaceholder, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, maxFileSize: maxFileSize, - done: function (e, data) { + done: function (event, data) { if (!data.result) { return; } if (!data.result.error) { - $('#' + id + '_image').attr({src: data.result.url, - title: data.result.url, - alt: data.result.url}); - $('#' + id).val(data.result.file); + $container.trigger('add', data.result); if (typeof media_gallery_contentJsObject != 'undefined') { media_gallery_contentJsObject.handleUploadComplete(data.result); - media_gallery_contentJsObject.imagesValues.image = data.result.file; media_gallery_contentJsObject.updateImages(); } } else { alert(jQuery.mage.__('File extension not known or unsupported type.')); } }, - add: function(e, data) { + add: function(event, data) { $(this).fileupload('process', data).done(function () { data.submit(); }); } }); + + $.each(images.items || [], function() { + $container.trigger('add', this); + }); + isInitialized = true; + + if ($('label[for=image]').text() == 'Base Image') { + $('label[for=image]').text('Images'); + } })(jQuery); } diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category-selector.css b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category-selector.css index bc222a1b47b90bcfb3e0da3b43d6f26fe5955958..e24950e4af7a430390204c6e6605d86f9213e26d 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category-selector.css +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category-selector.css @@ -193,7 +193,7 @@ margin-top:4px; } -.category-selector-search input.category-selector-active, input.input-text.parent-category-selector-active { +.category-selector-search input.ui-autocomplete-loading, input.input-text.ui-autocomplete-loading { background:#fff url('images/spinner.gif') no-repeat 100%; background:url('images/spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); background:url('images/spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); @@ -298,7 +298,7 @@ .category-selector-results .category-selector-disabled { display:none; } -.category-selector-more-results.category-selector-active { +.category-selector-more-results.ui-autocomplete-loading { background:#f4f4f4 url('images/spinner.gif') no-repeat 100%; } @@ -370,7 +370,7 @@ box-shadow:none; } -.category-selector-container-multi .category-selector-choices .category-selector-search-field input.category-selector-active { +.category-selector-container-multi .category-selector-choices .category-selector-search-field input.ui-autocomplete-loading { background:#fff url('images/spinner.gif') no-repeat 100% !important; } @@ -546,7 +546,6 @@ } .button:hover { - color: #333; text-decoration: none; background: #f9f9f9; background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y5ZjlmOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlNmU2ZTYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category-selector.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category-selector.js index 1f7be5564d06aac3af9109a2c3f4311d3ffab7f9..3ca48f75a23651d757d1be0908b0af1faf7b9631 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category-selector.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category-selector.js @@ -88,14 +88,6 @@ }); $input.bind('ajaxSend ajaxComplete', function(e) { e.stopPropagation(); - switch (e.type) { - case 'ajaxSend': - $input.addClass('category-selector-active'); - break; - case 'ajaxComplete': - $input.removeClass('category-selector-active'); - break; - } }); $input.autocomplete({ source: function(request, response) { @@ -145,7 +137,7 @@ .text(item.label) .css({marginLeft: level * 16}) ); - if (window.parseInt(item.item.is_active, 10) == 0) { + if (window.parseInt(item.item.is_active, 10) === 0) { $li.addClass('category-disabled'); } if (elementPresent(item)) { diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.js index 7ea1a5d0ca2f5dfe51af9793932c9cff7cdc0a51..935133ecca790dcd21c7ed0148d28694f189842f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.js @@ -22,58 +22,6 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -(function($){ - $.widget("mage.categoryForm", $.mage.form, { - options: { - categoryIdSelector : 'input[name="general[id]"]', - categoryPathSelector : 'input[name="general[path]"]' - }, - /** - * Form creation - * @protected - */ - _create: function() { - this._super('_create'); - $('body').on('categoryMove.tree', $.proxy(this.refreshPath, this)); - }, - /** - * Sending ajax to server to refresh field 'general[path]' - * @protected - */ - refreshPath: function() { - if (!this.element.find(this.options.categoryIdSelector).prop('value')) { - return false; - } - new Ajax.Request( - this.options.refreshUrl, - { - method: 'POST', - evalScripts: true, - onSuccess: this._refreshPathSuccess.bind(this) - } - ); - }, - /** - * Refresh field 'general[path]' on ajax success - * @param {Object} The XMLHttpRequest object returned by ajax - * @protected - */ - _refreshPathSuccess: function(transport) { - if (transport.responseText.isJSON()) { - var response = transport.responseText.evalJSON(); - if (response.error) { - alert(response.message); - } else { - if (this.element.find(this.options.categoryIdSelector).prop('value') === response.id) { - this.element.find(this.options.categoryPathSelector) - .prop('value', response.path); - } - } - } - } - }); -})(jQuery); - /** * Create/edit some category */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.phtml index f72fdc529787e6bc5395319385dd590db0d4dc1e..e516d31ee3defd36b231d1f76f29569f7585ae08 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.phtml @@ -72,7 +72,7 @@ params.form_key = FORM_KEY; } - toolbarToggle.stop(); + jQuery('.content-header').floatingHeader('destroy'); /*if(params.node_name) { @@ -96,7 +96,7 @@ if (refreshTree) { thisObj.refreshTreeArea(); } - toolbarToggle.start(); + jQuery('.content-header').floatingHeader(); } catch (e) { alert(e.message); }; diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml index 6c7729cd7bee4fb67e04fd27bee58d43d8129330..b9fa3d8214d4583805003f0ff373612b585d6e4d 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml @@ -54,14 +54,16 @@ <div id="category_tab_content"></div> </form> <script type="text/javascript"> -//<![CDATA[ - jQuery('#category_edit_form').categoryForm({ - refreshUrl: '<?php echo $this->getRefreshPathUrl() ?>' - }).validation({submitHandler: function(form){ - form.submit(); - displayLoadingMask(); - }}); - + (function($) { + $.mage.extend('categoryForm', 'form', + '<?php echo $this->getViewFileUrl('Mage_Adminhtml::catalog/category/form.js') ?>'); + $('#category_edit_form') + .mage('categoryForm', {refreshUrl: '<?php echo $this->getRefreshPathUrl() ?>'}) + .mage('validation', {submitHandler: function(form){ + form.submit(); + displayLoadingMask(); + }}); + })(jQuery); <?php if(($block = $this->getLayout()->getBlock('category.product.grid')) && ($_gridJsObject=$block->getJsObjectName())): ?> var categoryProducts = $H(<?php echo $this->getProductsJson() ?>); @@ -131,5 +133,4 @@ } $('active_tab_id').tabsJsObject = jQuery('#<?php echo $tabsBlock->getId() ?>'); <?php endif; ?> -//]]> </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/form.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/form.js new file mode 100644 index 0000000000000000000000000000000000000000..33156cddfdea8318eeb7ac9c7715589506833d37 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/form.js @@ -0,0 +1,82 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true browser:true*/ +/*global Ajax:true alert:true*/ +(function($){ + "use strict"; + $.widget("mage.categoryForm", $.mage.form, { + options: { + categoryIdSelector : 'input[name="general[id]"]', + categoryPathSelector : 'input[name="general[path]"]' + }, + + /** + * Form creation + * @protected + */ + _create: function() { + this._super(); + $('body').on('categoryMove.tree', $.proxy(this.refreshPath, this)); + }, + + /** + * Sending ajax to server to refresh field 'general[path]' + * @protected + */ + refreshPath: function() { + if (!this.element.find(this.options.categoryIdSelector).prop('value')) { + return false; + } + // @TODO delete this prototype functional + new Ajax.Request( + this.options.refreshUrl, + { + method: 'POST', + evalScripts: true, + onSuccess: this._refreshPathSuccess.bind(this) + } + ); + }, + + /** + * Refresh field 'general[path]' on ajax success + * @param {Object} The XMLHttpRequest object returned by ajax + * @protected + */ + _refreshPathSuccess: function(transport) { + if (transport.responseText.isJSON()) { + var response = transport.responseText.evalJSON(); + if (response.error) { + alert(response.message); + } else { + if (this.element.find(this.options.categoryIdSelector).prop('value') === response.id) { + this.element.find(this.options.categoryPathSelector) + .prop('value', response.path); + } + } + } + } + }); +})(jQuery); diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/configurable-product.css b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/configurable-product.css index 496cf99a028c2aec6648fcdf0c0b1ee54ad1d79b..514b8fdd0faff3941969f2e93ccf5b427baf5216 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/configurable-product.css +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/configurable-product.css @@ -22,7 +22,51 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ + #configurable_associated_products_grid .filter-actions, #configurable_associated_products_grid .filter { display: none; } + +input.ui-autocomplete-loading { + background:#fff url('images/spinner.gif') no-repeat 100%; + background:url('images/spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); + background:url('images/spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); + background:url('images/spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); + background:url('images/spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%); + background:url('images/spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%); + background:url('images/spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%); +} + +#attributes-container { + padding-bottom: 15px; +} + +#attributes-container .entry-edit > fieldset { + margin-bottom: 0; +} +#attributes-container .column-price { + visibility: hidden; +} + +#attributes-container .have-price .column-price { + visibility: visible; +} + +#attributes-container .ui-icon-circle-triangle-s, #attributes-container .ui-icon-circle-close { + cursor: pointer; + float: right; + margin-left: 4px; +} + +#attributes-container tr:hover { + outline: 1px dotted rgba(128, 128, 128, 0.2); +} + +#affected-attribute-set-new-container, #affected-attribute-set-new-name-container { + margin-top: 10px; +} + +#affected-attribute-set-new-name-container input { + width: 99%; +} diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product-variation.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product-variation.js new file mode 100644 index 0000000000000000000000000000000000000000..1b8f4f993b98b372a027aa35ac80105a6eb19b00 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product-variation.js @@ -0,0 +1,101 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Adminhtml + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +(function($) { + $.widget('mage.variationsAttributes', { + _create: function () { + this.element.sortable({ + axis: 'y', + handle: '.entry-edit-head', + update: function () { + $(this).find('[name$="[position]"]').each(function (index) { + $(this).val(index); + }); + } + }); + + var havePriceVariationsCheckboxHandler = function (event) { + var $this = $(event.target), + $block = $this.closest('.entry-edit'); + if ($this.is(':checked')) { + $block.addClass('have-price'); + } else { + $block.removeClass('have-price'); + $block.find('.pricing-value').val(''); + } + }; + var useDefaultCheckboxHandler = function (event) { + var $this = $(event.target); + $this.closest('.fieldset-legend').find('.store-label').prop('disabled', $this.is(':checked')); + }; + var updateGenerateVariationsButtonAvailability = function () { + var isDisabled = $('#attributes-container .entry-edit:not(:has(input.include:checked))').length > 0 || + !$('#attributes-container .entry-edit').length; + $('#generate-variations-button').prop('disabled', isDisabled).toggleClass('disabled', isDisabled); + }; + + this._on({ + 'click input.price-variation': havePriceVariationsCheckboxHandler, + 'change input.price-variation': havePriceVariationsCheckboxHandler, + 'click .remove': function (event) { + var $entity = $(event.target).closest('.entry-edit'); + $('#attribute-' + $entity.find('[name$="[code]"]').val() + '-container select').removeAttr('disabled'); + $entity.remove(); + updateGenerateVariationsButtonAvailability(); + }, + 'click .toggle': function (event) { + $(event.target).parent().next('fieldset').toggle(); + }, + 'click input.include': updateGenerateVariationsButtonAvailability, + 'add': function (event, attribute) { + $('#attribute-template').tmpl({attribute: attribute}).appendTo($(event.target)); + $('#attribute-' + attribute.code + '-container select').prop('disabled', true); + updateGenerateVariationsButtonAvailability(); + }, + 'click .use-default': useDefaultCheckboxHandler, + 'change .use-default': useDefaultCheckboxHandler + }); + updateGenerateVariationsButtonAvailability(); + }, + /** + * Retrieve list of attributes + * + * @return {Array} + */ + getAttributes: function () { + return $.map( + $(this.element).find('.entry-edit') || [], + function (attribute) { + var $attribute = $(attribute); + return { + id: $attribute.find('[name$="[attribute_id]"]').val(), + code: $attribute.find('[name$="[code]"]').val(), + label: $attribute.find('[name$="[label]"]').val(), + position: $attribute.find('[name$="[position]"]').val() + }; + } + ); + } + }); +})(jQuery); diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js index 7989ebf420ef7b62cc9a6c588b2632288c070bf6..e5df89f39bd71ab46ff5b6e6433f4a0539b85235 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js @@ -748,91 +748,6 @@ Product.Configurable.prototype = { }); $(this.idPrefix + 'simple_form').advicesInited = true; }, - quickCreateNewProduct : function() { - this.initializeAdvicesForSimpleForm(); - $(this.idPrefix + 'simple_form').removeClassName('ignore-validate'); - var validationResult = $(this.idPrefix + 'simple_form').select('input', - 'select', 'textarea').collect( function(elm) { - return Validation.validate(elm, { - useTitle :false, - onElementValidate : function() { - } - }); - }).all(); - $(this.idPrefix + 'simple_form').addClassName('ignore-validate'); - - if (!validationResult) { - return; - } - - var params = Form.serializeElements($(this.idPrefix + 'simple_form') - .select('input', 'select', 'textarea'), true); - params.form_key = FORM_KEY; - $('messages').update(); - new Ajax.Request(this.createQuickUrl, { - parameters :params, - method :'post', - area :$(this.idPrefix + 'simple_form'), - onComplete :this.quickCreateNewProductComplete.bind(this) - }); - }, - quickCreateNewProductComplete : function(transport) { - var result = transport.responseText.evalJSON(); - - if (result.error) { - if (result.error.fields) { - $(this.idPrefix + 'simple_form').removeClassName( - 'ignore-validate'); - $H(result.error.fields) - .each( - function(pair) { - $('simple_product_' + pair.key).value = pair.value; - $('simple_product_' + pair.key + '_autogenerate').checked = false; - toggleValueElements( - $('simple_product_' + pair.key + '_autogenerate'), - $('simple_product_' + pair.key + '_autogenerate').parentNode); - Validation.ajaxError( - $('simple_product_' + pair.key), - result.error.message); - }); - $(this.idPrefix + 'simple_form') - .addClassName('ignore-validate'); - } else { - if (result.error.message) { - alert(result.error.message); - } else { - alert(result.error); - } - } - return; - } else if (result.messages) { - $('messages').update(result.messages); - } - - result.attributes - .each( function(attribute) { - var attr = this.getAttributeById(attribute.attribute_id); - if (!this.getValueByIndex(attr, attribute.value_index) - && result.pricing - && result.pricing[attr.attribute_code]) { - - attribute.is_percent = result.pricing[attr.attribute_code].is_percent; - attribute.pricing_value = (result.pricing[attr.attribute_code].value == null ? '' - : result.pricing[attr.attribute_code].value); - } - }.bind(this)); - - this.attributes.each( function(attribute) { - if ($('simple_product_' + attribute.attribute_code)) { - $('simple_product_' + attribute.attribute_code).value = ''; - } - }.bind(this)); - - this.links.set(result.product_id, result.attributes); - this.updateGrid(); - this.updateValues(); - this.grid.reload(); - }, checkCreationUniqueAttributes : function() { var attributes = []; this.attributes diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main.phtml index c409fd87b6101c754dd2527fb02f9f4e13e35220..dd2e78148bceb43533c02b1d00af0cf7629243fa 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main.phtml @@ -41,6 +41,9 @@ <tr> <td width="360" style="border-right:1px solid #ddd; padding:0 23px 23px 0;" class="edit-attribute-set"> <?php echo $this->getSetFormHtml() ?> + <script type="text/javascript"> + jQuery('#set-prop-form').mage('validation', {errorClass: 'mage-error'}); + </script> </td> <td width="320" style="border-right:1px solid #ddd; padding:0 23px 23px 23px;"> <div class="content-header skip-header"> @@ -336,8 +339,7 @@ save : function() { $('messages').update(); TreePanels.rebuildTrees(); - var _validator = new Validation('set-prop-form', {onSubmit:false}); - if( !_validator.validate() ) { + if(!jQuery('#set-prop-form').valid()) { return; } editSet.req.attribute_set_name = $('attribute_set_name').value; diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml index 9054cd22406b37c0952bf426f41e06d70dd0a764..53746ec35abf26f69e21d182599c4a2c58cd47d8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml @@ -37,5 +37,5 @@ </div> <?php echo $this->getFormHtml() ?> <script type="text/javascript"> - jQuery('#<?php echo $this->getFormId();?>').form().validation(); + jQuery('#<?php echo $this->getFormId();?>').mage('form').mage('validation'); </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.phtml index 0470bff7c3abd27c3ca060570d3305b730f33f8b..2311ed650c52a73419696de8fb21fd901e4c27d7 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.phtml @@ -49,6 +49,6 @@ <div id="product_composite_configure_confirmed" style="display:none;"></div> <script type="text/javascript"> - jQuery('#product_composite_configure_form').form().validation(); + jQuery('#product_composite_configure_form').mage('form').mage('validation'); </script> </div> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml index f415d650888706bb1e23efff5e0d56186c833dc1..0f9f54be33f3f061cc057e2902cc6e015aaf882d 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml @@ -30,11 +30,9 @@ */ ?> - - <div class="content-header"> <h3 class="icon-head head-products"><?php echo $this->getHeader() ?></h3> - <p class="content-buttons form-buttons"><?php echo $this->getBackButtonHtml() ?> + <div class="content-buttons form-buttons"><?php echo $this->getBackButtonHtml() ?> <?php echo $this->getCancelButtonHtml() ?> <?php if($this->getProductId()): ?> <?php echo $this->getDeleteButtonHtml() ?> @@ -44,10 +42,9 @@ <?php endif; ?> <?php if ($this->getProductSetId()): ?> <?php echo $this->getChangeAttributeSetButtonHtml() ?> - <?php echo $this->getSaveButtonHtml() ?> - <?php echo $this->getSaveAndEditButtonHtml() ?> + <?php echo $this->getSaveSplitButtonHtml(); ?> <?php endif; ?> - </p> + </div> </div> <form action="<?php echo $this->getSaveUrl() ?>" method="post" id="product-edit-form" enctype="multipart/form-data"> <?php echo $this->getBlockHtml('formkey')?> @@ -55,9 +52,9 @@ <?php echo $this->getChildHtml('product-type-tabs') ?> </form> <script type="text/javascript"> -//<![CDATA[ var productTemplateSyntax = /(^|.|\r|\n)({{(\w+)}})/; - jQuery('#product-edit-form').form().validation({validationUrl: '<?php echo $this->getValidationUrl() ?>'}); + jQuery('#product-edit-form').mage('form') + .mage('validation', {validationUrl: '<?php echo $this->getValidationUrl() ?>'}); function setSettings(urlTemplate, setElement, typeElement) { var template = new Template(urlTemplate, productTemplateSyntax); setLocation(template.evaluate({attribute_set:$F(setElement),type:$F(typeElement)})); @@ -91,97 +88,111 @@ return 1; } -jQuery(function() { +jQuery(function($) { <?php if ($this->getSelectedTabId()): ?> - if(jQuery('#<?php echo $this->getSelectedTabId() ?>').length) { - jQuery('#<?php echo $this->getSelectedTabId() ?>').trigger('click'); + if($('#<?php echo $this->getSelectedTabId() ?>').length) { + $('#<?php echo $this->getSelectedTabId() ?>').trigger('click'); } <?php endif; ?> - jQuery(window).on('tabsbeforeactivate', function(e, ui){ - jQuery('#config_super_product')[ui.newTab.index() ? 'hide' : 'show'](); - }).triggerHandler('tabsbeforeactivate', [{newTab: jQuery('#<?php echo $this->getSelectedTabId() ?>').closest('li')}]); - - (function ($) { - - var masks = <?php echo $this->helper('Mage_Core_Helper_Data')->jsonEncode($this->getFieldsAutogenerationMasks())?>; - var availablePlaceholders = <?php echo $this->helper('Mage_Core_Helper_Data')->jsonEncode($this->getAttributesAllowedForAutogeneration())?>; - var Autogenerator = function(masks) { - this._masks = masks || {}; - this._fieldReverseIndex = this._buildReverseIndex(this._masks); - }; - - $.extend(Autogenerator.prototype, { - varRegexp: /{{([\w_]+?)}}/, - varsRegexp: new RegExp('{{(' + availablePlaceholders.join('|') + ')}}', 'g'), - data: { - disabled: 'autogenerator-disabled' - }, - bindAll: function(events) { - var self = this; - - $.each(self._masks, function(field, mask) { - var disabler = function() { - $(this).data(self.data.disabled, $(this).val().replace(/\s/g, '') != ''); - }; - var $field = $('#' + field); - if (!$field.val() && mask.length > 0 && !self.varRegexp.test(mask)) { - $field.val(mask); - } - if ($field.length) { - disabler.call($field); - $field.bind('focus blur change keyup click', disabler); - } - }); - - $.each(self._fieldReverseIndex, function(field) { - var fields = this, $field = $('#' + field); - var filler = function(onlyText) { - $.each(fields, function() { - var $el = $('#' + this); - if ($el.data(self.data.disabled)) { - return; - } - if (onlyText === true && self.varRegexp.test(self._masks[this])) { - return; - } - var value = self._masks[this].replace(self.varsRegexp, function(maskfieldName) { - return $('#' + maskfieldName.slice(2, -2)).val(); - }); - $el.val(value); + $('#product_info_tabs').on('tabsbeforeactivate', function (event, ui) { + $('#config_super_product')[$(ui.newPanel).find('#attribute-name-container').length ? 'show' : 'hide'](); + }); + + var masks = <?php echo $this->helper('Mage_Core_Helper_Data')->jsonEncode($this->getFieldsAutogenerationMasks())?>; + var availablePlaceholders = <?php echo $this->helper('Mage_Core_Helper_Data')->jsonEncode($this->getAttributesAllowedForAutogeneration())?>; + var Autogenerator = function(masks) { + this._masks = masks || {}; + this._fieldReverseIndex = this._buildReverseIndex(this._masks); + }; + + $.extend(Autogenerator.prototype, { + varRegexp: /{{([\w_]+?)}}/, + varsRegexp: new RegExp('{{(' + availablePlaceholders.join('|') + ')}}', 'g'), + data: { + disabled: 'autogenerator-disabled' + }, + bindAll: function(events) { + var self = this; + + $.each(self._masks, function(field, mask) { + var disabler = function() { + $(this).data(self.data.disabled, $(this).val().replace(/\s/g, '') != ''); + }; + var $field = $('#' + field); + if (!$field.val() && mask.length > 0 && !self.varRegexp.test(mask)) { + $field.val(mask); + } + if ($field.length) { + disabler.call($field); + $field.bind('focus blur change keyup click', disabler); + } + }); + + $.each(self._fieldReverseIndex, function(field) { + var fields = this, $field = $('#' + field); + var filler = function(onlyText) { + $.each(fields, function() { + var $el = $('#' + this); + if ($el.data(self.data.disabled)) { + return; + } + if (onlyText === true && self.varRegexp.test(self._masks[this])) { + return; + } + var value = self._masks[this].replace(self.varsRegexp, function(maskfieldName) { + return $('#' + maskfieldName.slice(2, -2)).val(); }); - }; - if ($field.length) { - $field.bind(events || 'keyup change blur click', filler); - filler.call($field, true); + $el.val(value); + + }); + }; + if ($field.length) { + $field.bind(events || 'keyup change blur click', filler); + filler.call($field, true); + } + + }); + }, + _buildReverseIndex: function(masks) { + var self = this; + var fieldReverseIndex = {}; + $.each(masks, function(field, mask) { + $.each(mask.toString().match(self.varsRegexp) || [], function(key, maskName) { + var fieldName = maskName.slice(2, -2); + if (!(fieldName in fieldReverseIndex)) { + fieldReverseIndex[fieldName] = []; } + fieldReverseIndex[fieldName].push(field); + }) + }); + return fieldReverseIndex; + } + }); - }); - }, - _buildReverseIndex: function(masks) { - var self = this; - var fieldReverseIndex = {}; - $.each(masks, function(field, mask) { - $.each(mask.toString().match(self.varsRegexp) || [], function(key, maskName) { - var fieldName = maskName.slice(2, -2); - if (!(fieldName in fieldReverseIndex)) { - fieldReverseIndex[fieldName] = []; - } - fieldReverseIndex[fieldName].push(field); - }) - }); - return fieldReverseIndex; - } - }); - - new Autogenerator(masks).bindAll(); - })(jQuery); -}); + new Autogenerator(masks).bindAll(); -jQuery(function($) { var data = <?php echo $this->getTypeSwitcherData();?>; new TypeSwitcher(data).bindAll(); -}); -//]]> + $('.widget-button-save .item-default, #save-split-button-duplicate-button[onclick=""]').parent().hide(); + var $form = $('#product-edit-form'), + fieldSelector = '.required-entry, .required-option-select'; + $form.on('focus change keyup click', fieldSelector + ',:checkbox,button', function () { + var disabled = false; + $.each($form.find(fieldSelector), function () { + if (!$.trim($(this).val()) && !$(this).closest('.ignore-validate').length + && $(this).is('input, select, textarea') && !$(this).prop('disabled') + ) { + disabled = true; + return false; + } + }); + $('.widget-button-save, .widget-button-save > *').toggleClass('disabled', disabled).prop('disabled', disabled); + }); + + $(window).load(function() { + $('#name').focus().val($('#name').val()); + }); +}); </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/attribute.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/attribute.phtml index f41f930d1db1d3379c75dfcc2fef979ca7c12f49..8889d02204064d6f98f182e5ec680a6971168de0 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/attribute.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/attribute.phtml @@ -40,5 +40,6 @@ <?php echo $this->getBlockHtml('formkey')?> </form> <script type="text/javascript"> - jQuery('#attributes-edit-form').form().validation({validationUrl: '<?php echo $this->getValidationUrl() ?>'}); + jQuery('#attributes-edit-form').mage('form') + .mage('validation', {validationUrl: '<?php echo $this->getValidationUrl() ?>'}); </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/category/new/js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/category/new/js.phtml index 0df1d1b1614b0b6a94924952d9a561d4f0b2b187..30ebed16b6579c532d6f880054aaa41414786708 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/category/new/js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/category/new/js.phtml @@ -55,14 +55,6 @@ .addClass('validate-parent-category') // adjusting validation rules order .bind('ajaxSend ajaxComplete', function(e) { e.stopPropagation(); - switch (e.type) { - case 'ajaxSend': - $('#new_category_parent').addClass('parent-category-selector-active'); - break; - case 'ajaxComplete': - $('#new_category_parent').removeClass('parent-category-selector-active'); - break; - } }) .autocomplete({ source: function(request, response) { diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml index 4a9dec2c885df314b0b9599a8a9febd03f2b6b53..82395c69ab62ce78c48357aa46b78c96fdc6fb40 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml @@ -353,12 +353,16 @@ window.productOptionScope.bindScopeCheckbox(); (function($) { $(function(){ $('#import_new_defined_option').click(function (){ - $('#import-container').load("<?php echo $this->getProductGridUrl()?>", function() { - $('#productGrid_massaction-form button').click(function (){ - $('#import-custom-options-apply-button').trigger('click', 'massActionTrigger'); - }); - $('#import-container').dialog('open'); - }); + $('#import-container').load( + "<?php echo $this->getProductGridUrl()?>", + {form_key: '<?php echo $this->getFormKey()?>'}, + function() { + $('#productGrid_massaction-form button').click(function() { + $('#import-custom-options-apply-button').trigger('click', 'massActionTrigger'); + }); + $('#import-container').dialog('open'); + } + ); }); $('#import-container').dialog({ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml new file mode 100644 index 0000000000000000000000000000000000000000..5b8eb223ed8cc83ffa6c3bba7dac5efc9b38486b --- /dev/null +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml @@ -0,0 +1,113 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/* @var $this Mage_Core_Block_Template */ +?> +<script id="attribute-template" type="text/x-jquery-tmpl"> + <div class="entry-edit"> + <input name="attributes[]" id="configurable_attribute_${attribute.id}" + value="${attribute.id}" type="hidden"> + <input value="new" type="hidden" + name="product[configurable_attributes_data][${attribute.id}]][id]"/> + <input value="${attribute.id}" type="hidden" + name="product[configurable_attributes_data][${attribute.id}][attribute_id]"/> + <input value="" type="hidden" + name="product[configurable_attributes_data][${attribute.id}][position]"/> + <input value="${attribute.code}" type="hidden" + name="product[configurable_attributes_data][${attribute.id}][code]"/> + + <div class="entry-edit-head" style="cursor: move;"> + <span class="ui-icon ui-icon-arrowthick-2-n-s" style="float:left"></span> + <h4 class="icon-head head-edit-form fieldset-legend"> + <input value="${attribute.label}" + name="product[configurable_attributes_data][${attribute.id}][label]" + data-store-label="${attribute.label}" + class="store-label required-entry"/> + <label for="attribute-${attribute.id}"> + <input value="1" + type="checkbox" + class="use-default" + name="product[configurable_attributes_data][${attribute.id}][use_default]" + id="attribute-${attribute.id}"/> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use default')?> + </h4> + <span class="ui-icon ui-icon-circle-close remove"></span> + <span class="ui-icon ui-icon-circle-triangle-s toggle"></span> + </div> + <fieldset> + <table style="width:100%"> + <thead> + <tr> + <th> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Option Value')?> + </th> + <th class="column-price"> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Change Price')?> + </th> + <th> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Include')?> + </th> + </tr> + </thead> + <tbody> + {{each(index, option) attribute.options}} + <tr> + <td>${option.label}</td> + <td class="column-price"> + <input type="hidden" + name="product[configurable_attributes_data][${attribute.id}][values][${option.value}][value_index]" + value="${option.value}"> + <input type="text" + name="product[configurable_attributes_data][${attribute.id}][values][${option.value}][pricing_value]" + value=""> + <select + name="product[configurable_attributes_data][${attribute.id}][values][${option.value}][is_percent]"> + <option value="0"> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Fixed')?> + </option> + <option value="1"> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Percentage')?> + </option> + </select> + </td> + <td> + <input type="hidden" + name="product[configurable_attributes_data][${attribute.id}][values][${option.value}][include]" + value="0"/> + <input type="checkbox" class="include" + name="product[configurable_attributes_data][${attribute.id}][values][${option.value}][include]" + value="1" checked="checked"/> + </td> + </tr> + {{/each}} + </tbody> + </table> + <label> + <input type="checkbox" class="price-variation" /> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Have price variations')?> + </label> + </fieldset> + </div> +</script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/attribute-template.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/attribute-template.phtml new file mode 100644 index 0000000000000000000000000000000000000000..e3a9e1837d74eaed07b339d4b258ad93e2e44942 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/attribute-template.phtml @@ -0,0 +1,140 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/* @var $this Mage_Core_Block_Template */ + +$havePriceVariation = array_reduce( + $attribute['values'], + function (&$r, $i) { + return $r || !empty($i['pricing_value']); + }, + false +); +$id = $this->escapeHtml($attribute['attribute_id']); +?> +<div class="entry-edit + <?php echo $havePriceVariation ? ' have-price' : '' ?> + " <?php echo $this->getUiId('attribute-container', $attribute['attribute_code']) ?>> + <input name="attributes[]" id="configurable_attribute_<?php echo $id ?>" + value="<?php echo $id; ?>" type="hidden"> + <input value="<?php echo $this->escapeHtml($attribute['id']); ?>" type="hidden" + name="product[configurable_attributes_data][<?php echo $id ?>][id]"/> + <input value="<?php echo $this->escapeHtml($attribute['attribute_code']); ?>" type="hidden" + name="product[configurable_attributes_data][<?php echo $id ?>][code]"/> + <input value="<?php echo $id; ?>" type="hidden" + name="product[configurable_attributes_data][<?php echo $id ?>][attribute_id]"/> + <input value="<?php echo $this->escapeHtml($attribute['position']); ?>" type="hidden" + name="product[configurable_attributes_data][<?php echo $id ?>][position]"/> + + <div class="entry-edit-head" style="cursor: move;"> + <span class="ui-icon ui-icon-arrowthick-2-n-s" style="float:left;"></span> + <h4 class="icon-head head-edit-form fieldset-legend"> + <input value="<?php echo $this->escapeHtml($attribute['label']); ?>" + name="product[configurable_attributes_data][<?php echo $id ?>][label]" + data-store-label="<?php echo $this->escapeHtml($attribute['label']); ?>" + class="store-label required-entry"/> + <label for="attribute-<?php echo $id ?>"> + <input value="1" + type="checkbox" + class="use-default" + name="product[configurable_attributes_data][<?php echo $id ?>][use_default]" + id="attribute-<?php echo $id ?>"/> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use default')?> + </label> + </h4> + <span class="ui-icon ui-icon-circle-close remove"></span> + <span class="ui-icon ui-icon-circle-triangle-s toggle"></span> + </div> + <fieldset> + <table style="width:100%"> + <thead> + <tr> + <th><?php echo $this->__('Option Value'); ?></th> + <th class="column-price"><?php echo $this->__('Change Price'); ?></th> + <th><?php echo $this->__('Include'); ?></th> + </tr> + </thead> + <tbody> + <?php + $namePrefix = 'product[configurable_attributes_data][' . $id . '][values]'; + foreach ($attribute['options'] as $option) { + ?> + <tr> + <td><?php echo $this->escapeHtml($option['label']) ?></td> + <td class="column-price"> + <?php + $price_value = ''; + $isPercent = false; + $include = false; + $valueIndex = $option['value']; + foreach ($attribute['values'] as $priceValue) { + if ($valueIndex == $priceValue['value_index']) { + $price_value = $priceValue['pricing_value']; + $isPercent = (bool)$priceValue['is_percent']; + $include = true; + if (isset($priceValue['include'])) { + $include = $include && (bool)$priceValue['include']; + } + break; + } + } + ?> + <input type="hidden" + name="<?php echo $namePrefix ?>[<?php echo $valueIndex ?>][value_index]" + value="<?php echo $this->escapeHtml($valueIndex); ?>"> + <input type="text" class="pricing-value" + name="<?php echo $namePrefix ?>[<?php echo $valueIndex ?>][pricing_value]" + value="<?php echo $this->escapeHtml($price_value); ?>"> + <select name="<?php echo $namePrefix ?>[<?php echo $valueIndex ?>][is_percent]"> + <option value="0" + <?php echo !$isPercent ? 'selected="selected"' : '' ?> + >Fixed + </option> + <option value="1" + <?php echo $isPercent ? 'selected="selected"' : '' ?> + >Percentage + </option> + </select> + </td> + <td> + <input type="hidden" + name="<?php echo $namePrefix ?>[<?php echo $valueIndex ?>][include]" + value="0"/> + <input type="checkbox" class="include" + name="<?php echo $namePrefix ?>[<?php echo $valueIndex ?>][include]" + value="1" <?php echo $include ? 'checked="checked"' : ''; ?> /> + </td> + </tr> + <?php } ?> + </tbody> + </table> + <label> + <input type="checkbox" class="price-variation" + <?php echo $havePriceVariation ? 'checked="checked"' : '' ?> /> + <?php echo $this->__('Have price variations'); ?> + </label> + </fieldset> +</div> + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml index a5f8b7b4a3b58eaf09f4938ef88880059e92cbed..d01eefba207a42aae19c10adcc9488d0efa7a4ac 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml @@ -25,283 +25,138 @@ */ /** @var $this Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config */ ?> - -<div id="<?php echo $this->getId()?>"> -<input type="checkbox" id="<?php echo $this->getId()?>-checkbox" name="attributes" - value="" -<?php if ($this->_getProduct()->isConfigurable() || $this->getRequest()->has('attributes')) { - echo ' checked="checked" '; -}?> -/> -<label for="<?php echo $this->getId()?>-checkbox"> - <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Does this product have variations?') ?> -</label> -<fieldset> -<?php -echo $this->getChildHtml('super_settings'); -if (count($this->getSelectedAttributes())) { -?> -<div class="entry-edit"> +<div class="entry-edit" id="<?php echo $this->getId() ?>"> <div class="entry-edit-head"> - <h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Super product attributes configuration') ?></h4> - </div> - <fieldset id="<?php echo $this->getHtmlId() ?>"> - <legend><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Super product attributes configuration') ?></legend> - <input type="hidden" id="<?php echo $this->getHtmlId() ?>_save_attributes" name="configurable_attributes_data" /> - - <ul class="messages"> - <li class="notice-msg"> - <ul><li><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Price values for options should be specified in system base currency.')?></li></ul> - <ul><li><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Attribute names can be specified per store.')?></li></ul> - </li> - </ul> - <ul id="<?php echo $this->getHtmlId() ?>_attributes" class="super-attributes"> - </ul> - </fieldset> -</div> -<div class="no-display" id="<?php echo $this->getHtmlId() ?>_attribute_template"> - <div class="<?php if (!$this->isReadonly()):?>attribute-name-container <?php endif;?>left"> - '{{frontend_label}}' - </div> - <div class="values-container right"> - <label for="__id___label" class="bold"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Attribute Name:') ?></label> - <input id="__id___label" type="text" <?php if ($this->isAttributesConfigurationReadonly()): ?> disabled="disabled" <?php endif;?> class="input-text attribute-label required-entry template no-display" value="'{{label}}'" readonly="label" /> - <input id="__id___label_use_default" type="checkbox" value="1" " checked="use_default" class="attribute-use-default-label"> - <label for="__id___label_use_default"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use default')?> ('{{store_label}}')</label> - <ul class="attribute-values"> - </ul> + <h4 class="icon-head head-edit-form fieldset-legend"> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Variations') ?> + </h4> + <div style="float:right"> + <input type="checkbox" id="<?php echo $this->getId()?>-checkbox" name="attributes" + value="" + <?php if ($this->_getProduct()->isConfigurable() || $this->getRequest()->has('attributes')) { + echo ' checked="checked" '; + }?> + /> + <label for="<?php echo $this->getId()?>-checkbox"> + <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Does this product have variations?') ?> + </label> + </div> </div> -</div> -<div class="no-display" id="<?php echo $this->getHtmlId() ?>_value_template"> - <div class="attribute-value-label-container left"> - <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Option:') ?> <strong>'{{label}}'</strong> -</div> -<?php if ($this->getCanReadPrice() !== false) : ?> -<div class="attribute-values-container-main"> - <div class="attribute-values-container left"> - <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Price:') ?> - <input id="__id___pricing" type="text" <?php if ($this->isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" <?php endif;?> class="input-text attribute-price validate-number template no-display" value="'{{pricing_value}}'"/> -</div> -<div class="attribute-values-container left"> - <select class="attribute-price-type" id="__id___price_type" <?php if ($this->isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" <?php endif;?>> - <option value="0"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Fixed') ?></option> - <option value="1"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Percentage') ?></option> - </select> -</div> -<?php if ($this->getShowUseDefaultPrice()):?> -<div class="attribute-values-container"> - <input id="__id___default" type="checkbox" <?php if ($this->isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" <?php endif;?> class="attribute-use-default-value"> <label for="__id___default" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Default Value') ?></label> -</div> -<?php endif;?> -<?php else : ?> -<div class="attribute-values-container-main"> - <div class="attribute-values-container left"> - <input id="__id___pricing" type="hidden" class="attribute-price template no-display" value="0" /> -</div> -<div class="attribute-values-container left"> - <input type="hidden" class="attribute-price-type" id="__id___price_type" value="0" /> -</div> -<?php if ($this->getShowUseDefaultPrice()) : ?> -<div class="attribute-values-container no-display"> - <input id="__id___default" type="checkbox" <?php if ($this->isReadonly() || $this->getCanEditPrice() === false):?> disabled="disabled" <?php endif;?> class="attribute-use-default-value"> -</div> -<?php endif; ?> -<?php endif; ?> -</div> -</div> -<div class="template no-display" id="<?php echo $this->getHtmlId() ?>_simple_pricing"> - <?php if ($this->getCanReadPrice() !== false) : ?> - <div class="attribute-values-container left v-middle"> - <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Price:') ?> - <input type="text" class="input-text attribute-price validate-number"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled" <?php endif; ?>/> + <fieldset> + <input id="attribute-selector" + placeholder="start typing to search attribute" + title="Select Attribute" type="text" + style="width: 100%; margin: 0px 0px 20px; padding: 5px; box-sizing: border-box; font-size: 1.5em;" + class="input-text" autocomplete="off"> + <div id="attributes-container"> + <?php echo $this->getChildHtml('template'); ?> + <?php + foreach ($this->getAttributes() as $attribute) { + echo $this->getChildBlock('attribute-renderer')->render(array( + 'attribute' => $attribute, + )); + } ?> </div> - <div class="attribute-values-container left v-middle"> - <select class="attribute-price-type"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled" <?php endif; ?>> - <option value="0"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Fixed') ?></option> - <option value="1"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Percentage') ?></option> - </select> + <?php echo $this->getChildHtml('generate'); ?> + <div id="product-variations-matrix" class="grid" style="margin:20px 0"> + <?php echo $this->getChildHtml('matrix'); ?> </div> - <?php else : ?> - <input type="hidden" class="attribute-price" /> - <input type="hidden" class="attribute-price-type" /> - <?php endif; ?> -</div> -<div class="template no-display" id="<?php echo $this->getHtmlId() ?>_simple_pricing_view"> - <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Price') ?> <strong>'{{value}}'</strong> -</div> - -<div id="product-variations-matrix" class="grid" style="margin:20px 0"> -<?php - $variations = $this->getVariations(); - $usedProductAttributes = $this->getSelectedAttributes(); -?> - <table cellspacing="0"> - <thead> - <tr class="headings"> - <th width="180">Product Name</th> - <th width="180">Price</th> - <th width="220">SKU</th> - <th width="180">Quantity</th> - <th width="180">Weight</th> -<?php - foreach ($usedProductAttributes as $attribute) { - /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ - echo '<th>', $attribute->getStoreLabel(), '</th>', PHP_EOL; - } -?> - <th class="a-center" width="55">Include</th> - </tr> - </thead> - <tbody> -<?php - $isEven = true; - - $productByUsedAttributes = array(); - foreach ($this->_getProduct()->getTypeInstance()->getUsedProducts($this->_getProduct()) as $product) { - $keys = array(); - foreach ($usedProductAttributes as $attribute) { - /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ - $keys[] = $product->getData($attribute->getAttributeCode()); - } - $productByUsedAttributes[implode('-', $keys)] = $product; - } - - foreach ($variations as $variation) { - $attributeValues = array(); - $attributeLabels = array(); - foreach ($usedProductAttributes as $attribute) { - /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ - $attributeValues[$attribute->getAttributeCode()] = $variation[$attribute->getId()]['value']; - $attributeLabels[$attribute->getAttributeCode()] = $variation[$attribute->getId()]['label']; - } - $key = implode('-', $attributeValues); - if (isset($productByUsedAttributes[$key])) { - $product = $productByUsedAttributes[$key]; -?> - <tr class="<?php echo $isEven ? 'even' : '' ?>"> - <td class="associated-matrix-product-name"><?php echo $product->getName()?></td> - <td class="associated-matrix-product-price"><?php echo $product->getPrice()?></td> - <td><span class="associated-matrix-product-sku"><?php echo $product->getSku()?></span> - <button class="choose-product" - data-attributes="<?php echo $this->escapeHtml($this->helper('Mage_Core_Helper_Data')->jsonEncode($attributeValues)); ?>" - style="float:right"> - Choose - </button> - </td> - <td class="associated-matrix-product-qty"><?php echo $product->getStockItem()->getQty()?></td> - <td class="associated-matrix-product-weight"><?php echo $product->getWeight()?></td> - <td><?php echo implode('</td><td>', $attributeLabels)?></td> - <td class="a-center"><input type="checkbox" name="associated_product_ids[]" value="<?php echo $product->getId()?>" class="checkbox associated-matrix-product-id" checked="checked"></td> - </tr> -<?php - } else { -?> - <tr class="<?php echo $isEven ? 'even' : '' ?>"> - <td class="associated-matrix-product-name"></td> - <td class="associated-matrix-product-price"></td> - <td><span class="associated-matrix-product-sku"></span> - <button class="choose-product" - data-attributes="<?php echo $this->escapeHtml($this->helper('Mage_Core_Helper_Data')->jsonEncode($attributeValues)); ?>" - style="float:right"> - Choose - </button> - </td> - <td class="associated-matrix-product-qty"></td> - <td class="associated-matrix-product-weight"></td> -<!-- <td><input class="associated-matrix-product-name" value="--><?php //echo $this->_getProduct()->getName(), ' ', implode(' ', $attributeValues)?><!--"></td>--> -<!-- <td><input class="associated-matrix-product-price" value=""></td>--> -<!-- <td><input class="associated-matrix-product-sku" value="--><?php //echo $this->_getProduct()->getSku(), '-', implode('-', $attributeValues)?><!--">--> -<!-- <button class="choose-product"--> -<!-- data-attributes="--><?php //echo $this->escapeHtml($this->helper('Mage_Core_Helper_Data')->jsonEncode($attributeValues)); ?><!--"--> -<!-- style="float:right">--> -<!-- Choose--> -<!-- </button>--> -<!-- </td>--> -<!-- <td><input class="associated-matrix-product-qty" value=""></td>--> -<!-- <td><input class="associated-matrix-product-weight" value=""></td>--> - <td><?php echo implode('</td><td>', $attributeLabels)?></td> - <td class="a-center"><input type="checkbox" name="associated_product_ids[]" value="" class="checkbox associated-matrix-product-id" disabled="disabled"></td> - </tr> -<?php - } - $isEven = !$isEven; - } -?> - </tbody> - </table> -</div> - -<div id="associated-products-container" data-used-attributes="<?php echo $this->escapeHtml($this->helper('Mage_Core_Helper_Data')->jsonEncode($this->getAttributes())); ?>" style="display: none;"> - <?php echo $this->getGridHtml(); ?> -</div> -<script type="text/javascript"> - var superProduct = new Product.Configurable(jQuery('#associated-products-container').data('usedAttributes'), <?php echo $this->getLinksJson() ?>,'<?php echo $this->getHtmlId() ?>_',<?php echo $this->getGridJsObject() ?>, <?php echo ( $this->isReadonly() ? 'true' : 'false'); ?>); -</script> - -<div><input type="hidden" name="affect_configurable_product_attributes" value="1" /></div> -<?php } ?> + <div id="associated-products-container" style="display: none;"> + <?php echo $this->getGridHtml(); ?> + </div> + <input type="hidden" name="affect_configurable_product_attributes" value="1" /> </fieldset> -</div> + <script type="text/javascript"> jQuery(function($) { - var usedAttributes = jQuery('#associated-products-container').data('usedAttributes') || []; + var $variationsContainer = $("#<?php echo $this->getId()?>"); + $('#attributes-container').variationsAttributes(); + $("#<?php echo $this->getId()?>-checkbox").on('click change', function() { var $fieldset = $("#<?php echo $this->getId()?> > fieldset"); if ($(this).is(':checked')) { $fieldset.show(); - $("#<?php echo $this->getId()?> input[name='attributes[]']").removeAttr('disabled'); + $('#change-attribute-set-button').attr('disabled', true).addClass('disabled'); + $variationsContainer.find("input[name='attributes[]']").removeAttr('disabled'); $('#qty').attr('disabled', true); - $.each(usedAttributes, function() { - $('#attribute-' + this.attribute_code + '-container select').attr('disabled', true); - }); + $.each($('#attributes-container').variationsAttributes('getAttributes'), function() { + $('#attribute-' + this.code + '-container select').attr('disabled', true); + }) } else { + $('#change-attribute-set-button').removeAttr('disabled').removeClass('disabled'); $('#qty').removeAttr('disabled'); - $("#<?php echo $this->getId()?> input[name='attributes[]']").attr('disabled', true); - $.each(usedAttributes, function() { - $('#attribute-' + this.attribute_code + '-container select').removeAttr('disabled'); + $variationsContainer.find('.entry-edit').remove(); + $.each($('#attributes-container').variationsAttributes('getAttributes'), function() { + $('#attribute-' + this.code + '-container select').removeAttr('disabled'); }); + $('#product-variations-matrix').trigger('disable'); $fieldset.hide(); } }).trigger('change'); var $gridDialog = $('#associated-products-container').dialog({ - title:'Select Associated Product', - autoOpen:false, - minWidth:980, - modal:true, - resizable:true + title: 'Select Associated Product', + autoOpen: false, + minWidth: 980, + modal: true, + resizable: true }); - $('#product-variations-matrix').on('click', '.choose-product', function(event) { - event.preventDefault(); - var grid = window.<?php echo $this->getGridJsObject() ?>; - var $button = $(this); - grid.reloadParams = { - 'filter': $button.data('attributes'), - 'attributes[]': usedAttributes.map(function(el) { return el.attribute_id; }) - }; - grid.reload(null, function() { - $gridDialog.dialog('open') - }); - - grid.rowClickCallback = function(grid, event) { - if (!this.rows || !this.rows.length) { - return; - } - var $matrixRow = $button.parents('tr'); - var $gridRow = $(event.target).parents('tr'); - var matrixClass = '.associated-matrix-product-'; - var associatedClass = '.associated-product-'; - var productFields = ['name', 'price', 'sku', 'qty', 'weight', 'id']; + $('#product-variations-matrix') + .on('generate', function(event, data) { + $.ajax({ + url: data.url, + data: $('#product-edit-form').serialize(), + dataType: 'html', + context: $variationsContainer, + showLoader: true + }).success(function(data) { + $('#product-variations-matrix').html(data); + }); + }) + .on('disable', function() { + $(this).html(''); + }) + .on('click', 'input.associated-matrix-product-id', function() { + $(this).closest('tr').find('input[type!=checkbox]').prop('disabled', !$(this).is(':checked')); + }) + .on('click', '.choose-product', function(event) { + event.preventDefault(); + var grid = window.<?php echo $this->getGridJsObject() ?>; + var $button = $(this); + var attributeIds = []; + $variationsContainer.find("input[name='attributes[]']").each(function () { + attributeIds.push($(this).val()); + }); - $.each(productFields, function() { - var target = $matrixRow.find(matrixClass + this), - value = $.trim($gridRow.find(associatedClass + this).text()); - target[target.is('input') ? 'val' : 'html'](value); + grid.reloadParams = { + 'filter': $button.data('attributes'), + 'attributes[]': attributeIds + }; + grid.reload(null, function() { + $gridDialog.dialog('open') }); - $matrixRow.find(matrixClass + 'id').attr('checked', true).removeAttr('disabled'); - $gridDialog.dialog('close'); - }; - }); + + grid.rowClickCallback = function(grid, event) { + if (!this.rows || !this.rows.length) { + return; + } + var $gridRow = $(event.target).parents('tr'), + associatedClass = '.associated-product-'; + if ($gridRow.find(associatedClass + 'id').length) { + var $matrixRow = $button.parents('tr'), + matrixClass = '.associated-matrix-product-'; + $.each('name,sku,qty,weight,id'.split(','), function () { + var target = $matrixRow.find(matrixClass + this), + value = $.trim($gridRow.find(associatedClass + this).text()), + button = target.find('button.choose-product'); + target[target.is('input[type=checkbox]') ? 'val' : 'text'](value).append(button); + }); + $matrixRow.find(matrixClass + 'id').attr('checked', true).removeAttr('disabled'); + } + $gridDialog.dialog('close'); + }; + }); }); </script> +</div> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/matrix.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/matrix.phtml new file mode 100644 index 0000000000000000000000000000000000000000..1267e74197b208dde91b253d527db683481bf11b --- /dev/null +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/matrix.phtml @@ -0,0 +1,158 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/** @var $this Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix */ +?> +<?php +$variations = $this->getVariations(); +if (!$variations) { + return; +} +$usedProductAttributes = $this->getUsedAttributes(); +$productByUsedAttributes = $this->getAssociatedProducts(); +?> +<table cellspacing="0"> + <thead> + <tr class="headings"> + <th width="180" class="name <?php echo $this->getAttributeFrontendClass('name'); ?>"> + <?php echo $this->__('Product Name'); ?> <span class="required">*</span> + </th> + <th width="180"> + <?php echo $this->__('Price'); ?> + </th> + <th width="220" class="sku <?php echo $this->getAttributeFrontendClass('sku'); ?>"> + <?php echo $this->__('SKU'); ?> <span class="required">*</span> + </th> + <th width="180" class="qty"> + <?php echo $this->__('Quantity'); ?> + </th> + <th width="180" class="weight <?php echo str_replace('required-entry', '', $this->getAttributeFrontendClass('weight')); ?>"> + <?php echo $this->__('Weight'); ?> + </th> + <?php + foreach ($usedProductAttributes as $attribute) { + /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + echo '<th class="' . $attribute->getAttributeCode() . '">', $attribute->getStoreLabel(), '</th>', PHP_EOL; + } + ?> + <th class="a-center include" width="55"> + <?php echo $this->__('Include'); ?> + </th> + </tr> + </thead> + <tbody> +<?php + $isEven = true; + $productPrice = (float)$this->_getProduct()->getPrice(); + foreach ($variations as $variation) { + $attributeValues = array(); + $attributeLabels = array(); + $price = $productPrice; + foreach ($usedProductAttributes as $attribute) { + /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + $attributeValues[$attribute->getAttributeCode()] = $variation[$attribute->getId()]['value']; + $attributeLabels[$attribute->getAttributeCode()] = $variation[$attribute->getId()]['label']; + if (isset($variation[$attribute->getId()]['price'])) { + $priceInfo = $variation[$attribute->getId()]['price']; + $price += ($priceInfo['is_percent'] ? $productPrice / 100.0 : 1.0) * $priceInfo['pricing_value']; + } + } + $attributeLabels = $this->escapeHtml($attributeLabels); + $key = implode('-', $attributeValues); + if (isset($productByUsedAttributes[$key])) { + $product = $productByUsedAttributes[$key]; + ?> + <tr class="<?php echo $isEven ? 'even' : '' ?>"> + <td class="associated-matrix-product-name"><a + href="<?php echo $this->getEditProductUrl($product->getId())?>" + target="_blank"><?php echo $this->escapeHtml($product->getName())?></a></td> + <td class="associated-matrix-product-price"><?php echo $price ?></td> + <td><span class="associated-matrix-product-sku"><?php echo $this->escapeHtml($product->getSku())?></span> + <button class="choose-product" + data-attributes="<?php echo $this->escapeHtml($this->helper('Mage_Core_Helper_Data')->jsonEncode($attributeValues)); ?>" + style="float:right"> + Choose + </button> + </td> + <td class="associated-matrix-product-qty"><?php echo $product->getStockItem()->getQty()?></td> + <td class="associated-matrix-product-weight"><?php echo $product->getWeight()?></td> + <td><?php echo implode('</td><td>', $attributeLabels)?></td> + <td class="a-center"><input type="checkbox" name="associated_product_ids[]" + value="<?php echo $product->getId()?>" class="checkbox associated-matrix-product-id" + checked="checked"></td> + </tr> + <?php + } else { + $checked = $this->_getProduct()->getId() && !$this->_getProduct()->dataHasChangedFor('type_id') ? '' : ' checked="checked"'; + $disabled = $this->_getProduct()->getId() && !$this->_getProduct()->dataHasChangedFor('type_id') ? ' disabled="disabled"' : ''; + ?> + <tr class="<?php echo $isEven ? 'even' : '' ?>"> + <td class="associated-matrix-product-name"> + <input id="variations-matrix-<?php echo $key?>-name" + name="variations-matrix[<?php echo $key?>][name]" + value="<?php echo $this->escapeHtml($this->_getProduct()->getName()), '-', implode('-', $attributeLabels)?>" + class="<?php echo $this->getAttributeFrontendClass('name'); ?>"<?php echo $disabled?>/> + <input type="hidden" name="variations-matrix[<?php echo $key?>][configurable_attribute]" + value="<?php echo $this->escapeHtml($this->helper('Mage_Core_Helper_Data')->jsonEncode($attributeValues)); ?>"<?php echo $disabled?>/> + </td> + <td class="associated-matrix-product-price"> + <?php echo $price ?> + </td> + <td class="associated-matrix-product-sku"> + <input id="variations-matrix-<?php echo $key?>-sku" + name="variations-matrix[<?php echo $key?>][sku]" + value="<?php echo $this->escapeHtml($this->_getProduct()->getSku()), '-', implode('-', $attributeLabels)?>" + class="<?php echo $this->getAttributeFrontendClass('sku'); ?>"<?php echo $disabled?>/> + <button class="choose-product" + data-attributes="<?php echo $this->escapeHtml($this->helper('Mage_Core_Helper_Data')->jsonEncode($attributeValues)); ?>" + style="float:right"> + Choose + </button> + </td> + <td class="associated-matrix-product-qty"> + <input id="variations-matrix-<?php echo $key?>-qty" + name="variations-matrix[<?php echo $key?>][quantity_and_stock_status][qty]" + class="validate-number" + value=""<?php echo $disabled?>> + </td> + <td class="associated-matrix-product-weight"> + <input id="variations-matrix-<?php echo $key?>-weight" + name="variations-matrix[<?php echo $key?>][weight]" + class="<?php echo str_replace('required-entry', '', $this->getAttributeFrontendClass('weight')); ?>" + value="<?php echo $this->_getProduct()->getWeight()?>"<?php echo $disabled?>> + </td> + <td><?php echo implode('</td><td>', $attributeLabels)?></td> + <td class="a-center"> + <input type="checkbox" name="associated_product_ids[]" value="" + class="checkbox associated-matrix-product-id"<?php echo $checked?> /> + </td> + </tr> + <?php + } + $isEven = !$isEven; + } + ?> + </tbody> +</table> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml index 0b3dfc6bfa33ddd9550d570d4bc010b38f0ed0b9..a56c2954d91cef2d19f6cd1b08f729ca37ed13c2 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml @@ -61,7 +61,7 @@ }, sequentialUploads: true, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, - maxFileSize: <?php echo Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSize()?>, + maxFileSize: <?php echo Mage::getObjectManager()->get('Magento_File_Size')->getMaxFileSize()?>, add: function(e, data) { $.each(data.files, function (index, file) { data.fileId = Math.random().toString(36).substr(2,9); @@ -104,7 +104,7 @@ { action: 'load', fileTypes: /^image\/(gif|jpeg|png)$/, - maxFileSize: <?php echo Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSize() ?> * 10 + maxFileSize: <?php echo Mage::getObjectManager()->get('Magento_File_Size')->getMaxFileSize() ?> * 10 }, { action: 'resize', diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/tabs.css b/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/tabs.css deleted file mode 100644 index 63d68fd59dab792bb81c79362fc6d9894485c84d..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/tabs.css +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package base_default - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -/* TABS -*******************************************************************************/ - -/* Vertical Tabs */ - -.ui-tabs.ui-corner-all, .tabs.ui-corner-all { - -moz-border-radius-topleft: 0px; - -webkit-border-top-left-radius: 0px; - -khtml-border-top-left-radius: 0px; - border-top-left-radius: 0px; -} - -.ui-tabs.ui-corner-all, .tabs.ui-corner-all { - -moz-border-radius-topright: 0px; - -webkit-border-top-right-radius: 0px; - -khtml-border-top-right-radius: 0px; - border-top-right-radius: 0px; -} - -.ui-tabs.ui-corner-all, .tabs.ui-corner-all { - -moz-border-radius-bottomleft: 0px; - -webkit-border-bottom-left-radius: 0px; - -khtml-border-bottom-left-radius: 0px; - border-bottom-left-radius: 0px; -} - -.ui-tabs.ui-corner-all, .tabs.ui-corner-all { - -moz-border-radius-bottomright: 0px; - -webkit-border-bottom-right-radius: 0px; - -khtml-border-bottom-right-radius: 0px; - border-bottom-right-radius: 0px; -} - -.tabs.ui-widget-header { - border: none !important; -} -.tabs li { - -moz-border-radius-topleft: 0px; - -webkit-border-top-left-radius: 0px; - -khtml-border-top-left-radius: 0px; - border-top-left-radius: 0px; - -moz-border-radius-topright: 0px; - -webkit-border-top-right-radius: 0px; - -khtml-border-top-right-radius: 0px; - border-top-right-radius: 0px; - border: none !important; -} -.ui-tabs.ui-widget-content { - border-left: none; - border-right: none; - border-bottom: none; -} -.ui-tabs { - padding: 0; -} - -.ui-tabs .ui-tabs-nav { - padding: 0; -} - -.ui-tabs .ui-tabs-nav li { - float: none; - top: 0; - margin: 0; -} - -.ui-tabs .ui-tabs-nav li a { - float: none; - padding: 0; -} - -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { - margin-bottom: 0; - padding-bottom: 0; -} - -.ui-tabs .ui-tabs-panel { - padding: 0; -} - -.ui-tabs { - border-top:1px solid #bebebe; - background-color:#e7efef; - padding: 0; -} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/images/image-placeholder.png b/app/code/core/Mage/Adminhtml/view/adminhtml/images/image-placeholder.png index 0b7741b72e24b3934c9326a1550ccb350a0864c0..a355f94784148a0d626cae54c05423734b1a707e 100644 Binary files a/app/code/core/Mage/Adminhtml/view/adminhtml/images/image-placeholder.png and b/app/code/core/Mage/Adminhtml/view/adminhtml/images/image-placeholder.png differ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/main.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/main.xml index 41cd8e74876fb8bef49d7e90ff311edb620dec74..313d4fe971f4b9690fc2d13400d391c065745bcb 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/main.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/main.xml @@ -57,16 +57,15 @@ Supported layout update handles (special): <action method="setTitle" translate="title"><title>Magento Admin</title></action> <action method="addJs"><file>jquery/jquery.min.js</file></action> <action method="addJs"><file>mage/jquery-no-conflict.js</file></action> - <action method="addJs"><file>jquery/jquery-ui.min.js</file></action> + <action method="addJs"><file>jquery/jquery-ui.custom.min.js</file></action> + <action method="addJs"><file>head.load.min.js</file></action> + <action method="addJs"><file>mage/mage.js</file></action> + <action method="addJs"><file>mage/backend/button.js</file></action> <action method="addJs"><file>jquery/jquery.tmpl.min.js</file></action> - <action method="addJs"><file>jquery/jquery.validate.js</file></action> <action method="addJs"><file>mage/translate.js</file></action> - <action method="addJs"><file>mage/validation.js</file></action> - <action method="addJs"><file>mage/backend/validation.js</file></action> - <action method="addJs"><file>mage/backend/notification.js</file></action> <action method="addJs"><file>mage/backend/bootstrap.js</file></action> - <action method="addJs"><file>mage/backend/form.js</file></action> - <action method="addJs"><file>mage/loader.js</file></action> + <action method="addJs"><file>mage/backend/floating-header.js</file></action> + <action method="addJs"><file>prototype/prototype.js</file></action> <action method="addJs"><file>mage/adminhtml/fix-extjs-defer.js</file><params/><if/><condition>can_load_ext_js</condition></action> <action method="addJs"><file>mage/adminhtml/fix-extjs-defer-before.js</file><params/><if/><condition>can_load_ext_js</condition></action> @@ -106,6 +105,7 @@ Supported layout update handles (special): <action method="addJs"><file>mage/adminhtml/wysiwyg/tiny_mce/setup.js</file><params/><if/><condition>can_load_tiny_mce</condition></action> + <block type="Mage_Core_Block_Template" name="head.components" as="components" template="Mage_Adminhtml::page/js/components.phtml"/> <block type="Mage_Core_Block_Html_Calendar" name="head.calendar" as="calendar" template="Mage_Adminhtml::page/js/calendar.phtml"/> </block> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/media/uploader.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/media/uploader.phtml index c0999782d4e14b85b95ffc17caebd276f1191c1f..73326a1ae91df181f9175c45606e134b2fbc444c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/media/uploader.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/media/uploader.phtml @@ -55,7 +55,7 @@ dataType: 'json', sequentialUploads: true, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, - maxFileSize: <?php echo Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSize() ?>, + maxFileSize: <?php echo Mage::getObjectManager()->get('Magento_File_Size')->getMaxFileSize() ?>, add: function(e, data) { $.each(data.files, function (index, file) { data.fileId = Math.random().toString(36).substr(2,9); @@ -97,7 +97,7 @@ { action: 'load', fileTypes: /^image\/(gif|jpeg|png)$/, - maxFileSize: <?php echo Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSize() ?> * 10 + maxFileSize: <?php echo Mage::getObjectManager()->get('Magento_File_Size')->getMaxFileSize() ?> * 10 }, { action: 'resize', diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/queue/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/queue/edit.phtml index 26e7f21726e2437a718607df0f486a308765efad..1ebbe7102828bf75ef39942f880946179767ba14 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/queue/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/queue/edit.phtml @@ -58,8 +58,8 @@ </form> <script type="text/javascript"> //<![CDATA[ -jQuery('#queue_edit_form').form().validation(); -jQuery('#newsletter_queue_preview_form').form().validation(); +jQuery('#queue_edit_form').mage('form').mage('validation'); +jQuery('#newsletter_queue_preview_form').mage('form').mage('validation'); var queueControl = { id: 'text', diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/template/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/template/edit.phtml index dd8fdec8e33e6f1a159e4cf151236c497c65e2cc..5210ceb5748988da015abbf438a24d7d918fa4e8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/template/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/template/edit.phtml @@ -63,8 +63,8 @@ </form> <script type="text/javascript"> //<![CDATA[ - jQuery('#newsletter_template_edit_form').form().validation(); - jQuery('#newsletter_template_preview_form').form().validation(); + jQuery('#newsletter_template_edit_form').mage('form').mage('validation'); + jQuery('#newsletter_template_preview_form').mage('form').mage('validation'); var templateControl = { unconvertedText: '', diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/page/head.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/page/head.phtml index 1712908350cf1d1e93c591fc00f4fba2ce718fdc..aedbd980035ba894716904278d040b024c0c7788 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/page/head.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/page/head.phtml @@ -55,5 +55,6 @@ </script> <?php echo $this->helper('Mage_Core_Helper_Js')->getTranslatorScript() ?> +<?php echo $this->getChildHtml('components'); ?> <?php echo $this->getChildHtml('calendar'); ?> <?php echo $this->getChildHtml('optional_zip_countries'); ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/page/js/components.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/page/js/components.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d846a9742ed8e296591f6e0eab70cfbd53d5c945 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/page/js/components.phtml @@ -0,0 +1,69 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> + +<?php +/** + * Declare a list of components and its dependencies to resources + * @var $this Mage_Core_Block_Template + */ +?> +<script type="text/javascript"> + (function($) { + "use strict"; + /** + * Declaration of resources needed for defined components + */ + $.mage.component({ + form: [ + '<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>', + '<?php echo $this->getViewFileUrl('mage/backend/form.js') ?>' + ], + button: [ + '<?php echo $this->getViewFileUrl('mage/backend/button.js') ?>' + ], + validation: [ + '<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>', + '<?php echo $this->getViewFileUrl('mage/translate.js') ?>', + '<?php echo $this->getViewFileUrl('mage/validation.js') ?>', + '<?php echo $this->getViewFileUrl('mage/backend/validation.js') ?>' + ], + notification: [ + '<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>', + '<?php echo $this->getViewFileUrl('mage/backend/notification.js') ?>' + ], + loader: [ + '<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>', + '<?php echo $this->getViewFileUrl('mage/translate.js') ?>', + '<?php echo $this->getViewFileUrl('mage/loader.js') ?>' + ], + floatingHeader: [ + '<?php echo $this->getViewFileUrl('mage/backend/floating-header.js') ?>', + ] + }).load('loader'); + })(jQuery); +</script> +<?php echo $this->getChildHtml() ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/report.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/report.xml index 3a80a2b636f74ed5705855d1a483fcd13b621d16..8f3bda562af7be2236a5af13473a491fcd49fb54 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/report.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/report.xml @@ -26,11 +26,6 @@ */ --> <layout> - <adminhtml_report_statistics_index> - <reference name="content"> - <block type="Mage_Adminhtml_Block_Report_Refresh_Statistics" template="report/refresh/statistics.phtml" name="sales.report.refreshstatistics" /> - </reference> - </adminhtml_report_statistics_index> <adminhtml_report_product_viewed> <reference name="messages"> <action method="addNotice" translate="message"> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/report/grid/container.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/report/grid/container.phtml index 5289e55cb1035436f7df4a64c2cc754638210b85..fd02700c80c414b6a9b81e7b338ea8d33523d9c2 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/report/grid/container.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/report/grid/container.phtml @@ -43,14 +43,14 @@ </div> <script type="text/javascript"> //<![CDATA[ + jQuery('#filter_form').mage('validation', {errorClass: 'mage-error'}); function filterFormSubmit() { var filters = $$('#filter_form input', '#filter_form select'); var elements = []; for(var i in filters){ if(filters[i].value && filters[i].value.length && !filters[i].disabled) elements.push(filters[i]); } - var validator = new Validation('filter_form'); - if (validator.validate()) { + if (jQuery('#filter_form').valid()) { setLocation('<?php echo $this->getFilterUrl(); ?>filter/'+encode_base64(Form.serializeElements(elements))+'/'); } } diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/resetforgottenpassword.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/resetforgottenpassword.phtml index 74e128aa4a227af387103e317e7316e115a798a4..dbfd8971a105b1048f31439e2b0dfea34648a915 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/resetforgottenpassword.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/resetforgottenpassword.phtml @@ -36,7 +36,7 @@ <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/jquery-no-conflict.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.custom.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/validation.js') ?>"></script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/review/add.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/review/add.phtml index edfac0b475f6ffd4e95481d005148df9ea3ad840..edcc6aacd06848bc24b2b8c0df2737a84c515827 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/review/add.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/review/add.phtml @@ -43,5 +43,5 @@ <?php echo $this->getFormHtml() ?> </div> <script type="text/javascript"> - jQuery('#edit_form').form().validation(); + jQuery('#edit_form').mage('form').mage('validation'); </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js index ec50242a4112d348cc9dd2a93b6372fc673b6500..b22032ce258b3b130d2d6a247ee1d9f6a3c983ea 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js @@ -69,12 +69,10 @@ var giftMessagesController = { } else { $(container).toogleGiftMessage = false; $(this.getFieldId(container, 'message')).formObj = $(this.getFieldId(container, 'form')); + var form = jQuery('#' + this.getFieldId(container, 'form')); + jQuery('#' + this.getFieldId(container, 'form')).validation(); - if(!$(this.getFieldId(container, 'form')).validator) { - $(this.getFieldId(container, 'form')).validator = new Validation(this.getFieldId(container, 'form')); - } - - if(!$(this.getFieldId(container, 'form')).validator.validate()) { + if(!form.valid()) { return false; } @@ -104,11 +102,10 @@ var giftMessagesController = { saveGiftMessage: function(container) { $(this.getFieldId(container, 'message')).formObj = $(this.getFieldId(container, 'form')); - if(!$(this.getFieldId(container, 'form')).validator) { - $(this.getFieldId(container, 'form')).validator = new Validation(this.getFieldId(container, 'form')); - } + var form = jQuery('#' + this.getFieldId(container, 'form')); + form.validation(); - if(!$(this.getFieldId(container, 'form')).validator.validate()) { + if(!form.valid()) { return; } @@ -199,7 +196,7 @@ GiftOptionsPopup.prototype = { onOkButton : function() { var giftOptionsForm = jQuery('#gift_options_configuration_form'); - if (!giftOptionsForm.validate().valid()) { + if (!giftOptionsForm.validation().valid()) { return false; } if (jQuery.isFunction(giftOptionsForm[0].reset)) { diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/form.phtml index 64583330492c80fb32b03548013e7beb9a74dd99..5a03bb759b565fe5f734083e8644a699f81189e5 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/form.phtml @@ -109,6 +109,6 @@ }, 500); }); - jQuery('#edit_form').form().validation(); + jQuery('#edit_form').mage('form').mage('validation'); //]]> </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/cache/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/cache/edit.phtml index 490889108affeafe7c1c4cb51f7cec1271627ec2..ba3bedfe3e2ba6d61bc9111906eefeaf16a9d1da 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/cache/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/cache/edit.phtml @@ -105,5 +105,5 @@ </div> </form> <script type="text/javascript"> - jQuery('#config-edit-form').form().validation(); + jQuery('#config-edit-form').mage('form').mage('validation'); </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/currency/rate/matrix.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/currency/rate/matrix.phtml index db671f8b869a2b4eddd0bdb4792b61b97309a0fc..258c8ca6d5429d84cfec9b77ed22c9e094ade0f1 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/currency/rate/matrix.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/currency/rate/matrix.phtml @@ -70,5 +70,5 @@ $_rates = ( $_newRates ) ? $_newRates : $_oldRates; </div> </form> <script type="text/javascript"> - jQuery('#rate-form').form().validation(); + jQuery('#rate-form').mage('form').mage('validation'); </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/design/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/design/edit.phtml index ee49c1eebb5ec8996bb53d6546eb364e9ba6ebb6..e094f48b5066d9c5d450fb641ea7c5a6296e2fe7 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/design/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/design/edit.phtml @@ -42,5 +42,5 @@ <?php echo $this->getBlockHtml('formkey')?> </form> <script type="text/javascript"> - jQuery('#design-edit-form').form().validation(); + jQuery('#design-edit-form').mage('form').mage('validation'); </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template/edit.phtml index 1d9eae9f7442069e74687496933fca36e2e71abb..58cde56f2587f7e9abbc9c098f0fd0b1023c0447 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template/edit.phtml @@ -111,8 +111,9 @@ </form> <script type="text/javascript"> //<![CDATA[ - jQuery('#email_template_edit_form').form().validation(); - jQuery('#email_template_preview_form').form().validation(); + jQuery('#email_template_edit_form').mage('form').mage('validation'); + jQuery('#email_template_preview_form').mage('form').mage('validation'); + jQuery('#email_template_load_form').mage('validation'); var templateControl = { unconvertedText: '', typeChange: false, @@ -183,9 +184,7 @@ load: function() { // Temporary solution will be replaced after refactoring of email templates functionality - var form = jQuery('#email_template_load_form').validation(); - - if (!form.valid()) { + if (!jQuery('#email_template_load_form').valid()) { return; } diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/page/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/page/edit.phtml index 36abc4bc19c2017102330fafa8529b7487b83f0e..ce287f5447f17f9885ab90bdd71fd741b6ae0925 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/page/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/page/edit.phtml @@ -39,5 +39,5 @@ </div> <?php echo $this->_getRenameFormHtml(); ?> <script type="text/javascript"> - jQuery('#<?php echo $this->_getRenameFormId() ?>').form().validation(); + jQuery('#<?php echo $this->_getRenameFormId() ?>').mage('form').mage('validation'); </script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExport.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExport.phtml index d3088d44684e4fc7833060f90cce851722bc38be..9309ad091a9f4b0530ba6b4bbf2afc576e275c86 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExport.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExport.phtml @@ -39,7 +39,7 @@ </fieldset> </form> <script type="text/javascript"> - jQuery('#import-form').form().validation(); + jQuery('#import-form').mage('form').mage('validation'); (function ($) { $('.import-submit').click(function(){ if($(':input[name="import_rates_file"]').val()) { diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/save.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/save.phtml index 346b840fe2a495eabe34f2c47eb6ce1d52942b02..223320bec105263f2caab640291bca377e36645f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/save.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/save.phtml @@ -39,6 +39,6 @@ <?php if( $form ): ?> <?php echo $form->toHtml(); ?> <script type="text/javascript"> - jQuery('#<?php echo $form->getForm()->getId() ?>').form().validation(); + jQuery('#<?php echo $form->getForm()->getId() ?>').mage('form').mage('validation'); </script> <?php endif; ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/save.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/save.phtml index 606cec7fb5f009fff8dde8555d5f40fa404d8c1e..f6d3117fccabe82f19dc0cd2d9e8d16f559f023d 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/save.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/save.phtml @@ -41,6 +41,6 @@ <?php echo $form->toHtml();?> <script type="text/javascript"> - jQuery('#<?php echo $form->getForm()->getId() ?>').form().validation(); + jQuery('#<?php echo $form->getForm()->getId() ?>').mage('form').mage('validation'); </script> <?php endif; ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/save.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/save.phtml index c892a17af33296631d4a47022883d4ca67353f18..91519871d12efefb127d9f1b242b70b0410bfc71 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/save.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/save.phtml @@ -40,6 +40,6 @@ <?php if( $form ): ?> <?php echo $form->toHtml(); ?> <script type="text/javascript"> - jQuery('#<?php echo $form->getForm()->getId() ?>').form().validation(); + jQuery('#<?php echo $form->getForm()->getId() ?>').mage('form').mage('validation'); </script> <?php endif; ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/edit.phtml index 20e732a6a1cd11ed19a9983a34605c57f2f27687..02da27505cb6319e04a2eec537b60a4d7db66df6 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/edit.phtml @@ -39,6 +39,7 @@ <?php if ($this->getChildBlock('form')): ?> <script type="text/javascript"> - jQuery('#edit_form').form().validation({'validationUrl': '<?php echo $this->getValidationUrl() ?>'}); + jQuery('#edit_form').mage('form') + .mage('validation', {validationUrl: '<?php echo $this->getValidationUrl() ?>'}); </script> <?php endif; ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml index 0d376b4327ba03f7e873ec73efe584ea32ed6ad8..e44fa7a011105ecbe6c1ea4b67a918d41145783a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml @@ -36,7 +36,12 @@ <?php $_tabHref = $this->getTabUrl($_tab) == '#' ? '#' . $this->getTabId($_tab) . '_content' : $this->getTabUrl($_tab) ?> <li> <a href="<?php echo $_tabHref?>" id="<?php echo $this->getTabId($_tab) ?>" title="<?php echo $this->getTabTitle($_tab) ?>" class="<?php $_tabClass ?>" data-tab-type="<?php $_tabType ?>"> - <span><span class="changed" title="<?php echo $this->__('The information in this tab has been changed.') ?>"></span><span class="error" title="<?php echo $this->__('This tab contains invalid data. Please solve the problem before saving.') ?>"></span><?php echo $this->getTabLabel($_tab) ?></span> + <span> + <span class="changed" title="<?php echo $this->__('The information in this tab has been changed.') ?>"></span> + <span class="error" title="<?php echo $this->__('This tab contains invalid data. Please solve the problem before saving.') ?>"></span> + <span class="loading" title="<?php echo $this->__('Loading...') ?>"></span> + <?php echo $this->getTabLabel($_tab) ?> + </span> </a> <div id="<?php echo $this->getTabId($_tab) ?>_content" style="display:none"><?php echo $this->getTabContent($_tab) ?></div> </li> diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost.php b/app/code/core/Mage/Authorizenet/Model/Directpost.php index 12eaf215d28de9db43558e0c3043f8d98d757f14..4e611dd94bd909ce1837ffd7d3ce0f6698ca7bfa 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost.php @@ -426,6 +426,13 @@ class Mage_Authorizenet_Model_Directpost extends Mage_Paygate_Model_Authorizenet if ($orderIncrementId) { /* @var $order Mage_Sales_Model_Order */ $order = Mage::getModel('Mage_Sales_Model_Order')->loadByIncrementId($orderIncrementId); + //check payment method + $payment = $order->getPayment(); + if (!$payment || $payment->getMethod() != $this->getCode()) { + Mage::throwException( + Mage::helper('Mage_Authorizenet_Helper_Data')->__('Payment error. Order was not found.') + ); + } if ($order->getId() && $order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { //operate with order $this->_authOrder($order); diff --git a/app/code/core/Mage/Backend/Block/Abstract.php b/app/code/core/Mage/Backend/Block/Abstract.php index 977c6b61f1d70ffb3cb5765b343cce7fa89edea1..3d4d163fb864bed6fdfcae9d9f8098ed132ffbcb 100644 --- a/app/code/core/Mage/Backend/Block/Abstract.php +++ b/app/code/core/Mage/Backend/Block/Abstract.php @@ -45,6 +45,7 @@ class Mage_Backend_Block_Abstract extends Mage_Core_Block_Template * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -61,10 +62,11 @@ class Mage_Backend_Block_Abstract extends Mage_Core_Block_Template Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); } } diff --git a/app/code/core/Mage/Backend/Block/Store/Switcher.php b/app/code/core/Mage/Backend/Block/Store/Switcher.php index 17ca9a8b74684740c14cfa7f90d7cb472803fa67..e899dc9f8cb712c6b59a8eed6803e226491a237f 100644 --- a/app/code/core/Mage/Backend/Block/Store/Switcher.php +++ b/app/code/core/Mage/Backend/Block/Store/Switcher.php @@ -103,6 +103,7 @@ class Mage_Backend_Block_Store_Switcher extends Mage_Backend_Block_Template * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_App $application * @param Mage_Core_Model_Website_Factory $websiteFactory * @param Mage_Core_Model_Store_Group_Factory $storeGroupFactory @@ -122,13 +123,14 @@ class Mage_Backend_Block_Store_Switcher extends Mage_Backend_Block_Template Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_App $application, Mage_Core_Model_Website_Factory $websiteFactory, Mage_Core_Model_Store_Group_Factory $storeGroupFactory, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); $this->_application = $application; $this->_websiteFactory = $websiteFactory; $this->_storeGroupFactory = $storeGroupFactory; diff --git a/app/code/core/Mage/Backend/Block/System/Config/Edit.php b/app/code/core/Mage/Backend/Block/System/Config/Edit.php index a63f7f7d1e0282d3cc9dcfcff3ce4e4eb4f393f3..481459bdd6775cc9ccdeef830c2f6fd56c342343 100644 --- a/app/code/core/Mage/Backend/Block/System/Config/Edit.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Edit.php @@ -69,6 +69,7 @@ class Mage_Backend_Block_System_Config_Edit extends Mage_Backend_Block_Widget * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Backend_Model_Config_Structure $configStructure * @param array $data * @@ -86,11 +87,12 @@ class Mage_Backend_Block_System_Config_Edit extends Mage_Backend_Block_Widget Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Backend_Model_Config_Structure $configStructure, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); $this->_configStructure = $configStructure; } @@ -114,8 +116,10 @@ class Mage_Backend_Block_System_Config_Edit extends Mage_Backend_Block_Widget $this->addChild('save_button', 'Mage_Backend_Block_Widget_Button', array( 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('Save Config'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#config-edit-form') + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#config-edit-form'), + ), ), )); $block = $this->getLayout()->createBlock($this->_formBlockName); diff --git a/app/code/core/Mage/Backend/Block/System/Config/Form.php b/app/code/core/Mage/Backend/Block/System/Config/Form.php index 70153b77aee71b63f4ef4dc76dcc6e73b759aa45..9248b2bde7451368c01c2b48f65f550ad4c6222b 100644 --- a/app/code/core/Mage/Backend/Block/System/Config/Form.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form.php @@ -144,6 +144,7 @@ class Mage_Backend_Block_System_Config_Form extends Mage_Backend_Block_Widget_Fo * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Backend_Model_Config_Factory $configFactory * @param Varien_Data_Form_Factory $formFactory * @param Mage_Backend_Model_Config_Clone_Factory $cloneModelFactory @@ -167,6 +168,7 @@ class Mage_Backend_Block_System_Config_Form extends Mage_Backend_Block_Widget_Fo Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Backend_Model_Config_Factory $configFactory, Varien_Data_Form_Factory $formFactory, Mage_Backend_Model_Config_Clone_Factory $cloneModelFactory, @@ -177,8 +179,7 @@ class Mage_Backend_Block_System_Config_Form extends Mage_Backend_Block_Widget_Fo array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data - ); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); $this->_configFactory = $configFactory; $this->_formFactory = $formFactory; $this->_cloneModelFactory = $cloneModelFactory; @@ -362,13 +363,14 @@ class Mage_Backend_Block_System_Config_Form extends Mage_Backend_Block_Widget_Fo $fieldPrefix = '', $labelPrefix = '' ) { - + $inherit = true; if (array_key_exists($path, $this->_configData)) { $data = $this->_configData[$path]; $inherit = false; + } elseif ($field->getConfigPath() !== null) { + $data = $this->_configRoot->descend($field->getConfigPath()); } else { $data = $this->_configRoot->descend($path); - $inherit = true; } $fieldRendererClass = $field->getFrontendModel(); if ($fieldRendererClass) { @@ -636,15 +638,15 @@ class Mage_Backend_Block_System_Config_Form extends Mage_Backend_Block_Widget_Fo protected function _getAdditionalElementTypes() { return array( - 'export' => Mage::getConfig() + 'export' => $this->_coreConfig ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_Export'), - 'import' => Mage::getConfig() + 'import' => $this->_coreConfig ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_Import'), - 'allowspecific' => Mage::getConfig() + 'allowspecific' => $this->_coreConfig ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_Select_Allowspecific'), - 'image' => Mage::getConfig() + 'image' => $this->_coreConfig ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_Image'), - 'file' => Mage::getConfig() + 'file' => $this->_coreConfig ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_File') ); } diff --git a/app/code/core/Mage/Backend/Block/System/Config/Form/Field.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field.php index 5ebded2e2b7da3e1287a8ca1983bf5eb8d9e3633..87d6c11fb5b0ab02f69d218e2cd855c3c3100a3d 100644 --- a/app/code/core/Mage/Backend/Block/System/Config/Form/Field.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field.php @@ -56,6 +56,7 @@ class Mage_Backend_Block_System_Config_Form_Field * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_App $application * @param array $data * @@ -73,12 +74,13 @@ class Mage_Backend_Block_System_Config_Form_Field Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_App $application, array $data = array() ) { $this->_application = $application; parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); } diff --git a/app/code/core/Mage/Backend/Block/System/Config/Tabs.php b/app/code/core/Mage/Backend/Block/System/Config/Tabs.php index 369a659d4372b6247d10b9eb1ccccd81e8f003c7..e72e8eb0326fd7f6f2b4f703ac3f5c9368906a1e 100644 --- a/app/code/core/Mage/Backend/Block/System/Config/Tabs.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Tabs.php @@ -84,6 +84,7 @@ class Mage_Backend_Block_System_Config_Tabs extends Mage_Backend_Block_Widget * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Backend_Model_Config_Structure $configStructure * @param array $data * @@ -101,12 +102,12 @@ class Mage_Backend_Block_System_Config_Tabs extends Mage_Backend_Block_Widget Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Backend_Model_Config_Structure $configStructure, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data - ); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); $this->_tabs = $configStructure->getTabs(); $this->setId('system_config_tabs'); diff --git a/app/code/core/Mage/Backend/Block/Template.php b/app/code/core/Mage/Backend/Block/Template.php index 616181d03e7a7829ccfae468bad1b79f6268c92a..8bcdb7dcc50a8fa2a266f7d2b6cba9d69a797876 100644 --- a/app/code/core/Mage/Backend/Block/Template.php +++ b/app/code/core/Mage/Backend/Block/Template.php @@ -33,6 +33,7 @@ * * @SuppressWarnings(PHPMD.NumberOfChildren) * @SuppressWarnings(PHPMD.numberOfChildren) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Mage_Backend_Block_Template extends Mage_Core_Block_Template { @@ -48,6 +49,7 @@ class Mage_Backend_Block_Template extends Mage_Core_Block_Template * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -64,11 +66,11 @@ class Mage_Backend_Block_Template extends Mage_Core_Block_Template Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data - ); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); } /** diff --git a/app/code/core/Mage/Backend/Block/Widget.php b/app/code/core/Mage/Backend/Block/Widget.php index ae650e6d7f6b9310f88327f88d72489ef7435871..84f65111337d8342cf640f0172acc6e97c4bb5a8 100644 --- a/app/code/core/Mage/Backend/Block/Widget.php +++ b/app/code/core/Mage/Backend/Block/Widget.php @@ -36,7 +36,7 @@ class Mage_Backend_Block_Widget extends Mage_Backend_Block_Template public function getId() { if ($this->getData('id')===null) { - $this->setData('id', Mage::helper('Mage_Core_Helper_Data')->uniqHash('id_')); + $this->setData('id', $this->_helperFactory->get('Mage_Core_Helper_Data')->uniqHash('id_')); } return $this->getData('id'); } diff --git a/app/code/core/Mage/Backend/Block/Widget/Button.php b/app/code/core/Mage/Backend/Block/Widget/Button.php index f1cc2894f37c9b31a53ff6dc5a28855929e06dbd..a8a4a3cae259e7c723432a37c99a1b90a66f1e94 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Button.php +++ b/app/code/core/Mage/Backend/Block/Widget/Button.php @@ -88,8 +88,8 @@ class Mage_Backend_Block_Widget_Button extends Mage_Backend_Block_Widget 'value' => $this->getValue(), 'disabled' => $disabled ); - if ($this->getDataAttr()) { - foreach ($this->getDataAttr() as $key => $attr) { + if ($this->getDataAttribute()) { + foreach ($this->getDataAttribute() as $key => $attr) { $attributes['data-' . $key] = json_encode($attr); } } diff --git a/app/code/core/Mage/Backend/Block/Widget/Form/Container.php b/app/code/core/Mage/Backend/Block/Widget/Form/Container.php index 8b29923b496992f335af132dc48f7a924d641710..e3bad6f699ab3de6f2d0a5d1e522922fcd75d7e5 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Form/Container.php +++ b/app/code/core/Mage/Backend/Block/Widget/Form/Container.php @@ -71,9 +71,11 @@ class Mage_Backend_Block_Widget_Form_Container extends Mage_Backend_Block_Widget $this->_addButton('save', array( 'label' => $this->__('Save'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#edit_form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#edit_form'), + ), + ), ), 1); } diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php index 8050f01186d53e830c83710c043d75938e6095ff..378c20fafd0aedbd2d2eb5671d22067985087209 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php @@ -52,6 +52,7 @@ class Mage_Backend_Block_Widget_Grid_Column_Multistore extends Mage_Backend_Bloc * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_App $application * @param array $data * @@ -69,11 +70,12 @@ class Mage_Backend_Block_Widget_Grid_Column_Multistore extends Mage_Backend_Bloc Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_App $application, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); $this->_app = $application; } diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Action.php index cd22633b2dccfcf19fcb1ab6ea4a97043fbbac24..48e7e3a8d971b3cd27bd0184b1a8285863b5d6e6 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Action.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Action.php @@ -138,7 +138,7 @@ class Mage_Backend_Block_Widget_Grid_Column_Renderer_Action break; case 'url': - if (is_array($action['url'])) { + if (is_array($action['url']) && isset($action['field'])) { $params = array($action['field']=>$this->_getValue($row)); if (isset($action['url']['params'])) { $params = array_merge($action['url']['params'], $params); diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Currency.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Currency.php index 8447c8743d5d8a74db0887bbcf6ea9daf891b122..7d6cf0f49a86e2354d8e22825d8d6b3453695e5c 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Currency.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Currency.php @@ -73,6 +73,7 @@ class Mage_Backend_Block_Widget_Grid_Column_Renderer_Currency * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_MOdel_App $app * @param Mage_Core_Model_Locale $locale * @param Mage_Directory_Model_Currency_DefaultLocator $currencyLocator @@ -92,14 +93,14 @@ class Mage_Backend_Block_Widget_Grid_Column_Renderer_Currency Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_MOdel_App $app, Mage_Core_Model_Locale $locale, Mage_Directory_Model_Currency_DefaultLocator $currencyLocator, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data - ); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); $this->_app = $app; $this->_locale = $locale; $this->_currencyLocator = $currencyLocator; diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php b/app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php index 94f1eb832caff133e446e24c655ffb985cda01c0..43ff0f47db51bd33ab901fc9d59128497e8e8622 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php @@ -132,6 +132,7 @@ class Mage_Backend_Block_Widget_Grid_ColumnSet extends Mage_Core_Block_Template * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Backend_Helper_Data $helper * @param Mage_Backend_Model_Widget_Grid_Row_UrlGeneratorFactory $generatorFactory * @param Mage_Backend_Model_Widget_Grid_SubTotals $subtotals @@ -153,6 +154,7 @@ class Mage_Backend_Block_Widget_Grid_ColumnSet extends Mage_Core_Block_Template Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Backend_Helper_Data $helper, Mage_Backend_Model_Widget_Grid_Row_UrlGeneratorFactory $generatorFactory, Mage_Backend_Model_Widget_Grid_SubTotals $subtotals, @@ -176,7 +178,7 @@ class Mage_Backend_Block_Widget_Grid_ColumnSet extends Mage_Core_Block_Template ); parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); $this->setEmptyText($this->_helper->__( isset($data['empty_text'])? $data['empty_text'] : 'No records found.' diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Export.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Export.php index 69e50098ff8ec3bb18c314980c72a05197892115..94ea3b58f16cd2eca8ea63cdca05d6342e8b7c76 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Export.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Export.php @@ -52,6 +52,11 @@ class Mage_Backend_Block_Widget_Grid_Export */ protected $_template = "Mage_Backend::widget/grid/export.phtml"; + /** + * @var string + */ + protected $_exportPath; + protected function _construct() { parent::_construct(); @@ -63,6 +68,7 @@ class Mage_Backend_Block_Widget_Grid_Export $this->addExportType($type['urlPath'], $type['label']); } } + $this->_exportPath = Mage::getBaseDir('var') . DS . 'export'; } /** @@ -179,10 +185,7 @@ class Mage_Backend_Block_Widget_Grid_Export */ protected function _getFileContainerContent(array $fileData) { - $ioFile = new Varien_Io_File(); - $path = $ioFile->dirname($fileData['value']); - $ioFile->open(array('path' => $path)); - return $ioFile->read($fileData['value']); + return $this->_filesystem->read($fileData['value'], $this->_exportPath); } /** @@ -259,9 +262,9 @@ class Mage_Backend_Block_Widget_Grid_Export * Write item data to csv export file * * @param Varien_Object $item - * @param Varien_Io_File $adapter + * @param Magento_Filesystem_StreamInterface $stream */ - protected function _exportCsvItem(Varien_Object $item, Varien_Io_File $adapter) + protected function _exportCsvItem(Varien_Object $item, Magento_Filesystem_StreamInterface $stream) { $row = array(); foreach ($this->_getColumns() as $column) { @@ -269,7 +272,7 @@ class Mage_Backend_Block_Widget_Grid_Export $row[] = $column->getRowFieldExport($item); } } - $adapter->streamWriteCsv($row); + $stream->writeCsv($row); } /** @@ -281,26 +284,23 @@ class Mage_Backend_Block_Widget_Grid_Export */ public function getCsvFile() { - $ioFile = new Varien_Io_File(); - - $path = Mage::getBaseDir('var') . DS . 'export' . DS; $name = md5(microtime()); - $file = $path . DS . $name . '.csv'; + $file = $this->_exportPath . DS . $name . '.csv'; + + $this->_filesystem->setIsAllowCreateDirectories(true); + $stream = $this->_filesystem->createAndOpenStream($file, 'w+', $this->_exportPath); - $ioFile->setAllowCreateFolders(true); - $ioFile->open(array('path' => $path)); - $ioFile->streamOpen($file, 'w+'); - $ioFile->streamLock(true); - $ioFile->streamWriteCsv($this->_getExportHeaders()); + $stream->writeCsv($this->_getExportHeaders()); + $stream->lock(true); - $this->_exportIterateCollection('_exportCsvItem', array($ioFile)); + $this->_exportIterateCollection('_exportCsvItem', array($stream)); if ($this->getCountTotals()) { - $ioFile->streamWriteCsv($this->_getExportTotals()); + $stream->writeCsv($this->_getExportTotals()); } - $ioFile->streamUnlock(); - $ioFile->streamClose(); + $stream->unlock(); + $stream->close(); return array( 'type' => 'filename', @@ -409,25 +409,22 @@ class Mage_Backend_Block_Widget_Grid_Export $collection = $this->_getRowCollection(); $convert = new Magento_Convert_Excel($collection->getIterator(), array($this, 'getRowRecord')); - $ioFile = new Varien_Io_File(); - $path = Mage::getBaseDir('var') . DS . 'export' . DS; $name = md5(microtime()); - $file = $path . DS . $name . '.xml'; + $file = $this->_exportPath . DS . $name . '.xml'; - $ioFile->setAllowCreateFolders(true); - $ioFile->open(array('path' => $path)); - $ioFile->streamOpen($file, 'w+'); - $ioFile->streamLock(true); + $this->_filesystem->setIsAllowCreateDirectories(true); + $stream = $this->_filesystem->createAndOpenStream($file, 'w+', $this->_exportPath); + $stream->lock(true); $convert->setDataHeader($this->_getExportHeaders()); if ($this->getCountTotals()) { $convert->setDataFooter($this->_getExportTotals()); } - $convert->write($ioFile, $sheetName); - $ioFile->streamUnlock(); - $ioFile->streamClose(); + $convert->write($stream, $sheetName); + $stream->unlock(); + $stream->close(); return array( 'type' => 'filename', diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php index 8df5f22c1e4ff2075739669a532b4cf5d7a326bd..7fec3edcac081a7159e13009d49fdf8758a46f79 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php @@ -168,12 +168,21 @@ class Mage_Backend_Block_Widget_Grid_Extended */ protected $_subtotals = array(); + /** + * @var string + */ protected $_template = 'Mage_Backend::widget/grid/extended.phtml'; + /** + * @var string + */ + protected $_exportPath; + protected function _construct() { parent::_construct(); $this->_emptyText = Mage::helper('Mage_Backend_Helper_Data')->__('No records found.'); + $this->_exportPath = Mage::getBaseDir('var') . DS . 'export'; } /** @@ -862,10 +871,7 @@ class Mage_Backend_Block_Widget_Grid_Extended */ protected function _getFileContainerContent(array $fileData) { - $io = new Varien_Io_File(); - $path = $io->dirname($fileData['value']); - $io->open(array('path' => $path)); - return $io->read($fileData['value']); + return $this->_filesystem->read($fileData['value'], $this->_exportPath); } /** @@ -941,9 +947,9 @@ class Mage_Backend_Block_Widget_Grid_Extended * Write item data to csv export file * * @param Varien_Object $item - * @param Varien_Io_File $adapter + * @param Magento_Filesystem_StreamInterface $stream */ - protected function _exportCsvItem(Varien_Object $item, Varien_Io_File $adapter) + protected function _exportCsvItem(Varien_Object $item, Magento_Filesystem_StreamInterface $stream) { $row = array(); foreach ($this->getColumns() as $column) { @@ -951,7 +957,7 @@ class Mage_Backend_Block_Widget_Grid_Extended $row[] = $column->getRowFieldExport($item); } } - $adapter->streamWriteCsv($row); + $stream->writeCsv($row); } /** @@ -966,26 +972,22 @@ class Mage_Backend_Block_Widget_Grid_Extended $this->_isExport = true; $this->_prepareGrid(); - $io = new Varien_Io_File(); - - $path = Mage::getBaseDir('var') . DS . 'export' . DS; $name = md5(microtime()); - $file = $path . DS . $name . '.csv'; + $file = $this->_exportPath . DS . $name . '.csv'; - $io->setAllowCreateFolders(true); - $io->open(array('path' => $path)); - $io->streamOpen($file, 'w+'); - $io->streamLock(true); - $io->streamWriteCsv($this->_getExportHeaders()); + $this->_filesystem->setIsAllowCreateDirectories(true); + $stream = $this->_filesystem->createAndOpenStream($file, 'w+', $this->_exportPath); + $stream->lock(true); + $stream->writeCsv($this->_getExportHeaders()); - $this->_exportIterateCollection('_exportCsvItem', array($io)); + $this->_exportIterateCollection('_exportCsvItem', array($stream)); if ($this->getCountTotals()) { - $io->streamWriteCsv($this->_getExportTotals()); + $stream->writeCsv($this->_getExportTotals()); } - $io->streamUnlock(); - $io->streamClose(); + $stream->unlock(); + $stream->close(); return array( 'type' => 'filename', @@ -1103,26 +1105,23 @@ class Mage_Backend_Block_Widget_Grid_Extended $this->_isExport = true; $this->_prepareGrid(); - $convert = new Magento_Convert_Excel($this->getCollection()->getIterator(), array($this, 'getRowRecord')); - $io = new Varien_Io_File(); + $convert = new Magento_Convert_Excel($this->getCollection()->getIterator(), array($this, 'getRowRecord')); - $path = Mage::getBaseDir('var') . DS . 'export' . DS; $name = md5(microtime()); - $file = $path . DS . $name . '.xml'; + $file = $this->_exportPath . DS . $name . '.xml'; - $io->setAllowCreateFolders(true); - $io->open(array('path' => $path)); - $io->streamOpen($file, 'w+'); - $io->streamLock(true); + $this->_filesystem->setIsAllowCreateDirectories(true); + $stream = $this->_filesystem->createAndOpenStream($file, 'w+', $this->_exportPath); + $stream->lock(true); $convert->setDataHeader($this->_getExportHeaders()); if ($this->getCountTotals()) { $convert->setDataFooter($this->_getExportTotals()); } - $convert->write($io, $sheetName); - $io->streamUnlock(); - $io->streamClose(); + $convert->write($stream, $sheetName); + $stream->unlock(); + $stream->close(); return array( 'type' => 'filename', diff --git a/app/code/core/Mage/Backend/Controller/Router/Default.php b/app/code/core/Mage/Backend/Controller/Router/Default.php index c3ccca3218aa52dbc91407ee53c90d564d51a784..b0ecdc8f920293ee8700e286fb9d31c247be0aaf 100644 --- a/app/code/core/Mage/Backend/Controller/Router/Default.php +++ b/app/code/core/Mage/Backend/Controller/Router/Default.php @@ -48,18 +48,20 @@ class Mage_Backend_Controller_Router_Default extends Mage_Core_Controller_Varien /** * @param Mage_Core_Controller_Varien_Action_Factory $controllerFactory - * @param Magento_ObjectManager $objectManager + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Model_App $app * @param string $areaCode * @param string $baseController * @throws InvalidArgumentException */ public function __construct( Mage_Core_Controller_Varien_Action_Factory $controllerFactory, - Magento_ObjectManager $objectManager, + Magento_Filesystem $filesystem, + Mage_Core_Model_App $app, $areaCode, $baseController ) { - parent::__construct($controllerFactory, $objectManager, $areaCode, $baseController); + parent::__construct($controllerFactory, $filesystem, $app, $areaCode, $baseController); $this->_areaFrontName = Mage::helper('Mage_Backend_Helper_Data')->getAreaFrontName(); if (empty($this->_areaFrontName)) { diff --git a/app/code/core/Mage/Backend/Helper/Data.php b/app/code/core/Mage/Backend/Helper/Data.php index 3363678fc2ba868ddc643600679e7db2b3ea7a85..e7ceb57f646bd8c3d4b39ea1e20e81fdc207bd7c 100644 --- a/app/code/core/Mage/Backend/Helper/Data.php +++ b/app/code/core/Mage/Backend/Helper/Data.php @@ -109,7 +109,7 @@ class Mage_Backend_Helper_Data extends Mage_Core_Helper_Abstract * Decode filter string * * @param string $filterString - * @return data + * @return array */ public function prepareFilterString($filterString) { diff --git a/app/code/core/Mage/Backend/Model/Config.php b/app/code/core/Mage/Backend/Model/Config.php index 37fba1dff5de85d427d90c53f8f7e71509d7d02d..45cd4cc57714e4836d4b217219e773ab83b9772a 100644 --- a/app/code/core/Mage/Backend/Model/Config.php +++ b/app/code/core/Mage/Backend/Model/Config.php @@ -169,23 +169,23 @@ class Mage_Backend_Model_Config extends Varien_Object * @param string $groupId * @param array $groupData * @param array $groups - * @param string $path + * @param string $sectionPath * @param array $extraOldGroups * @param array $oldConfig * @param Mage_Core_Model_Resource_Transaction $saveTransaction * @param Mage_Core_Model_Resource_Transaction $deleteTransaction */ - public function _processGroup( + protected function _processGroup( $groupId, array $groupData, array $groups, - $path, + $sectionPath, array &$extraOldGroups, array &$oldConfig, Mage_Core_Model_Resource_Transaction $saveTransaction, Mage_Core_Model_Resource_Transaction $deleteTransaction ) { - $groupPath = $path . '/' . $groupId; + $groupPath = $sectionPath . '/' . $groupId; $website = $this->getWebsite(); $store = $this->getStore(); $scope = $this->getScope(); @@ -258,10 +258,10 @@ class Mage_Backend_Model_Config extends Varien_Object $configPath = $field->getConfigPath(); if (!empty($configPath) && strrpos($configPath, '/') > 0) { // Extend old data with specified section group - $groupPath = substr($configPath, 0, strrpos($configPath, '/')); - if (!isset($extraOldGroups[$groupPath])) { - $oldConfig = $this->extendConfig($groupPath, true, $oldConfig); - $extraOldGroups[$groupPath] = true; + $configGroupPath = substr($configPath, 0, strrpos($configPath, '/')); + if (!isset($extraOldGroups[$configGroupPath])) { + $oldConfig = $this->extendConfig($configGroupPath, true, $oldConfig); + $extraOldGroups[$configGroupPath] = true; } $path = $configPath; } diff --git a/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Robots.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Robots.php index 4781715f1d0d31cd92bd9a7ad0dc017986a6acf0..a02f2512a5968fe0e577a5e5cbe7ae5f819be216 100644 --- a/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Robots.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Robots.php @@ -33,6 +33,38 @@ */ class Mage_Backend_Model_Config_Backend_Admin_Robots extends Mage_Core_Model_Config_Data { + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @var string + */ + protected $_filePath; + + /** + * @param Mage_Core_Model_Event_Manager $eventDispatcher + * @param Mage_Core_Model_Cache $cacheManager + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Model_Resource_Abstract $resource + * @param Varien_Data_Collection_Db $resourceCollection + * @param array $data + */ + public function __construct( + Mage_Core_Model_Event_Manager $eventDispatcher, + Mage_Core_Model_Cache $cacheManager, + Magento_Filesystem $filesystem, + Mage_Core_Model_Resource_Abstract $resource = null, + Varien_Data_Collection_Db $resourceCollection = null, + array $data = array() + ) { + parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data); + $this->_filesystem = $filesystem; + $this->_filePath = Magento_Filesystem::getAbsolutePath(Mage::getBaseDir() . DS . 'robots.txt'); + } + + /** * Return content of default robot.txt * @@ -40,11 +72,9 @@ class Mage_Backend_Model_Config_Backend_Admin_Robots extends Mage_Core_Model_Con */ protected function _getDefaultValue() { - $fileIo = $this->_getFileObject(); - $file = $this->_getRobotsTxtFilePath(); - if ($fileIo->fileExists($file)) { - $fileIo->open(array('path' => $fileIo->getDestinationFolder($file))); - return $fileIo->read($file); + $file = $this->_filePath; + if ($this->_filesystem->isFile($file)) { + return $this->_filesystem->read($file); } return false; } @@ -71,32 +101,9 @@ class Mage_Backend_Model_Config_Backend_Admin_Robots extends Mage_Core_Model_Con protected function _afterSave() { if ($this->getValue()) { - $file = $this->_getRobotsTxtFilePath(); - $fileIo = $this->_getFileObject(); - $fileIo->open(array('path' => $fileIo->getDestinationFolder($file))); - $fileIo->write($file, $this->getValue()); + $this->_filesystem->write($this->_filePath, $this->getValue()); } return parent::_afterSave(); } - - /** - * Get path to robots.txt - * - * @return string - */ - protected function _getRobotsTxtFilePath() - { - return $this->_getFileObject()->getCleanPath(Mage::getBaseDir() . DS . 'robots.txt'); - } - - /** - * Get file io - * - * @return Varien_Io_File - */ - protected function _getFileObject() - { - return new Varien_Io_File(); - } } diff --git a/app/code/core/Mage/Backend/Model/Config/Backend/Email/Logo.php b/app/code/core/Mage/Backend/Model/Config/Backend/Email/Logo.php index 48137c5883c8873a0731fc0ef4281b443b14dbd8..a094321121c686aeb2195d6f4f1e649727e04bc5 100644 --- a/app/code/core/Mage/Backend/Model/Config/Backend/Email/Logo.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Email/Logo.php @@ -87,10 +87,8 @@ class Mage_Backend_Model_Config_Backend_Email_Logo extends Mage_Backend_Model_Co $fileTmpName = $_FILES['groups']['tmp_name'][$this->getGroupId()]['fields'][$this->getField()]['value']; if ($this->getOldValue() && ($fileTmpName || $deleteFlag)) { - $ioService = new Varien_Io_File(); - $ioService->rm( - $this->_getUploadRoot(self::UPLOAD_ROOT_TOKEN) . DS . self::UPLOAD_DIR . DS . $this->getOldValue() - ); + $uploadPath = $this->_getUploadRoot(self::UPLOAD_ROOT_TOKEN) . DS . self::UPLOAD_DIR; + $this->_filesystem->delete($uploadPath . DS . $this->getOldValue(), $uploadPath); } return parent::_beforeSave(); } diff --git a/app/code/core/Mage/Backend/Model/Config/Backend/File.php b/app/code/core/Mage/Backend/Model/Config/Backend/File.php index 6017d24f83074facfdc90bf0285bd31e74e88de9..319bf2825abc78942159aca337369f0f14c3a180 100644 --- a/app/code/core/Mage/Backend/Model/Config/Backend/File.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/File.php @@ -45,10 +45,16 @@ class Mage_Backend_Model_Config_Backend_File extends Mage_Core_Model_Config_Data */ protected $_maxFileSize = 0; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + /** * @param Mage_Core_Model_Event_Manager $eventDispatcher * @param Mage_Core_Model_Cache $cacheManager * @param Mage_Backend_Model_Config_Backend_File_RequestData $requestData + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_Resource_Abstract $resource * @param Varien_Data_Collection_Db $resourceCollection * @param array $data @@ -57,16 +63,16 @@ class Mage_Backend_Model_Config_Backend_File extends Mage_Core_Model_Config_Data Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Mage_Backend_Model_Config_Backend_File_RequestData $requestData, + Magento_Filesystem $filesystem, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array() ) { parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data); $this->_requestData = $requestData; + $this->_filesystem = $filesystem; } - - /** * Save uploaded file before saving config value * @@ -120,7 +126,8 @@ class Mage_Backend_Model_Config_Backend_File extends Mage_Core_Model_Config_Data */ public function validateMaxSize($filePath) { - if ($this->_maxFileSize > 0 && filesize($filePath) > ($this->_maxFileSize * 1024)) { + if ($this->_maxFileSize > 0 + && $this->_filesystem->getFileSize($filePath, dirname($filePath)) > ($this->_maxFileSize * 1024)) { throw Mage::exception('Mage_Core', Mage::helper('Mage_Backend_Helper_Data') ->__('Uploaded file is larger than %.2f kilobytes allowed by server', $this->_maxFileSize) diff --git a/app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml b/app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml index 4c41bd96abf4299e82c93e895a923963d01cf72e..c4da2e60f9c95b668e42cee543c8c7e98ad68e8a 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml @@ -36,7 +36,7 @@ <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/jquery-no-conflict.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.custom.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/validation.js') ?>"></script> diff --git a/app/code/core/Mage/Backend/view/adminhtml/system/config/edit.phtml b/app/code/core/Mage/Backend/view/adminhtml/system/config/edit.phtml index f8a00ecdae740d19a9b877e7ae8849eac1db3f22..ebb5b8946669894890653d09481a0474ebf87b49 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/system/config/edit.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/system/config/edit.phtml @@ -49,5 +49,5 @@ <?php echo $this->getChildHtml('form') ?> </form> <script type="text/javascript"> - jQuery('#config-edit-form').form().validation(); + jQuery('#config-edit-form').mage('form').mage('validation'); </script> diff --git a/app/code/core/Mage/Backend/view/adminhtml/widget/button/split.phtml b/app/code/core/Mage/Backend/view/adminhtml/widget/button/split.phtml index fb6b5ed80016fd6ad08abd8d827050eef1b4ae24..2d0e80a9336c9ffd31b23a6b0af80835d1fbce2d 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/widget/button/split.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/widget/button/split.phtml @@ -25,43 +25,54 @@ */ ?> <?php -/** - * Template for Mage_Backend_Block_Widget_Button_Split - */ +/** @var $this Mage_Backend_Block_Widget_Button_Split */ +/** @var $_helper Mage_Core_Helper_Data */ +$_helper = $this->helper('Mage_Core_Helper_Data'); ?> -<div id="<?php echo $this->getId(); ?>" class="buttons-group widget-button-split"> - <div id="<?php echo $this->getId(); ?>_main_control" class="main-control button <?php echo $this->getClass() ?: '' ?>"<?php echo $this->getUiId(); ?>> - <span><?php echo $this->getLabel(); ?></span> +<div id="<?php echo $this->getId(); ?>" class="buttons-group widget-button-split <?php echo $this->getButtonClass() ?: '' ?>"> + <div id="<?php echo $this->getId(); ?>-main-button" class="main-control button <?php echo $this->getClass() ?: '' ?>"<?php echo $this->getUiId(); ?>> + <span><?php echo $this->escapeHtml($this->getLabel()); ?></span> </div> - <div class="button btn-toggle" data-toggle="dropdown" <?php echo $this->getUiId("dropdown"); ?>><span>Select</span></div> + <div class="button btn-toggle" data-toggle="dropdown" <?php echo $this->getUiId('dropdown'); ?>><span>Select</span></div> <ul class="dropdown-menu" <?php echo $this->getUiId("dropdown-menu"); ?>> <?php foreach ($this->getOptions() as $key => $option): ?> <li> - <span class="item<?php if ($option['default']):?> item-default<?php endif; ?>" onclick="<?php echo $option['onclick']?>", <?php echo $this->getUiId("item", $key)?>> - <?php echo $option['label']?> + <span class="item<?php if (!empty($option['default'])):?> item-default<?php endif; ?>" + <?php + echo isset($option['id']) ? ' id="' . $this->getId() . '-' . $option['id'] . '"' : '', + isset($option['onclick']) ? 'onclick="' . $option['onclick'] . '"' : '', + $this->getUiId(isset($option['id']) ? $option['id'] : 'item' . '-' . $key); + if (isset($option['data_attribute'])) { + foreach ($option['data_attribute'] as $dataKey => $data) { + echo ' data-', $dataKey, '="', $_helper->escapeHtml($_helper->jsonEncode($data)), '"'; + } + } + ?>> + <?php echo $this->escapeHtml($option['label']); ?> </span> <?php if (isset($option['hint'])): ?> - <div class="tooltip" <?php echo $this->getUiId("item", $key, "tooltip"); ?>> - <a href="<?php echo $option['hint']['href'] ?>" class="help"><?php echo $option['hint']['label'] ?></a> + <div class="tooltip" <?php echo $this->getUiId('item', $key, 'tooltip'); ?>> + <a href="<?php echo $this->escapeHtml($option['hint']['href']) ?>" class="help"> + <?php echo $this->escapeHtml($option['hint']['label']) ?> + </a> </div> <?php endif; ?> </li> <?php endforeach; ?> </ul> </div> -<script type="text/javascript"> -(function($, window) { - $(document).on('click.splitButtonToggle', '.widget-button-split .btn-toggle', function(e) { - $(this).toggleClass('active') - .parent() - .toggleClass('active'); - }); - - $(document).on('click.splitButtonDefault', '.widget-button-split .main-control', function(e) { - $(this) - .siblings('.dropdown-menu') - .find('.item-default') - .trigger('click'); - }); -})(jQuery); +<script> +jQuery(function($) { + $('.widget-button-split') + .on('click.splitToggle', '.btn-toggle', function(event) { + if (!$(event.target).is('.disabled')) { + $(this).toggleClass('active').parent().toggleClass('active'); + } + }) + .on('click.splitDefault', '.main-control', function(event) { + if (!$(event.target).is('.disabled')) { + $(this).siblings('.dropdown-menu').find('.item-default').trigger('click'); + } + }); +}); </script> diff --git a/app/code/core/Mage/Backend/view/adminhtml/widget/form/container.phtml b/app/code/core/Mage/Backend/view/adminhtml/widget/form/container.phtml index c7973ccbe9ae3812064a7ea5378be54ee0552e2a..63964c7497e0c742ff474c37005cb2aaf0c245ae 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/widget/form/container.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/widget/form/container.phtml @@ -41,6 +41,7 @@ </div> <?php endif; ?> <script type="text/javascript"> - jQuery('#edit_form').form().validation({validationUrl: '<?php echo $this->getValidationUrl() ?>'}); + jQuery('#edit_form').mage('form') + .mage('validation', {validationUrl: '<?php echo $this->getValidationUrl() ?>'}); </script> <?php echo $this->getFormScripts() ?> diff --git a/app/code/core/Mage/Backend/view/adminhtml/widget/tabs.phtml b/app/code/core/Mage/Backend/view/adminhtml/widget/tabs.phtml index 4ea074c8409da67cb3875490b23066c1fc9074b2..1d683ae190254846c7c71be13c4c552908375dd0 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/widget/tabs.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/widget/tabs.phtml @@ -24,12 +24,12 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php if($this->getTitle()): ?> - <h3 <?php echo $this->getUiId('title') ?>><?php echo $this->getTitle() ?></h3> -<?php endif ?> <?php if(!empty($tabs)): ?> <div id="<?php echo $this->getId() ?>"> -<ul <?php echo $this->getUiId('tab', $this->getId()) ?> class="<?php echo $this->getIsHoriz() ? 'tabs-horiz' : 'tabs' ?>"> + <?php if($this->getTitle()): ?> + <h3 <?php echo $this->getUiId('title') ?>><?php echo $this->getTitle() ?></h3> + <?php endif ?> + <ul <?php echo $this->getUiId('tab', $this->getId()) ?> class="<?php echo $this->getIsHoriz() ? 'tabs-horiz' : 'tabs' ?>"> <?php foreach ($tabs as $_tab): ?> <?php if (!$this->canShowTab($_tab)): continue; endif; ?> <?php $_tabClass = 'tab-item-link ' . $this->getTabClass($_tab) . ' ' . (preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?> @@ -37,7 +37,12 @@ <?php $_tabHref = $this->getTabUrl($_tab) == '#' ? '#' . $this->getTabId($_tab) . '_content' : $this->getTabUrl($_tab) ?> <li <?php if($this->getTabIsHidden($_tab)): ?> style="display:none"<?php endif; ?><?php echo $this->getUiId('tab', 'item', $_tab->getId()) ?>> <a href="<?php echo $_tabHref ?>" id="<?php echo $this->getTabId($_tab) ?>" name="<?php echo $this->getTabId($_tab, false) ?>" title="<?php echo $this->getTabTitle($_tab) ?>" class="<?php echo $_tabClass;?>" data-tab-type="<?php echo $_tabType;?>" <?php echo $this->getUiId('tab', 'link', $_tab->getId()) ?>> - <span><span class="changed" title="<?php echo $this->__('The information in this tab has been changed.') ?>"></span><span class="error" title="<?php echo $this->__('This tab contains invalid data. Please solve the problem before saving.') ?>"></span><?php echo $this->getTabLabel($_tab); ?></span> + <span> + <span class="changed" title="<?php echo $this->__('The information in this tab has been changed.') ?>"></span> + <span class="error" title="<?php echo $this->__('This tab contains invalid data. Please solve the problem before saving.') ?>"></span> + <span class="loading" title="<?php echo $this->__('Loading...') ?>"></span> + <?php echo $this->getTabLabel($_tab); ?> + </span> </a> <div id="<?php echo $this->getTabId($_tab) ?>_content" style="display:none;"<?php echo $this->getUiId('tab', 'content', $_tab->getId()) ?>><?php echo $this->getTabContent($_tab) ?></div> </li> diff --git a/app/code/core/Mage/Backup/Helper/Data.php b/app/code/core/Mage/Backup/Helper/Data.php index feb928c8d501da0c3bea15b02b7e65ff0c14bdd3..241ec496a839f7f1fd780b6eef9d45efa9656472 100644 --- a/app/code/core/Mage/Backup/Helper/Data.php +++ b/app/code/core/Mage/Backup/Helper/Data.php @@ -54,6 +54,19 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract */ const TYPE_SNAPSHOT_WITHOUT_MEDIA = 'nomedia'; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + } + /** * Get all possible backup type values with descriptive title * @@ -149,7 +162,8 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract * * @return boolean */ - public function isRollbackAllowed(){ + public function isRollbackAllowed() + { return Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed('Mage_Backup::rollback' ); } @@ -161,6 +175,7 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract public function getBackupIgnorePaths() { return array( + '.git', '.svn', 'maintenance.flag', Mage::getBaseDir('var') . DS . 'session', @@ -181,6 +196,7 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract { return array( '.svn', + '.git', 'maintenance.flag', Mage::getBaseDir('var') . DS . 'session', Mage::getBaseDir('var') . DS . 'locks', @@ -200,7 +216,7 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract public function turnOnMaintenanceMode() { $maintenanceFlagFile = $this->getMaintenanceFlagFilePath(); - $result = file_put_contents($maintenanceFlagFile, 'maintenance'); + $result = $this->_filesystem->write($maintenanceFlagFile, 'maintenance', Mage::getBaseDir()); return $result !== false; } @@ -211,7 +227,7 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract public function turnOffMaintenanceMode() { $maintenanceFlagFile = $this->getMaintenanceFlagFilePath(); - @unlink($maintenanceFlagFile); + $this->_filesystem->delete($maintenanceFlagFile, Mage::getBaseDir()); } /** @@ -248,6 +264,7 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract /** * Invalidate Cache + * * @return Mage_Backup_Helper_Data */ public function invalidateCache() @@ -266,7 +283,7 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract */ public function invalidateIndexer() { - foreach (Mage::getResourceModel('Mage_Index_Model_Resource_Process_Collection') as $process){ + foreach (Mage::getResourceModel('Mage_Index_Model_Resource_Process_Collection') as $process) { $process->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX); } return $this; diff --git a/app/code/core/Mage/Backup/Model/Backup.php b/app/code/core/Mage/Backup/Model/Backup.php index 6458e0221ac7cd568ca5cded9696639d190e946f..406fb15ae61285bebe6b4396290f4e32d1bb8acf 100644 --- a/app/code/core/Mage/Backup/Model/Backup.php +++ b/app/code/core/Mage/Backup/Model/Backup.php @@ -30,6 +30,13 @@ * @category Mage * @package Mage_Backup * @author Magento Core Team <core@magentocommerce.com> + * + * @method string getPath() + * @method Mage_Backup_Model_Backup setPath() setPath($path) + * @method string getName() + * @method Mage_Backup_Model_Backup setName() setName($name) + * @method string getTime() + * @method Mage_Backup_Model_Backup setTime() setTime($time) */ class Mage_Backup_Model_Backup extends Varien_Object { @@ -46,27 +53,50 @@ class Mage_Backup_Model_Backup extends Varien_Object /** * Gz file pointer * - * @var resource + * @var Magento_Filesystem_Stream_Zlib + */ + protected $_stream = null; + + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @var Mage_Backup_Helper_Data + */ + protected $_helper; + + /** + * @param Mage_Backup_Helper_Data $helper + * @param array $data */ - protected $_handler = null; + public function __construct(Mage_Backup_Helper_Data $helper, $data = array()) + { + $adapter = new Magento_Filesystem_Adapter_Zlib(self::COMPRESS_RATE); + $this->_filesystem = new Magento_Filesystem($adapter); + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_helper = $helper; + parent::__construct($data); + } /** * Load backup file info * - * @param string fileName - * @param string filePath + * @param string $fileName + * @param string $filePath * @return Mage_Backup_Model_Backup */ public function load($fileName, $filePath) { - $backupData = Mage::helper('Mage_Backup_Helper_Data')->extractDataFromFilename($fileName); + $backupData = $this->_helper->extractDataFromFilename($fileName); $this->addData(array( 'id' => $filePath . DS . $fileName, 'time' => (int)$backupData->getTime(), 'path' => $filePath, - 'extension' => Mage::helper('Mage_Backup_Helper_Data')->getExtensionByType($backupData->getType()), - 'display_name' => Mage::helper('Mage_Backup_Helper_Data')->nameToDisplayName($backupData->getName()), + 'extension' => $this->_helper->getExtensionByType($backupData->getType()), + 'display_name' => $this->_helper->nameToDisplayName($backupData->getName()), 'name' => $backupData->getName(), 'date_object' => new Zend_Date((int)$backupData->getTime(), Mage::app()->getLocale()->getLocaleCode()) )); @@ -82,7 +112,7 @@ class Mage_Backup_Model_Backup extends Varien_Object */ public function exists() { - return is_file($this->getPath() . DS . $this->getFileName()); + return $this->_filesystem->isFile($this->_getFilePath()); } /** @@ -99,7 +129,7 @@ class Mage_Backup_Model_Backup extends Varien_Object $filename .= '_' . $backupName; } - $filename .= '.' . Mage::helper('Mage_Backup_Helper_Data')->getExtensionByType($this->getType()); + $filename .= '.' . $this->_helper->getExtensionByType($this->getType()); return $filename; } @@ -110,11 +140,11 @@ class Mage_Backup_Model_Backup extends Varien_Object * @param string $value * @return Mage_Backup_Model_Backup */ - public function setType($value='db') + public function setType($value = 'db') { - $possibleTypes = Mage::helper('Mage_Backup_Helper_Data')->getBackupTypesList(); - if(!in_array($value, $possibleTypes)) { - $value = Mage::helper('Mage_Backup_Helper_Data')->getDefaultBackupType(); + $possibleTypes = $this->_helper->getBackupTypesList(); + if (!in_array($value, $possibleTypes)) { + $value = $this->_helper->getDefaultBackupType(); } $this->_type = $value; @@ -138,93 +168,43 @@ class Mage_Backup_Model_Backup extends Varien_Object * * @param string $content * @return Mage_Backup_Model_Backup - * @throws Mage_Backup_Exception */ public function setFile(&$content) { if (!$this->hasData('time') || !$this->hasData('type') || !$this->hasData('path')) { - Mage::throwException(Mage::helper('Mage_Backup_Helper_Data')->__('Wrong order of creation for new backup.')); - } - - $ioProxy = new Varien_Io_File(); - $ioProxy->setAllowCreateFolders(true); - $ioProxy->open(array('path'=>$this->getPath())); - - $compress = 0; - if (extension_loaded("zlib")) { - $compress = 1; - } - - $rawContent = ''; - if ( $compress ) { - $rawContent = gzcompress( $content, self::COMPRESS_RATE ); - } else { - $rawContent = $content; + Mage::throwException($this->_helper->__('Wrong order of creation for new backup.')); } - $fileHeaders = pack("ll", $compress, strlen($rawContent)); - $ioProxy->write($this->getFileName(), $fileHeaders . $rawContent); + $this->_filesystem->write($this->_getFilePath(), $content); return $this; } /** * Return content of backup file * - * @todo rewrite to Varien_IO, but there no possibility read part of files. * @return string - * @throws Mage_Backup_Exception */ public function &getFile() { - if (!$this->exists()) { - Mage::throwException(Mage::helper('Mage_Backup_Helper_Data')->__("Backup file does not exist.")); - } - - $fResource = @fopen($this->getPath() . DS . $this->getFileName(), "rb"); - if (!$fResource) { - Mage::throwException(Mage::helper('Mage_Backup_Helper_Data')->__("Cannot read backup file.")); - } - - $content = ''; - $compressed = 0; - - $info = unpack("lcompress/llength", fread($fResource, 8)); - if ($info['compress']) { // If file compressed by zlib - $compressed = 1; - } - - if ($compressed && !extension_loaded("zlib")) { - fclose($fResource); - Mage::throwException(Mage::helper('Mage_Backup_Helper_Data')->__('The file was compressed with Zlib, but this extension is not installed on server.')); - } - - if ($compressed) { - $content = gzuncompress(fread($fResource, $info['length'])); - } else { - $content = fread($fResource, $info['length']); + Mage::throwException($this->_helper->__("Backup file does not exist.")); } - fclose($fResource); - - return $content; + return $this->_filesystem->read($this->_getFilePath()); } /** * Delete backup file * - * @throws Mage_Backup_Exception * @return Mage_Backup_Model_Backup */ public function deleteFile() { if (!$this->exists()) { - Mage::throwException(Mage::helper('Mage_Backup_Helper_Data')->__("Backup file does not exist.")); + Mage::throwException($this->_helper->__("Backup file does not exist.")); } - $ioProxy = new Varien_Io_File(); - $ioProxy->open(array('path'=>$this->getPath())); - $ioProxy->rm($this->getFileName()); + $this->_filesystem->delete($this->_getFilePath()); return $this; } @@ -233,43 +213,52 @@ class Mage_Backup_Model_Backup extends Varien_Object * * @param bool $write * @return Mage_Backup_Model_Backup + * @throws Mage_Backup_Exception_NotEnoughPermissions */ public function open($write = false) { if (is_null($this->getPath())) { - Mage::exception('Mage_Backup', Mage::helper('Mage_Backup_Helper_Data')->__('Backup file path was not specified.')); - } - - $ioAdapter = new Varien_Io_File(); - try { - $path = $ioAdapter->getCleanPath($this->getPath()); - $ioAdapter->checkAndCreateFolder($path); - $filePath = $path . DS . $this->getFileName(); - } - catch (Exception $e) { - Mage::exception('Mage_Backup', $e->getMessage()); + Mage::exception('Mage_Backup', $this->_helper->__('Backup file path was not specified.')); } - if ($write && $ioAdapter->fileExists($filePath)) { - $ioAdapter->rm($filePath); + if ($write && $this->_filesystem->isFile($this->_getFilePath())) { + $this->_filesystem->delete($this->_getFilePath()); } - if (!$write && !$ioAdapter->fileExists($filePath)) { - Mage::exception('Mage_Backup', Mage::helper('Mage_Backup_Helper_Data')->__('Backup file "%s" does not exist.', $this->getFileName())); + if (!$write && !$this->_filesystem->isFile($this->_getFilePath())) { + Mage::exception('Mage_Backup', + $this->_helper->__('Backup file "%s" does not exist.', $this->getFileName())); } $mode = $write ? 'wb' . self::COMPRESS_RATE : 'rb'; - $this->_handler = @gzopen($filePath, $mode); - - if (!$this->_handler) { + try { + $compressStream = 'compress.zlib://'; + $workingDirectory = $this->_filesystem->getWorkingDirectory(); + $this->_stream = $this->_filesystem->createAndOpenStream($compressStream . $this->_getFilePath(), $mode, + $compressStream . $workingDirectory); + } + catch (Magento_Filesystem_Exception $e) { throw new Mage_Backup_Exception_NotEnoughPermissions( - Mage::helper('Mage_Backup_Helper_Data')->__('Backup file "%s" cannot be read from or written to.', $this->getFileName()) + $this->_helper->__('Backup file "%s" cannot be read from or written to.', $this->getFileName()) ); } return $this; } + /** + * Get zlib handler + * + * @return Magento_Filesystem_Stream_Zlib + */ + protected function _getStream() + { + if (is_null($this->_stream)) { + Mage::exception('Mage_Backup', $this->_helper->__('Backup file handler was unspecified.')); + } + return $this->_stream; + } + /** * Read backup uncomressed data * @@ -278,20 +267,17 @@ class Mage_Backup_Model_Backup extends Varien_Object */ public function read($length) { - if (is_null($this->_handler)) { - Mage::exception('Mage_Backup', Mage::helper('Mage_Backup_Helper_Data')->__('Backup file handler was unspecified.')); - } - - return gzread($this->_handler, $length); + return $this->_getStream()->read($length); } + /** + * Check end of file. + * + * @return bool + */ public function eof() { - if (is_null($this->_handler)) { - Mage::exception('Mage_Backup', Mage::helper('Mage_Backup_Helper_Data')->__('Backup file handler was unspecified.')); - } - - return gzeof($this->_handler); + return $this->_getStream()->eof(); } /** @@ -302,15 +288,12 @@ class Mage_Backup_Model_Backup extends Varien_Object */ public function write($string) { - if (is_null($this->_handler)) { - Mage::exception('Mage_Backup', Mage::helper('Mage_Backup_Helper_Data')->__('Backup file handler was unspecified.')); - } - try { - gzwrite($this->_handler, $string); + $this->_getStream()->write($string); } - catch (Exception $e) { - Mage::exception('Mage_Backup', Mage::helper('Mage_Backup_Helper_Data')->__('An error occurred while writing to the backup file "%s".', $this->getFileName())); + catch (Magento_Filesystem_Exception $e) { + Mage::exception('Mage_Backup', + $this->_helper->__('An error occurred while writing to the backup file "%s".', $this->getFileName())); } return $this; @@ -323,15 +306,14 @@ class Mage_Backup_Model_Backup extends Varien_Object */ public function close() { - @gzclose($this->_handler); - $this->_handler = null; + $this->_getStream()->close(); + $this->_stream = null; return $this; } /** * Print output - * */ public function output() { @@ -339,16 +321,16 @@ class Mage_Backup_Model_Backup extends Varien_Object return ; } - $ioAdapter = new Varien_Io_File(); - $ioAdapter->open(array('path' => $this->getPath())); - - $ioAdapter->streamOpen($this->getFileName(), 'r'); - while ($buffer = $ioAdapter->streamRead()) { + $stream = $this->_filesystem->createAndOpenStream($this->_getFilePath(), 'r'); + while ($buffer = $stream->read(1024)) { echo $buffer; } - $ioAdapter->streamClose(); + $stream->close(); } + /** + * @return int|mixed + */ public function getSize() { if (!is_null($this->getData('size'))) { @@ -356,7 +338,7 @@ class Mage_Backup_Model_Backup extends Varien_Object } if ($this->exists()) { - $this->setData('size', filesize($this->getPath() . DS . $this->getFileName())); + $this->setData('size', $this->_filesystem->getFileSize($this->_getFilePath())); return $this->getData('size'); } @@ -399,4 +381,14 @@ class Mage_Backup_Model_Backup extends Varien_Object return $this; } + + /** + * Get file path. + * + * @return string + */ + protected function _getFilePath() + { + return $this->getPath() . DS . $this->getFileName(); + } } diff --git a/app/code/core/Mage/Backup/Model/Fs/Collection.php b/app/code/core/Mage/Backup/Model/Fs/Collection.php index fdaf5394b63314e1d1723d0373a3e9467bc9bc48..c461c33982db9ce0f94448b784342a3a6b113145 100644 --- a/app/code/core/Mage/Backup/Model/Fs/Collection.php +++ b/app/code/core/Mage/Backup/Model/Fs/Collection.php @@ -40,27 +40,32 @@ class Mage_Backup_Model_Fs_Collection extends Varien_Data_Collection_Filesystem */ protected $_baseDir; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + /** * Set collection specific parameters and make sure backups folder will exist + * + * @param Magento_Filesystem $filesystem */ - public function __construct() + public function __construct(Magento_Filesystem $filesystem) { parent::__construct(); $this->_baseDir = Mage::getBaseDir('var') . DS . 'backups'; + $this->_filesystem = $filesystem; + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->ensureDirectoryExists($this->_baseDir); + $this->_filesystem->setWorkingDirectory($this->_baseDir); - // check for valid base dir - $ioProxy = new Varien_Io_File(); - $ioProxy->mkdir($this->_baseDir); - if (!is_file($this->_baseDir . DS . '.htaccess')) { - $ioProxy->open(array('path' => $this->_baseDir)); - $ioProxy->write('.htaccess', 'deny from all', 0644); - } + $this->_hideBackupsForApache(); // set collection specific params $extensions = Mage::helper('Mage_Backup_Helper_Data')->getExtensions(); - foreach ($extensions as $key => $value) { + foreach ($extensions as $value) { $extensions[] = '(' . preg_quote($value, '/') . ')'; } $extensions = implode('|', $extensions); @@ -73,6 +78,18 @@ class Mage_Backup_Model_Fs_Collection extends Varien_Data_Collection_Filesystem ; } + /** + * Create .htaccess file and deny backups directory access from web + */ + protected function _hideBackupsForApache() + { + $htaccessPath = $this->_baseDir . DS . '.htaccess'; + if (!$this->_filesystem->isFile($htaccessPath)) { + $this->_filesystem->write($htaccessPath, 'deny from all'); + $this->_filesystem->changePermissions($htaccessPath, 0644); + } + } + /** * Get backup-specific data from model for each row * @@ -86,7 +103,7 @@ class Mage_Backup_Model_Fs_Collection extends Varien_Data_Collection_Filesystem ->getData() as $key => $value) { $row[$key] = $value; } - $row['size'] = filesize($filename); + $row['size'] = $this->_filesystem->getFileSize($filename); $row['id'] = $row['time'] . '_' . $row['type']; return $row; } diff --git a/app/code/core/Mage/Bundle/view/frontend/bundle.js b/app/code/core/Mage/Bundle/view/frontend/bundle.js index 610bd65bc36983069b625383f44ac7b360fd5b63..d223d8aabc370a39fa82ebe9e2bf51bed7bde924 100644 --- a/app/code/core/Mage/Bundle/view/frontend/bundle.js +++ b/app/code/core/Mage/Bundle/view/frontend/bundle.js @@ -22,206 +22,238 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -if(typeof Product=='undefined') { - var Product = {}; -} -/**************************** BUNDLE PRODUCT **************************/ -Product.Bundle = Class.create(); -Product.Bundle.prototype = { - initialize: function(config){ - this.config = config; +/*jshint browser:true jquery:true*/ +(function($, undefined) { + "use strict"; + $.widget('mage.bundleOption', { + options: { + productBundleSelector: '.product-bundle-option', + mapPopupPrice: '#map-popup-price', + prices: {}, + priceTemplate: '<span class="price">${formattedPrice}</span>' + }, - // Set preconfigured values for correct price base calculation - if (config.defaultValues) { - for (var option in config.defaultValues) { - if (this.config['options'][option].isMulti) { - var selected = new Array(); - for (var i = 0; i < config.defaultValues[option].length; i++) { - selected.push(config.defaultValues[option][i]); - } - this.config.selected[option] = selected; + _create: function() { + $(this.options.productBundleSelector).each( + $.proxy(function(key, value) { + var element = $(value), + inputs = element.filter(":input"), + isNotCheckboxRadio = inputs.is(':not(":checkbox, :radio")'); + element.on((isNotCheckboxRadio ? 'change' : 'click'), $.proxy(this.changeSelection, this)); + }, this) + ); + $(this.options.bundleConfig.defaultValues).each(function(key, ele) { + if (this.options.optionConfig.options[ele].isMulti) { + var selected = []; + $(this.options.bundleConfig.defaultValues[ele]).each(function(k, e) { + selected.push(this.options.bundleConfig.defaultValues[e]); + }); + var parts = ele.attr('id').split('-'); + this.options.bundleConfig.selected[parts[2]] = selected; } else { - this.config.selected[option] = new Array(config.defaultValues[option] + ""); + this.options.bundleConfig.selected[ele] = [this.options.bundleConfig.defaultValues[ele]]; } + }); + this.reloadPrice(); + }, + + _formatCurrency: function(price, format, showPlus) { + var precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision, + integerRequired = isNaN(format.integerRequired = Math.abs(format.integerRequired)) ? 1 : format.integerRequired, + decimalSymbol = format.decimalSymbol === undefined ? "," : format.decimalSymbol, + groupSymbol = format.groupSymbol === undefined ? "." : format.groupSymbol, + groupLength = format.groupLength === undefined ? 3 : format.groupLength, + s = ''; + + if (showPlus === undefined || showPlus === true) { + s = price < 0 ? "-" : ( showPlus ? "+" : ""); + } else if (showPlus === false) { + s = ''; } - } + var i = parseInt(price = Math.abs(+price || 0).toFixed(precision), 10) + '', + pad = (i.length < integerRequired) ? (integerRequired - i.length) : 0; + while (pad) { + i = '0' + i; + pad--; + } + var j = i.length > groupLength ? i.length % groupLength : 0, + re = new RegExp("(\\d{" + groupLength + "})(?=\\d)", "g"); - this.reloadPrice(); - }, - changeSelection: function(selection){ - var parts = selection.id.split('-'); - if (this.config['options'][parts[2]].isMulti) { - selected = new Array(); - if (selection.tagName == 'SELECT') { - for (var i = 0; i < selection.options.length; i++) { - if (selection.options[i].selected && selection.options[i].value != '') { - selected.push(selection.options[i].value); + /** + * replace(/-/, 0) is only for fixing Safari bug which appears + * when Math.abs(0).toFixed() executed on "0" number. + * Result is "0.-0" :( + */ + var r = (j ? i.substr(0, j) + groupSymbol : "") + i.substr(j).replace(re, "$1" + groupSymbol) + + (precision ? decimalSymbol + Math.abs(price - i).toFixed(precision).replace(/-/, 0).slice(2) : ""), + pattern = format.pattern.indexOf('{sign}') < 0 ? s + format.pattern : format.pattern.replace('{sign}', s); + return pattern.replace('%s', r).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + }, + + changeSelection: function(e) { + var element = $(e.target), + parts = element.attr('id').split('-'), + config = this.options.bundleConfig; + if (config.options[parts[2]].isMulti) { + var selected = []; + if (element.is('select')) { + selected.push(element.val()); + config.selected[parts[2]] = selected; + } else if (element.is('input')) { + if (element.is(":radio")) { + if (element.is(":checked")) { + selected.push(element.val()); + config.selected[parts[2]] = selected; + } } - } - } else if (selection.tagName == 'INPUT') { - selector = parts[0]+'-'+parts[1]+'-'+parts[2]; - selections = $$('.'+selector); - for (var i = 0; i < selections.length; i++) { - if (selections[i].checked && selections[i].value != '') { - selected.push(selections[i].value); + if (element.is(":checkbox")) { + if (element.is(":checked")) { + config.selected[parts[2]].push(element.val()); + } else { + config.selected[parts[2]].splice($.inArray(element.val(), config.selected[parts[2]]), 1); + } } } - } - this.config.selected[parts[2]] = selected; - } else { - if (selection.value != '') { - this.config.selected[parts[2]] = new Array(selection.value); } else { - this.config.selected[parts[2]] = new Array(); - } - this.populateQty(parts[2], selection.value); - } - this.reloadPrice(); - }, - - reloadPrice: function() { - var calculatedPrice = 0; - var dispositionPrice = 0; - var includeTaxPrice = 0; - for (var option in this.config.selected) { - if (this.config.options[option]) { - for (var i=0; i < this.config.selected[option].length; i++) { - var prices = this.selectionPrice(option, this.config.selected[option][i]); - calculatedPrice += Number(prices[0]); - dispositionPrice += Number(prices[1]); - includeTaxPrice += Number(prices[2]); + if (element.val() !== '') { + config.selected[parts[2]] = [element.val()]; + } else { + config.selected[parts[2]] = []; } + this.populateQty(parts[2], element.val()); } - } - - var event = $(document).fire('bundle:reload-price', { - price: calculatedPrice, - priceInclTax: includeTaxPrice, - dispositionPrice: dispositionPrice, - bundle: this - }); - if (!event.noReloadPrice) { - optionsPrice.specialTaxPrice = 'true'; - optionsPrice.changePrice('bundle', calculatedPrice); - optionsPrice.changePrice('nontaxable', dispositionPrice); - optionsPrice.changePrice('priceInclTax', includeTaxPrice); - optionsPrice.reload(); - } + this.reloadPrice(); + }, - return calculatedPrice; - }, + reloadPrice: function() { + if (this.options.bundleConfig) { + var optionPrice = { + excludeTax: 0, + includeTax: 0, + price: 0, + update: function(price, excludeTax, includeTax) { + this.price += price; + this.excludeTax += excludeTax; + this.includeTax += includeTax; + } + }; + $.each(this.options.bundleConfig.selected, $.proxy(function(index, value) { + if (this.options.bundleConfig.options[index]) { + $.each(value, $.proxy(function(key, element) { + if (element !== '' && element !== 'none' && element !== undefined && element !== null) { + if ($.isArray(element)) { + $.each(element, $.proxy(function(k, e) { + var prices = this.selectionPrice(index, e); + optionPrice.update(prices[0], prices[1], prices[2]); + }, this)); + } else { + var prices = this.selectionPrice(index, element); + optionPrice.update(prices[0], prices[1], prices[2]); + } + } + }, this)); + } + }, this)); + // Loop through each priceSelector and update price + $.each(this.options.priceSelectors, $.proxy(function(index, value) { + var priceElement = $(value), + clone = $(value + "_clone"), + isClone = false; + if (priceElement.length === 0) { + priceElement = clone; + isClone = true; + } + if (priceElement.length === 1) { + var price = 0; + if (value.indexOf('price-including-tax-') >= 0) { + price = optionPrice.priceInclTax; + } else if (value.indexOf('price-excluding-tax-') >= 0) { + price = optionPrice.priceExclTax; + } else if (value.indexOf('product-price-') >= 0) { + price = optionPrice.price; + } - selectionPrice: function(optionId, selectionId) { - if (selectionId == '' || selectionId == 'none') { - return 0; - } - var qty = null; - if (this.config.options[optionId].selections[selectionId].customQty == 1 && !this.config['options'][optionId].isMulti) { - if ($('bundle-option-' + optionId + '-qty-input')) { - qty = $('bundle-option-' + optionId + '-qty-input').value; - } else { - qty = 1; + var priceHtml = $.tmpl(this.options.priceTemplate, + {'formattedPrice': this._formatCurrency(price, this.options.bundleConfig.priceFormat)} + ); + priceElement.html(priceHtml[0].outerHTML); + // If clone exists, update clone price as well + if (!isClone && clone.length === 1) { + clone.html(priceHtml[0].outerHTML); + } + $(this.options.mapPopupPrice).find(value).html(priceHtml); + } + }, this)); } - } else { - qty = this.config.options[optionId].selections[selectionId].qty; - } - - if (this.config.priceType == '0') { - price = this.config.options[optionId].selections[selectionId].price; - tierPrice = this.config.options[optionId].selections[selectionId].tierPrice; + }, - for (var i=0; i < tierPrice.length; i++) { - if (Number(tierPrice[i].price_qty) <= qty && Number(tierPrice[i].price) <= price) { - price = tierPrice[i].price; + selectionPrice: function(optionId, selectionId) { + var qty = null, + config = this.options.bundleConfig, + configOption = config.options[optionId]; + if (configOption.selections[selectionId].customQty === 1 && !configOption.isMulti) { + if ($(this.options.bundleOptionQtyPrefix + optionId + this.options.bundleOptionQtySuffix)) { + qty = $(this.options.bundleOptionQtyPrefix + optionId + this.options.bundleOptionQtySuffix).val(); + } else { + qty = 1; } - } - } else { - selection = this.config.options[optionId].selections[selectionId]; - if (selection.priceType == '0') { - price = selection.priceValue; } else { - price = (this.config.basePrice*selection.priceValue)/100; + qty = configOption.selections[selectionId].qty; } - } - //price += this.config.options[optionId].selections[selectionId].plusDisposition; - //price -= this.config.options[optionId].selections[selectionId].minusDisposition; - //return price*qty; - var disposition = this.config.options[optionId].selections[selectionId].plusDisposition + - this.config.options[optionId].selections[selectionId].minusDisposition; - if (this.config.specialPrice) { - newPrice = (price*this.config.specialPrice)/100; - newPrice = (Math.round(newPrice*100)/100).toString(); - price = Math.min(newPrice, price); - } - - selection = this.config.options[optionId].selections[selectionId]; - if (selection.priceInclTax !== undefined) { - priceInclTax = selection.priceInclTax; - price = selection.priceExclTax !== undefined ? selection.priceExclTax : selection.price; - } else { - priceInclTax = price; - } + var price, tierPrice, + selection = configOption.selections[selectionId]; + if (config.priceType === '0') { + price = configOption.selections[selectionId].price; + tierPrice = configOption.selections[selectionId].tierPrice; + $.each(tierPrice, function(k, e) { + if (e.price_qty <= qty && e.price <= price) { + price = e.price; + } + }); + } else { + if (selection.priceType === '0') { + price = selection.priceValue; + } else { + price = (config.basePrice * selection.priceValue) / 100; + } + } - var result = new Array(price*qty, disposition*qty, priceInclTax*qty); - return result; - }, + var disposition = configOption.selections[selectionId].plusDisposition + + configOption.selections[selectionId].minusDisposition; + if (config.specialPrice) { + price = Math.min((Math.round(price * config.specialPrice) / 100), price); + } - populateQty: function(optionId, selectionId){ - if (selectionId == '' || selectionId == 'none') { - this.showQtyInput(optionId, '0', false); - return; - } - if (this.config.options[optionId].selections[selectionId].customQty == 1) { - this.showQtyInput(optionId, this.config.options[optionId].selections[selectionId].qty, true); - } else { - this.showQtyInput(optionId, this.config.options[optionId].selections[selectionId].qty, false); - } - }, + var priceInclTax; + if (selection.priceInclTax !== undefined) { + priceInclTax = selection.priceInclTax; + price = selection.priceExclTax !== undefined ? selection.priceExclTax : selection.price; + } else { + priceInclTax = price; + } - showQtyInput: function(optionId, value, canEdit) { - elem = $('bundle-option-' + optionId + '-qty-input'); - elem.value = value; - elem.disabled = !canEdit; - if (canEdit) { - elem.removeClassName('qty-disabled'); - } else { - elem.addClassName('qty-disabled'); - } - }, + return [price * qty, disposition * qty, priceInclTax * qty]; + }, - changeOptionQty: function (element, event) { - var checkQty = true; - if (typeof(event) != 'undefined') { - if (event.keyCode == 8 || event.keyCode == 46) { - checkQty = false; + populateQty: function(optionId, selectionId) { + if (selectionId === '' || selectionId === 'none' || selectionId === undefined) { + this.showQtyInput(optionId, '0', false); + } else if (this.options.optionConfig.options[optionId].selections[selectionId].customQty === 1) { + this.showQtyInput(optionId, this.options.optionConfig.options[optionId].selections[selectionId].qty, true); + } else { + this.showQtyInput(optionId, this.options.optionConfig.options[optionId].selections[selectionId].qty, false); } - } - if (checkQty && (Number(element.value) == 0 || isNaN(Number(element.value)))) { - element.value = 1; - } - parts = element.id.split('-'); - optionId = parts[2]; - if (!this.config['options'][optionId].isMulti) { - selectionId = this.config.selected[optionId][0]; - this.config.options[optionId].selections[selectionId].qty = element.value*1; - this.reloadPrice(); - } - }, + }, - validationCallback: function (elmId, result){ - if (elmId == undefined || $(elmId) == undefined) { - return; - } - var container = $(elmId).up('ul.options-list'); - if (typeof container != 'undefined') { - if (result == 'failed') { - container.removeClassName('validation-passed'); - container.addClassName('validation-failed'); + showQtyInput: function(optionId, value, canEdit) { + var element = $('#bundle-option-' + optionId + '-qty-input'); + element.val(value).attr('disabled', !canEdit); + if (canEdit) { + element.removeClass('qty-disabled'); } else { - container.removeClassName('validation-failed'); - container.addClassName('validation-passed'); + element.addClass('qty-disabled'); } } - } -} + }); +})(jQuery); diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle.phtml index 115b5dacd38b5a6401875ecdb2b706114fc9cf97..e3730fdf9959542f8cb015d1bfc20a7d1c42f37e 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle.phtml @@ -29,9 +29,21 @@ <?php if($_product->isSaleable()): ?> <script type="text/javascript"> -//<![CDATA[ - var bundle = new Product.Bundle(<?php echo $this->getJsonConfig() ?>); -//]]> + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Bundle::/bundle.js') ?>", function() { + $('#product_addtocart_form').bundleOption({ + "bundleConfig": <?php echo $this->getJsonConfig() ?>, + "bundleOptionQtyPrefix": "#bundle-option-", + "bundleOptionQtySuffix": "-qty-input", + "priceSelectors": { + "product-price": "#product-price-<?php echo $_product->getId()?>", + "bundle-price": "#bundle-price-<?php echo $_product->getId()?>", + "price-including-tax": "#price-including-tax-<?php echo $_product->getId()?>", + "price-excluding-tax": "#price-excluding-tax-<?php echo $_product->getId()?>" + } + }); + }); + })(jQuery); </script> <?php endif; ?> <?php if ($this->displayProductStockStatus()): ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml index 3e1825691244348a196f35424ca16d2ed87483fa..15a25d8ec2ac18c6f8814a9fb93cd232c18e3e2f 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml @@ -38,7 +38,7 @@ <?php else:?> <ul class="options-list"> <?php foreach($_selections as $_selection): ?> - <li><input onclick="bundle.changeSelection(this)" class="change-container-classname checkbox bundle-option-<?php echo $_option->getId() ?> <?php if ($_option->getRequired()) echo 'validate-one-required-by-name' ?>" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" type="checkbox" name="bundle_option[<?php echo $_option->getId() ?>][]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?> value="<?php echo $_selection->getSelectionId() ?>"/> + <li><input class="change-container-classname checkbox bundle-option-<?php echo $_option->getId() ?> product-bundle-option" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" type="checkbox" <?php if ($_option->getRequired()) echo 'data-validate = {"validate-one-required-by-name":true}'?> name="bundle_option[<?php echo $_option->getId() ?>][]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?> value="<?php echo $_selection->getSelectionId() ?>"/> <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionQtyTitlePrice($_selection) ?></label></span> <?php if($_option->getRequired()): ?> <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml index a99cd790d1e5eb1c0bf876d64f983e930a9abbc6..da4ceecf84bf4f271a3826c467feca9b4bf5f356 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml @@ -36,7 +36,7 @@ <?php echo $this->getSelectionQtyTitlePrice($_selections[0]) ?> <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/> <?php else: ?> - <select onchange="bundle.changeSelection(this)" multiple="multiple" size="5" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>][]" class="bundle-option-<?php echo $_option->getId() ?><?php if ($_option->getRequired()) echo ' required-entry' ?> bundle-option-select multiselect change-container-classname"> + <select multiple="multiple" size="5" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>][]" class="bundle-option-<?php echo $_option->getId() ?> multiselect change-container-classname product-bundle-option" <?php if ($_option->getRequired()) echo 'data-validate={required:true}' ?>> <?php if(!$_option->getRequired()): ?> <option value=""><?php echo $this->__('None') ?></option> <?php endif; ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml index 05bd0042c942565f2a8dd13f8a1db7b7386ac3c7..52a97a731b4ce6612580c23f9254606cba207c8b 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml @@ -43,12 +43,12 @@ <?php else:?> <ul class="options-list"> <?php if (!$_option->getRequired()): ?> - <li><input type="radio" onclick="bundle.changeSelection(this)" class="radio" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php echo ($_default && $_default->isSalable())?'':' checked="checked" ' ?> value=""/> + <li><input type="radio" class="radio product-bundle-option" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php echo ($_default && $_default->isSalable())?'':' checked="checked" ' ?> value=""/> <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>"><?php echo $this->__('None') ?></label></span> </li> <?php endif; ?> <?php foreach ($_selections as $_selection): ?> - <li><input type="radio" onclick="bundle.changeSelection(this)" class="radio<?php echo $_option->getRequired()?' validate-one-required-by-name':'' ?> change-container-classname" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>value="<?php echo $_selection->getSelectionId() ?>"/> + <li><input type="radio" class="radio change-container-classname product-bundle-option" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" <?php if ($_option->getRequired()) echo 'data-validate = {"validate-one-required-by-name":true}'?> name="bundle_option[<?php echo $_option->getId() ?>]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>value="<?php echo $_selection->getSelectionId() ?>"/> <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionTitlePrice($_selection) ?></label></span> <?php if ($_option->getRequired()): ?> <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?> @@ -60,6 +60,6 @@ <?php endif; ?> </div> <span class="qty-holder"> - <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?> </label><input onkeyup="bundle.changeOptionQty(this, event)" onblur="bundle.changeOptionQty(this, event)" <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/> + <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?> </label><input <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/> </span> </dd> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml index fd64b4a5295288fd7c157d387f74a5a2d7194f16..2de84a16958120eae86c5f1d5941b25df57873db 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml @@ -41,7 +41,7 @@ <?php echo $this->getSelectionTitlePrice($_selections[0]) ?> <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/> <?php else:?> - <select onchange="bundle.changeSelection(this)" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]" class="bundle-option-<?php echo $_option->getId() ?><?php if ($_option->getRequired()) echo ' required-entry' ?> bundle-option-select change-container-classname"> + <select id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]" class="bundle-option-<?php echo $_option->getId() ?> bundle-option-select product-bundle-option change-container-classname" <?php if ($_option->getRequired()) echo 'data-validate = {required:true}' ?>> <option value=""><?php echo $this->__('Choose a selection...') ?></option> <?php foreach ($_selections as $_selection): ?> <option value="<?php echo $_selection->getSelectionId() ?>"<?php if ($this->_isSelected($_selection)) echo ' selected="selected"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>><?php echo $this->getSelectionTitlePrice($_selection, false) ?></option> @@ -50,6 +50,6 @@ <?php endif; ?> </div> <span class="qty-holder"> - <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?> </label><input onkeyup="bundle.changeOptionQty(this, event)" onblur="bundle.changeOptionQty(this, event)" <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/> + <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?> </label><input <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/> </span> </dd> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml index 3d4a7105b98978eac036e0633f7a1de5d054d784..fc2a849d7c6094d4a5537361fcb1cae7a18d13ba 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml @@ -29,6 +29,13 @@ <?php $_options = Mage::helper('Mage_Core_Helper_Data')->decorateArray($this->getOptions()); ?> <?php if ($_product->isSaleable()):?> <?php if (count($_options)): ?> + <script type="text/javascript"> + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Bundle::bundle.js') ?>", function () { + $('#product_addtocart_form').bundleOption({'optionConfig':<?php echo $this->getJsonConfig()?>}).trigger('changeSelection'); + }); + })(jQuery); + </script> <dl> <?php foreach ($_options as $_option): ?> <?php if (!$_option->getSelections()): ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/js/float.js b/app/code/core/Mage/Bundle/view/frontend/js/float.js new file mode 100644 index 0000000000000000000000000000000000000000..3e3d7c7888f2e0e16a3fb1f3c9bc66c0626fe32a --- /dev/null +++ b/app/code/core/Mage/Bundle/view/frontend/js/float.js @@ -0,0 +1,71 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category frontend bundle product float + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true expr:true*/ +(function($, window) { + $.widget('mage.float', { + options: { + productOptionsSelector: '#product-options-wrapper' + }, + + /** + * Bind handlers to scroll event + * @private + */ + _create: function() { + $(window).on('scroll', $.proxy(this._setTop, this)); + }, + + /** + * float bundleSummary on windowScroll + * @private + */ + _setTop: function() { + if ((this.element).is(':visible')) { + var starTop = $(this.options.productOptionsSelector).offset().top, + offset = $(document).scrollTop(), + maxTop = this.element.parent().offset().top; + if (!this.options.top) { + this.options.top = this.element.position().top; + this.element.css('top', this.options.top); + } + + if (starTop > offset) { + return false; + } + + if (offset < this.options.top) { + offset = this.options.top; + } + + var allowedTop = this.options.top + offset - starTop; + + if (allowedTop < maxTop) { + this.element.css('top', allowedTop); + } + } + } + }); +})(jQuery, window); + diff --git a/app/code/core/Mage/Bundle/view/frontend/js/slide.js b/app/code/core/Mage/Bundle/view/frontend/js/slide.js new file mode 100644 index 0000000000000000000000000000000000000000..b451fce49cb2860ab1e7eb93cb32c6301543c7a6 --- /dev/null +++ b/app/code/core/Mage/Bundle/view/frontend/js/slide.js @@ -0,0 +1,80 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category frontend bundle product slide + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true expr:true*/ +(function($) { + $.widget('mage.slide', { + options: { + slideSpeed: 1500, + slideSelector: '#bundle-slide', + slideBackSelector: '.bundle-slide-back', + bundleProductSelector: '#bundleProduct', + bundleOptionsContainer: '#options-container', + productViewContainer: '#productView' + + }, + + _create: function() { + $(this.options.slideSelector).on('click', $.proxy(this._slide, this)); + $(this.options.slideBackSelector).on('click', $.proxy(this._slideBack, this)); + this.options.autostart && this._slide(); + }, + + /** + * slide bundleOptionsContainer over to the main view area + * @private + */ + _slide: function() { + $(this.options.bundleProductSelector).css('top', '0px'); + $(this.options.bundleOptionsContainer).show(); + this.element.css('height',$(this.options.productViewContainer).height() + 'px'); + $(this.options.bundleProductSelector).css('left', '0px').animate( + {'left': '-' + this.element.width() + 'px'}, + this.options.slideSpeed, + $.proxy(function() { + this.element.css('height','auto'); + $(this.options.productViewContainer).hide(); + }, this) + ); + }, + + /** + * slideback productViewContainer to main view area + * @private + */ + _slideBack: function() { + $(this.options.bundleProductSelector).css('top', '0px'); + $(this.options.productViewContainer).show(); + this.element.css('height', $(this.options.bundleOptionsContainer).height() + 'px'); + $(this.options.bundleProductSelector).animate( + {'left': '0px'}, + this.options.slideSpeed, + $.proxy(function() { + $(this.options.bundleOptionsContainer).hide(); + this.element.css('height','auto'); + }, this) + ); + } + }); +}(jQuery)); \ No newline at end of file diff --git a/app/code/core/Mage/Captcha/Helper/Data.php b/app/code/core/Mage/Captcha/Helper/Data.php index 4d310198bc35ea8b2e14d733224009f783f02cee..be91d72983cf9a817c1c35cc99e34728d9ba0adf 100755 --- a/app/code/core/Mage/Captcha/Helper/Data.php +++ b/app/code/core/Mage/Captcha/Helper/Data.php @@ -53,6 +53,11 @@ class Mage_Captcha_Helper_Data extends Mage_Core_Helper_Abstract */ const XML_PATH_CAPTCHA_FONTS = 'default/captcha/fonts'; + /** + * Default captcha type + */ + const DEFAULT_CAPTCHA_TYPE = 'Zend'; + /** * List uses Models of Captcha * @var array @@ -64,111 +69,34 @@ class Mage_Captcha_Helper_Data extends Mage_Core_Helper_Abstract */ protected $_option; - /** - * @var Mage_Core_Model_Store - */ - protected $_store; - /** * @var Mage_Core_Model_Config */ protected $_config; /** - * @var Mage_Core_Model_Website + * @var Magento_Filesystem */ - protected $_website; + protected $_filesystem; /** - * Get Config - * @return Mage_Core_Model_Config + * @var Mage_Core_Model_App */ - public function getConfig() - { - if (empty($this->_config)) { - $this->_config = Mage::getConfig(); - } - return $this->_config; - } + protected $_app; /** - * Set config - * + * @param Mage_Core_Model_App $app * @param Mage_Core_Model_Config $config - */ - public function setConfig($config) - { + * @param Magento_Filesystem $filesystem + */ + public function __construct( + Mage_Core_Model_App $app, + Mage_Core_Model_Config $config, + Magento_Filesystem $filesystem + ) { + $this->_app = $app; $this->_config = $config; - } - - /** - * Set store - * - * @param Mage_Core_Model_Store $store - */ - public function setStore($store) - { - $this->_store = $store; - } - - /** - * Get store - * - * @param null|string|bool|int|Mage_Core_Model_Store $storeName - * @return Mage_Core_Model_Store - * @throws Mage_Core_Model_Store_Exception - */ - public function getStore($storeName = null) - { - if (empty($this->_store)) { - $this->_store = Mage::app()->getStore($storeName); - } - return $this->_store; - } - - /** - * Set option - * - * @param Mage_Core_Model_Config_Options $option - */ - public function setOption($option) - { - $this->_option = $option; - } - - /** - * Get option - * - * @return Mage_Core_Model_Config_Options - */ - public function getOption() - { - if (empty($this->_option)) { - $this->_option = $this->getConfig()->getOptions(); - } - return $this->_option; - } - - /** - * Set website - * @param Mage_Core_Model_Website $website - */ - public function setWebsite($website) - { - $this->_website = $website; - } - - /** - * Get website - * @param string $websiteCode - * @return Mage_Core_Model_Website - */ - public function getWebsite($websiteCode) - { - if (empty($this->_website)) { - $this->_website = Mage::app()->getWebsite($websiteCode); - } - return $this->_website; + $this->_filesystem = $filesystem; } /** @@ -181,7 +109,10 @@ class Mage_Captcha_Helper_Data extends Mage_Core_Helper_Abstract { if (!array_key_exists($formId, $this->_captcha)) { $type = ucfirst($this->getConfigNode('type')); - $this->_captcha[$formId] = $this->getConfig()->getModelInstance( + if (!$type) { + $type = self::DEFAULT_CAPTCHA_TYPE; + } + $this->_captcha[$formId] = $this->_config->getModelInstance( 'Mage_Captcha_Model_' . $type, array( 'params' => array('formId' => $formId, 'helper' => $this) @@ -200,14 +131,14 @@ class Mage_Captcha_Helper_Data extends Mage_Core_Helper_Abstract */ public function getConfigNode($id, $store = null) { - $areaCode = $this->getStore($store)->isAdmin() ? 'admin' : 'customer'; - return $this->getStore($store)->getConfig( $areaCode . '/captcha/' . $id, $store); + $store = $this->_app->getStore($store); + $areaCode = $store->isAdmin() ? 'admin' : 'customer'; + return $store->getConfig($areaCode . '/captcha/' . $id, $store); } - - /** - * Get list of available fonts + * Get list of available fonts. + * * Return format: * [['arial'] => ['label' => 'Arial', 'path' => '/www/magento/fonts/arial.ttf']] * @@ -215,14 +146,14 @@ class Mage_Captcha_Helper_Data extends Mage_Core_Helper_Abstract */ public function getFonts() { - $node = $this->getConfig()->getNode(Mage_Captcha_Helper_Data::XML_PATH_CAPTCHA_FONTS); + $node = $this->_config->getNode(Mage_Captcha_Helper_Data::XML_PATH_CAPTCHA_FONTS); $fonts = array(); if ($node) { foreach ($node->children() as $fontName => $fontNode) { - $fonts[$fontName] = array( - 'label' => (string)$fontNode->label, - 'path' => $this->getOption()->getDir('base') . DIRECTORY_SEPARATOR . $fontNode->path - ); + $fonts[$fontName] = array( + 'label' => (string)$fontNode->label, + 'path' => $this->_config->getOptions()->getDir('base') . DIRECTORY_SEPARATOR . $fontNode->path + ); } } return $fonts; @@ -236,11 +167,13 @@ class Mage_Captcha_Helper_Data extends Mage_Core_Helper_Abstract */ public function getImgDir($website = null) { - $captchaDir = $this->getOption()->getDir('media') . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR - . $this->getWebsite($website)->getCode() . DIRECTORY_SEPARATOR; - $io = new Varien_Io_File(); - $io->checkAndCreateFolder($captchaDir, 0755); - return $captchaDir; + $mediaDir = $this->_config->getOptions()->getDir('media'); + $captchaDir = Magento_Filesystem::getPathFromArray(array($mediaDir, 'captcha', + $this->_app->getWebsite($website)->getCode())); + $this->_filesystem->setWorkingDirectory($mediaDir); + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->ensureDirectoryExists($captchaDir, 0755); + return $captchaDir . Magento_Filesystem::DIRECTORY_SEPARATOR; } /** @@ -251,6 +184,7 @@ class Mage_Captcha_Helper_Data extends Mage_Core_Helper_Abstract */ public function getImgUrl($website = null) { - return $this->getStore()->getBaseUrl('media') . 'captcha' . '/' . $this->getWebsite($website)->getCode() . '/'; + return $this->_app->getStore()->getBaseUrl('media') . 'captcha' + . '/' . $this->_app->getWebsite($website)->getCode() . '/'; } } diff --git a/app/code/core/Mage/Captcha/Model/Observer.php b/app/code/core/Mage/Captcha/Model/Observer.php index 0db11b8a1dae094093888d6a93bbaeb116268f0a..1a43b793ed66423132bb621167a97b97fc8e2455 100755 --- a/app/code/core/Mage/Captcha/Model/Observer.php +++ b/app/code/core/Mage/Captcha/Model/Observer.php @@ -33,6 +33,19 @@ */ class Mage_Captcha_Model_Observer { + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + } + /** * Check Captcha On Forgot Password Page * @@ -252,14 +265,15 @@ class Mage_Captcha_Model_Observer */ public function deleteExpiredImages() { - foreach (Mage::app()->getWebsites(true) as $website){ - $expire = time() - Mage::helper('Mage_Captcha_Helper_Data')->getConfigNode('timeout', $website->getDefaultStore())*60; + foreach (Mage::app()->getWebsites(true) as $website) { + $expire = time() - Mage::helper('Mage_Captcha_Helper_Data') + ->getConfigNode('timeout', $website->getDefaultStore()) * 60; $imageDirectory = Mage::helper('Mage_Captcha_Helper_Data')->getImgDir($website); - foreach (new DirectoryIterator($imageDirectory) as $file) { - if ($file->isFile() && pathinfo($file->getFilename(), PATHINFO_EXTENSION) == 'png') { - if ($file->getMTime() < $expire) { - unlink($file->getPathname()); - } + foreach ($this->_filesystem->getNestedKeys($imageDirectory) as $filePath) { + if ($this->_filesystem->isFile($filePath) + && pathinfo($filePath, PATHINFO_EXTENSION) == 'png' + && $this->_filesystem->getMTime($filePath) < $expire) { + $this->_filesystem->delete($filePath); } } } diff --git a/app/code/core/Mage/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php b/app/code/core/Mage/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php index d1c6e04fd95526addd28fa60ff6f6d57b7ba3b50..07562d12b8d198f6fd8106c908d69dd82dbecb21 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php +++ b/app/code/core/Mage/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php @@ -62,6 +62,7 @@ class Mage_Catalog_Block_Product_Configurable_AssociatedSelector_Backend_Grid_Co * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Backend_Model_Widget_Grid_Row_UrlGeneratorFactory $generatorFactory * @param Mage_Core_Model_Registry $registryManager, * @param Mage_Catalog_Model_Product_Type_Configurable $productType @@ -83,6 +84,7 @@ class Mage_Catalog_Block_Product_Configurable_AssociatedSelector_Backend_Grid_Co Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Backend_Model_Widget_Grid_Row_UrlGeneratorFactory $generatorFactory, Mage_Core_Model_Registry $registryManager, Mage_Backend_Model_Widget_Grid_SubTotals $subtotals, @@ -91,8 +93,8 @@ class Mage_Catalog_Block_Product_Configurable_AssociatedSelector_Backend_Grid_Co array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $helperFactory->get('Mage_Backend_Helper_Data'), - $generatorFactory, $subtotals, $totals, $data); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, + $helperFactory->get('Mage_Backend_Helper_Data'), $generatorFactory, $subtotals, $totals, $data); $this->_registryManager = $registryManager; $this->_productType = $productType; @@ -119,8 +121,8 @@ class Mage_Catalog_Block_Product_Configurable_AssociatedSelector_Backend_Grid_Co $product = $this->_getProduct(); $attributes = $this->_productType->getUsedProductAttributes($product); - /** @var $attribute Mage_Catalog_Model_Entity_Attribute */ foreach ($attributes as $attribute) { + /** @var $attribute Mage_Catalog_Model_Entity_Attribute */ /** @var $block Mage_Backend_Block_Widget_Grid_Column */ $block = $this->addChild( $attribute->getAttributeCode(), diff --git a/app/code/core/Mage/Catalog/Block/Product/Configurable/AttributeSelector.php b/app/code/core/Mage/Catalog/Block/Product/Configurable/AttributeSelector.php new file mode 100644 index 0000000000000000000000000000000000000000..64a19f28e944fbd6496ea128bd6c1e7361f3eb89 --- /dev/null +++ b/app/code/core/Mage/Catalog/Block/Product/Configurable/AttributeSelector.php @@ -0,0 +1,92 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Catalog + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Select attributes suitable for product variations generation + * + * @category Mage + * @package Mage_Catalog + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Catalog_Block_Product_Configurable_AttributeSelector extends Mage_Backend_Block_Template +{ + /** + * Retrieve list of attributes with admin store label containing $labelPart + * + * @param string $labelPart + * @return Mage_Catalog_Model_Resource_Product_Attribute_Collection + */ + public function getSuggestedAttributes($labelPart) + { + $escapedLabelPart = Mage::getResourceHelper('Mage_Core')->addLikeEscape($labelPart, array('position' => 'any')); + /** @var $collection Mage_Catalog_Model_Resource_Product_Attribute_Collection */ + $collection = Mage::getResourceModel('Mage_Catalog_Model_Resource_Product_Attribute_Collection') + ->addFieldToFilter('frontend_input', 'select') + ->addFieldToFilter('frontend_label', array('like' => $escapedLabelPart)) + ->addFieldToFilter('is_configurable', 1) + ->addFieldToFilter('is_user_defined', 1) + ->addFieldToFilter('is_global', Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL); + + $result = array(); + $types = array( + Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, + Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL, + Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE, + ); + foreach ($collection->getItems() as $id => $attribute) { + /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + if (!$attribute->getApplyTo() || count(array_diff($types, $attribute->getApplyTo())) === 0) { + $result[$id] = array( + 'id' => $attribute->getId(), + 'label' => $attribute->getFrontendLabel(), + 'code' => $attribute->getAttributeCode(), + 'options' => $attribute->getSource()->getAllOptions(false) + ); + } + } + return $result; + } + + /** + * Configurable attribute suggestion action URL + * + * @return string + */ + public function getSuggestUrl() + { + return $this->getUrl('*/catalog_product_attribute/suggestConfigurableAttributes'); + } + + /** + * Attribute set creation action URL + * + * @return string + */ + public function getAttributeSetCreationUrl() + { + return $this->getUrl('*/catalog_product_set/save'); + } +} diff --git a/app/code/core/Mage/Catalog/Block/Product/Gallery.php b/app/code/core/Mage/Catalog/Block/Product/Gallery.php index c55d24fc164a4430c1b23efdfc3b471f545dbc27..7945e82d87dfe3469e5d0f661cb25e46989e1b5b 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Gallery.php +++ b/app/code/core/Mage/Catalog/Block/Product/Gallery.php @@ -40,6 +40,7 @@ class Mage_Catalog_Block_Product_Gallery extends Mage_Core_Block_Template } return parent::_prepareLayout(); } + public function getProduct() { return Mage::registry('product'); @@ -82,7 +83,7 @@ class Mage_Catalog_Block_Product_Gallery extends Mage_Core_Block_Template public function getImageWidth() { $file = $this->getCurrentImage()->getPath(); - if (file_exists($file)) { + if ($this->_filesystem->isFile($file)) { $size = getimagesize($file); if (isset($size[0])) { if ($size[0] > 600) { diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php index abc951270cff6ba2a4672d46fa8411b762aec24d..e119aee19a1bf198a558cc5632b26403f76d54e4 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php @@ -185,6 +185,8 @@ class Mage_Catalog_Block_Product_View_Options_Type_Date extends Mage_Catalog_Blo { $option = $this->getOption(); + $this->setSkipJsReloadPrice(1); + // $require = $this->getOption()->getIsRequire() ? ' required-entry' : ''; $require = ''; $select = $this->getLayout()->createBlock('Mage_Core_Block_Html_Select') diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php b/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php index 3848b5ab96ae27ea53b4365719d904a4d04af990..d7fc02edaf4e80f1441388a558b62cb807e92035 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php @@ -141,6 +141,7 @@ class Mage_Catalog_Block_Product_View_Type_Configurable extends Mage_Catalog_Blo foreach ($this->getAllowProducts() as $product) { $productId = $product->getId(); + $image = $this->helper('Mage_Catalog_Helper_Image')->init($product, 'image'); foreach ($this->getAllowAttributes() as $attribute) { $productAttribute = $attribute->getProductAttribute(); @@ -154,6 +155,9 @@ class Mage_Catalog_Block_Product_View_Type_Configurable extends Mage_Catalog_Blo $options[$productAttributeId][$attributeValue] = array(); } $options[$productAttributeId][$attributeValue][] = $productId; + !$product->getImage() || $product->getImage() === 'no_selection' + ? $options['images'][$productAttributeId][$attributeValue][$productId] = null + : $options['images'][$productAttributeId][$attributeValue][$productId] = (string)$image; } } @@ -254,7 +258,8 @@ class Mage_Catalog_Block_Product_View_Type_Configurable extends Mage_Catalog_Blo 'oldPrice' => $this->_registerJsPrice($this->_convertPrice($currentProduct->getPrice())), 'productId' => $currentProduct->getId(), 'chooseText' => Mage::helper('Mage_Catalog_Helper_Data')->__('Choose an Option...'), - 'taxConfig' => $taxConfig + 'taxConfig' => $taxConfig, + 'images' => $options['images'], ); if ($preconfiguredFlag && !empty($defaultValues)) { @@ -269,7 +274,7 @@ class Mage_Catalog_Block_Product_View_Type_Configurable extends Mage_Catalog_Blo /** * Validating of super product option value * - * @param array $attributeId + * @param int $attributeId * @param array $value * @param array $options * @return boolean diff --git a/app/code/core/Mage/Catalog/Helper/Product/Options.php b/app/code/core/Mage/Catalog/Helper/Product/Options.php index 7683e469520490d1cc2fd842e762b58f2b11cd59..43a41376db25ab5aaa8a12a788a62cc8b5083433 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Options.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Options.php @@ -34,6 +34,19 @@ */ class Mage_Catalog_Helper_Product_Options extends Mage_Core_Helper_Abstract { + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + } + /** * Fetches and outputs file to user browser * $info is array with following indexes: @@ -59,7 +72,7 @@ class Mage_Catalog_Helper_Product_Options extends Mage_Core_Helper_Abstract ->clearBody(); $response->sendHeaders(); - readfile($filePath); + echo $this->_filesystem->read($filePath); } catch (Exception $e) { return false; } diff --git a/app/code/core/Mage/Catalog/Model/Observer.php b/app/code/core/Mage/Catalog/Model/Observer.php index 7c957edc557968b93592e84c1929d7dfe91d90b5..81f7b86d4d109ad0589502646dce5d079fb130d2 100644 --- a/app/code/core/Mage/Catalog/Model/Observer.php +++ b/app/code/core/Mage/Catalog/Model/Observer.php @@ -286,13 +286,21 @@ class Mage_Catalog_Model_Observer public function transitionProductType(Varien_Event_Observer $observer) { $product = $observer->getProduct(); - $isTransitionalType = $product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_SIMPLE - || $product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL; - if ($isTransitionalType) { - $product->setTypeId($product->hasIsVirtual() - ? Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL - : Mage_Catalog_Model_Product_Type::TYPE_SIMPLE - ); + $attributes = $observer->getRequest()->getParam('attributes'); + if (!empty($attributes)) { + $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE); + } elseif ($product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) { + $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL); + $product->setTypeInstance(null); + } else { + $isTransitionalType = $product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_SIMPLE + || $product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL; + if ($isTransitionalType) { + $product->setTypeId($product->hasIsVirtual() + ? Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL + : Mage_Catalog_Model_Product_Type::TYPE_SIMPLE + ); + } } } } diff --git a/app/code/core/Mage/Catalog/Model/Product.php b/app/code/core/Mage/Catalog/Model/Product.php index 457f930e6a47dec016664b44dd5029a277c9d089..a8dfb67ebe7a1394b63ba4c5c8c4fad337474bc3 100644 --- a/app/code/core/Mage/Catalog/Model/Product.php +++ b/app/code/core/Mage/Catalog/Model/Product.php @@ -32,9 +32,11 @@ * @method Mage_Catalog_Model_Product setHasError(bool $value) * @method null|bool getHasError() * @method Mage_Catalog_Model_Product setTypeId(string $typeId) - * @method string getTypeId() + * @method string Mage_Catalog_Model_Product getTypeId() * @method Mage_Catalog_Model_Product setAssociatedProductIds(array $productIds) * @method array getAssociatedProductIds() + * @method Mage_Catalog_Model_Product setNewVariationsAttributeSetId(int $value) + * @method int getNewVariationsAttributeSetId() * * @category Mage * @package Mage_Catalog @@ -178,19 +180,14 @@ class Mage_Catalog_Model_Product extends Mage_Catalog_Model_Abstract * * @todo implement full validation process with errors returning which are ignoring now * - * @return Mage_Catalog_Model_Product + * @return array */ public function validate() { -// $this->getAttributes(); -// Mage::dispatchEvent($this->_eventPrefix.'_validate_before', array($this->_eventObject=>$this)); -// $result = $this->_getResource()->validate($this); -// Mage::dispatchEvent($this->_eventPrefix.'_validate_after', array($this->_eventObject=>$this)); -// return $result; Mage::dispatchEvent($this->_eventPrefix.'_validate_before', array($this->_eventObject=>$this)); - $this->_getResource()->validate($this); + $result = $this->_getResource()->validate($this); Mage::dispatchEvent($this->_eventPrefix.'_validate_after', array($this->_eventObject=>$this)); - return $this; + return $result; } /** @@ -1966,4 +1963,15 @@ class Mage_Catalog_Model_Product extends Mage_Catalog_Model_Abstract { return $this->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED; } + + /** + * Sets product image from it's child if possible + * + * @return string + */ + public function getImage() + { + $this->getTypeInstance()->setImageFromChildProduct($this); + return parent::getImage(); + } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php index e341f4b47167d867c851cc155b9c9805fd830679..e4c946c177983e1502bc308258c894f57a38d166 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php @@ -42,22 +42,46 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ */ protected $_resourceModel; + /** + * @var Magento_Filesystem $filesystem + */ + protected $_filesystem; + + /** + * @var string + */ + protected $_baseMediaPath; + + /** + * @var string + */ + protected $_baseTmpMediaPath; + /** * Constructor to inject dependencies * - * @var array $data + * @param Magento_Filesystem $filesystem + * @param array $data */ - public function __construct($data = array()) + public function __construct(Magento_Filesystem $filesystem, $data = array()) { if (isset($data['resourceModel'])) { $this->_resourceModel = $data['resourceModel']; } + $this->_filesystem = $filesystem; + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->setWorkingDirectory(Mage::getBaseDir('media')); + $this->_baseMediaPath = $this->_getConfig()->getBaseMediaPath(); + $this->_baseTmpMediaPath = $this->_getConfig()->getBaseTmpMediaPath(); + $this->_filesystem->ensureDirectoryExists($this->_baseMediaPath); + $this->_filesystem->ensureDirectoryExists($this->_baseTmpMediaPath); } /** * Load attribute data after product loaded * * @param Mage_Catalog_Model_Product $object + * @return Mage_Eav_Model_Entity_Attribute_Backend_Abstract */ public function afterLoad($object) { @@ -77,6 +101,7 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ } $object->setData($attrCode, $value); + return $this; } protected function _getDefaultValue($key, &$image) @@ -100,7 +125,7 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ if ($this->getAttribute()->getIsRequired()) { $value = $object->getData($this->getAttribute()->getAttributeCode()); if ($this->getAttribute()->isValueEmpty($value)) { - if ( !(is_array($value) && count($value)>0) ) { + if (!(is_array($value) && count($value) > 0)) { return false; } } @@ -108,7 +133,9 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ if ($this->getAttribute()->getIsUnique()) { if (!$this->getAttribute()->getEntity()->checkAttributeUniqueValue($this->getAttribute(), $object)) { $label = $this->getAttribute()->getFrontend()->getLabel(); - Mage::throwException(Mage::helper('Mage_Eav_Helper_Data')->__('The value of attribute "%s" must be unique.', $label)); + Mage::throwException( + Mage::helper('Mage_Eav_Helper_Data')->__('The value of attribute "%s" must be unique.', $label) + ); } } @@ -123,12 +150,12 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ return; } - if(!is_array($value['images']) && strlen($value['images']) > 0) { - $value['images'] = Mage::helper('Mage_Core_Helper_Data')->jsonDecode($value['images']); + if (!is_array($value['images']) && strlen($value['images']) > 0) { + $value['images'] = Mage::helper('Mage_Core_Helper_Data')->jsonDecode($value['images']); } if (!is_array($value['images'])) { - $value['images'] = array(); + $value['images'] = array(); } @@ -138,9 +165,9 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ $existImages = array(); if ($object->getIsDuplicate()!=true) { foreach ($value['images'] as &$image) { - if(!empty($image['removed'])) { + if (!empty($image['removed'])) { $clearImages[] = $image['file']; - } else if (!isset($image['value_id'])) { + } elseif (!isset($image['value_id'])) { $newFile = $this->_moveImageFromTmp($image['file']); $image['new_file'] = $newFile; $newImages[$image['file']] = $image; @@ -238,14 +265,14 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ $toDelete = array(); $filesToValueIds = array(); foreach ($value['images'] as &$image) { - if(!empty($image['removed'])) { - if(isset($image['value_id']) && !isset($picturesInOtherStores[$image['file']])) { + if (!empty($image['removed'])) { + if (isset($image['value_id']) && !isset($picturesInOtherStores[$image['file']])) { $toDelete[] = $image['value_id']; } continue; } - if(!isset($image['value_id'])) { + if (!isset($image['value_id'])) { $data = array(); $data['entity_id'] = $object->getId(); $data['attribute_id'] = $this->getAttribute()->getId(); @@ -282,11 +309,9 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ * @return string */ public function addImage(Mage_Catalog_Model_Product $product, $file, - $mediaAttribute = null, $move = false, $exclude = true) - { - $file = realpath($file); - - if (!$file || !file_exists($file)) { + $mediaAttribute = null, $move = false, $exclude = true + ) { + if (!$this->_filesystem->isFile($file, $this->_baseTmpMediaPath)) { Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__('Image does not exist.')); } @@ -304,31 +329,26 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ $fileName = $this->_getNotDuplicatedFilename($fileName, $dispretionPath); - $ioAdapter = new Varien_Io_File(); - $ioAdapter->setAllowCreateFolders(true); - $distanationDirectory = dirname($this->_getConfig()->getTmpMediaPath($fileName)); + $destinationFile = $this->_getConfig()->getTmpMediaPath($fileName); try { - $ioAdapter->open(array( - 'path'=>$distanationDirectory - )); - /** @var $storageHelper Mage_Core_Helper_File_Storage_Database */ $storageHelper = Mage::helper('Mage_Core_Helper_File_Storage_Database'); if ($move) { - $ioAdapter->mv($file, $this->_getConfig()->getTmpMediaPath($fileName)); + $this->_filesystem->rename($file, $destinationFile, $this->_baseTmpMediaPath); //If this is used, filesystem should be configured properly $storageHelper->saveFile($this->_getConfig()->getTmpMediaShortUrl($fileName)); } else { - $ioAdapter->cp($file, $this->_getConfig()->getTmpMediaPath($fileName)); + $this->_filesystem->copy($file, $destinationFile, $this->_baseTmpMediaPath); $storageHelper->saveFile($this->_getConfig()->getTmpMediaShortUrl($fileName)); - $ioAdapter->chmod($this->_getConfig()->getTmpMediaPath($fileName), 0777); + $this->_filesystem->changePermissions($destinationFile, 0777, false, $this->_baseTmpMediaPath); } - } - catch (Exception $e) { - Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__('Failed to move file: %s', $e->getMessage())); + } catch (Exception $e) { + Mage::throwException( + Mage::helper('Mage_Catalog_Helper_Data')->__('Failed to move file: %s', $e->getMessage()) + ); } $fileName = str_replace(DS, '/', $fileName); @@ -377,8 +397,8 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ * @return array array of parallel arrays with original and renamed files */ public function addImagesWithDifferentMediaAttributes(Mage_Catalog_Model_Product $product, - $fileAndAttributesArray, $filePath = '', $move = false, $exclude = true) { - + $fileAndAttributesArray, $filePath = '', $move = false, $exclude = true + ) { $alreadyAddedFiles = array(); $alreadyAddedFilesNames = array(); @@ -405,7 +425,7 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ * Update image in gallery * * @param Mage_Catalog_Model_Product $product - * @param sting $file + * @param string $file * @param array $data * @return Mage_Catalog_Model_Product_Attribute_Backend_Media */ @@ -574,19 +594,10 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ */ protected function _moveImageFromTmp($file) { - $ioObject = new Varien_Io_File(); - $destDirectory = dirname($this->_getConfig()->getMediaPath($file)); - try { - $ioObject->open(array('path'=>$destDirectory)); - } catch (Exception $e) { - $ioObject->mkdir($destDirectory, 0777, true); - $ioObject->open(array('path'=>$destDirectory)); - } - if (strrpos($file, '.tmp') == strlen($file)-4) { $file = substr($file, 0, strlen($file)-4); } - $destFile = $this->_getUniqueFileName($file, $ioObject->dirsep()); + $destinationFile = $this->_getUniqueFileName($file); /** @var $storageHelper Mage_Core_Helper_File_Storage_Database */ $storageHelper = Mage::helper('Mage_Core_Helper_File_Storage_Database'); @@ -594,28 +605,31 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ if ($storageHelper->checkDbUsage()) { $storageHelper->renameFile( $this->_getConfig()->getTmpMediaShortUrl($file), - $this->_getConfig()->getMediaShortUrl($destFile)); + $this->_getConfig()->getMediaShortUrl($destinationFile) + ); - $ioObject->rm($this->_getConfig()->getTmpMediaPath($file)); - $ioObject->rm($this->_getConfig()->getMediaPath($destFile)); + $this->_filesystem->delete($this->_getConfig()->getTmpMediaPath($file), $this->_baseTmpMediaPath); + $this->_filesystem->delete($this->_getConfig()->getMediaPath($destinationFile), $this->_baseMediaPath); } else { - $ioObject->mv( + $this->_filesystem->rename( $this->_getConfig()->getTmpMediaPath($file), - $this->_getConfig()->getMediaPath($destFile) + $this->_getConfig()->getMediaPath($destinationFile), + $this->_baseTmpMediaPath, + $this->_baseMediaPath ); } - return str_replace($ioObject->dirsep(), '/', $destFile); + return str_replace(DS, '/', $destinationFile); } /** * Check whether file to move exists. Getting unique name * * @param <type> $file - * @param <type> $dirsep * @return string */ - protected function _getUniqueFileName($file, $dirsep) { + protected function _getUniqueFileName($file) + { if (Mage::helper('Mage_Core_Helper_File_Storage_Database')->checkDbUsage()) { $destFile = Mage::helper('Mage_Core_Helper_File_Storage_Database') ->getUniqueFilename( @@ -623,7 +637,7 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ $file ); } else { - $destFile = dirname($file) . $dirsep + $destFile = dirname($file) . DS . Mage_Core_Model_File_Uploader::getNewFileName($this->_getConfig()->getMediaPath($file)); } @@ -639,37 +653,34 @@ class Mage_Catalog_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_ protected function _copyImage($file) { try { - $ioObject = new Varien_Io_File(); - $destDirectory = dirname($this->_getConfig()->getMediaPath($file)); - $ioObject->open(array('path'=>$destDirectory)); - - $destFile = $this->_getUniqueFileName($file, $ioObject->dirsep()); + $destinationFile = $this->_getUniqueFileName($file); - if (!$ioObject->fileExists($this->_getConfig()->getMediaPath($file),true)) { + if (!$this->_filesystem->isFile($this->_getConfig()->getMediaPath($file), $this->_baseMediaPath)) { throw new Exception(); } if (Mage::helper('Mage_Core_Helper_File_Storage_Database')->checkDbUsage()) { Mage::helper('Mage_Core_Helper_File_Storage_Database') ->copyFile($this->_getConfig()->getMediaShortUrl($file), - $this->_getConfig()->getMediaShortUrl($destFile)); + $this->_getConfig()->getMediaShortUrl($destinationFile)); - $ioObject->rm($this->_getConfig()->getMediaPath($destFile)); + $this->_filesystem->delete($this->_getConfig()->getMediaPath($destinationFile), $this->_baseMediaPath); } else { - $ioObject->cp( + $this->_filesystem->copy( $this->_getConfig()->getMediaPath($file), - $this->_getConfig()->getMediaPath($destFile) + $this->_getConfig()->getMediaPath($destinationFile), + $this->_baseMediaPath ); } + return str_replace(DS, '/', $destinationFile); } catch (Exception $e) { $file = $this->_getConfig()->getMediaPath($file); Mage::throwException( - Mage::helper('Mage_Catalog_Helper_Data')->__('Failed to copy file %s. Please, delete media with non-existing images and try again.', $file) + Mage::helper('Mage_Catalog_Helper_Data') + ->__('Failed to copy file %s. Please, delete media with non-existing images and try again.', $file) ); } - - return str_replace($ioObject->dirsep(), '/', $destFile); } public function duplicate($object) diff --git a/app/code/core/Mage/Catalog/Model/Product/Image.php b/app/code/core/Mage/Catalog/Model/Product/Image.php index c595dff2271dc79cdfbcd0ed85158084ec951aa4..f70b61570e70bb42032ca63937bd77ad76e5c645 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Image.php @@ -56,6 +56,36 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract protected $_watermarkHeigth; protected $_watermarkImageOpacity = 70; + /** + * @var Magento_Filesystem $filesystem + */ + protected $_filesystem; + + /** + * @param Mage_Core_Model_Event_Manager $eventDispatcher + * @param Mage_Core_Model_Cache $cacheManager + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Model_Resource_Abstract $resource + * @param Varien_Data_Collection_Db $resourceCollection + * @param array $data + */ + public function __construct( + Mage_Core_Model_Event_Manager $eventDispatcher, + Mage_Core_Model_Cache $cacheManager, + Magento_Filesystem $filesystem, + Mage_Core_Model_Resource_Abstract $resource = null, + Varien_Data_Collection_Db $resourceCollection = null, + array $data = array() + ) { + parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data); + $baseDir = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config')->getBaseMediaPath(); + $this->_filesystem = $filesystem; + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->ensureDirectoryExists($baseDir); + $this->_filesystem->setIsAllowCreateDirectories(false); + $this->_filesystem->setWorkingDirectory($baseDir); + } + /** * @return Mage_Catalog_Model_Product_Image */ @@ -183,7 +213,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract { $memoryLimit = trim(strtoupper(ini_get('memory_limit'))); - if (!isSet($memoryLimit[0])){ + if (!isset($memoryLimit[0])) { $memoryLimit = "128M"; } @@ -214,7 +244,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract return 0; } - if (!file_exists($file) || !is_file($file)) { + if (!$this->_filesystem->isFile($file)) { return 0; } @@ -231,7 +261,9 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract // if there is no info about this parameter lets set it for maximum $imageInfo['bits'] = 8; } - return round(($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + Pow(2, 16)) * 1.65); + return round( + ($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + Pow(2, 16)) * 1.65 + ); } /** @@ -246,8 +278,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract foreach ($rgbArray as $value) { if (null === $value) { $result[] = 'null'; - } - else { + } else { $result[] = sprintf('%02s', dechex($value)); } } @@ -292,7 +323,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract $baseFile = $baseDir . $file; - if ((!$file) || (!file_exists($baseFile))) { + if (!$file || !$this->_filesystem->isFile($baseFile)) { throw new Exception(Mage::helper('Mage_Catalog_Helper_Data')->__('Image file was not found.')); } @@ -305,8 +336,9 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract Mage::app()->getStore()->getId(), $path[] = $this->getDestinationSubdir() ); - if((!empty($this->_width)) || (!empty($this->_height))) + if ((!empty($this->_width)) || (!empty($this->_height))) { $path[] = "{$this->_width}x{$this->_height}"; + } // add misk params as a hash $miscParams = array( @@ -424,8 +456,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract */ public function setWatermark($file, $position=null, $size=null, $width=null, $heigth=null, $imageOpacity=null) { - if ($this->_isBaseFilePlaceholder) - { + if ($this->_isBaseFilePlaceholder) { return $this; } @@ -435,20 +466,24 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract return $this; } - if ($position) - $this->setWatermarkPosition($position); - if ($size) + if ($position) { + $this->setWatermarkPosition($position); + } + if ($size) { $this->setWatermarkSize($size); - if ($width) + } + if ($width) { $this->setWatermarkWidth($width); - if ($heigth) + } + if ($heigth) { $this->setWatermarkHeight($heigth); - if ($imageOpacity) + } + if ($imageOpacity) { $this->setImageOpacity($imageOpacity); - + } $filePath = $this->_getWatermarkFilePath(); - if($filePath) { + if ($filePath) { $this->getImageProcessor() ->setWatermarkPosition( $this->getWatermarkPosition() ) ->setWatermarkImageOpacity( $this->getWatermarkImageOpacity() ) @@ -511,7 +546,9 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract public function isCached() { - return $this->_fileExists($this->_newFile); + if (is_string($this->_newFile)) { + return $this->_fileExists($this->_newFile); + } } /** @@ -546,24 +583,23 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract { $filePath = false; - if (!$file = $this->getWatermarkFile()) - { + if (!$file = $this->getWatermarkFile()) { return $filePath; } $baseDir = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config')->getBaseMediaPath(); - if( $this->_fileExists($baseDir . '/watermark/stores/' . Mage::app()->getStore()->getId() . $file) ) { + if ($this->_fileExists($baseDir . '/watermark/stores/' . Mage::app()->getStore()->getId() . $file)) { $filePath = $baseDir . '/watermark/stores/' . Mage::app()->getStore()->getId() . $file; - } elseif ( $this->_fileExists($baseDir . '/watermark/websites/' . Mage::app()->getWebsite()->getId() . $file) ) { + } elseif ($this->_fileExists($baseDir . '/watermark/websites/' . Mage::app()->getWebsite()->getId() . $file)) { $filePath = $baseDir . '/watermark/websites/' . Mage::app()->getWebsite()->getId() . $file; - } elseif ( $this->_fileExists($baseDir . '/watermark/default/' . $file) ) { + } elseif ($this->_fileExists($baseDir . '/watermark/default/' . $file)) { $filePath = $baseDir . '/watermark/default/' . $file; - } elseif ( $this->_fileExists($baseDir . '/watermark/' . $file) ) { + } elseif ($this->_fileExists($baseDir . '/watermark/' . $file)) { $filePath = $baseDir . '/watermark/' . $file; } else { $viewFile = Mage::getDesign()->getViewFile($file); - if (file_exists($viewFile)) { + if ($this->_filesystem->isFile($viewFile)) { $filePath = $viewFile; } } @@ -623,7 +659,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract */ public function setWatermarkSize($size) { - if( is_array($size) ) { + if (is_array($size)) { $this->setWatermarkWidth($size['width']) ->setWatermarkHeight($size['heigth']); } @@ -676,9 +712,8 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract public function clearCache() { - $directory = Mage::getBaseDir('media') . DS.'catalog'.DS.'product'.DS.'cache'.DS; - $io = new Varien_Io_File(); - $io->rmdir($directory, true); + $directory = Mage::getBaseDir('media') . DS . 'catalog' . DS . 'product' . DS.'cache' . DS; + $this->_filesystem->delete($directory); Mage::helper('Mage_Core_Helper_File_Storage_Database')->deleteFolder($directory); } @@ -690,8 +725,9 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract * @param string $filename * @return bool */ - protected function _fileExists($filename) { - if (file_exists($filename)) { + protected function _fileExists($filename) + { + if ($this->_filesystem->isFile($filename)) { return true; } else { return Mage::helper('Mage_Core_Helper_File_Storage_Database')->saveFileToFilesystem($filename); diff --git a/app/code/core/Mage/Catalog/Model/Product/Media/Config.php b/app/code/core/Mage/Catalog/Model/Product/Media/Config.php index 3d15b3e914c72b4fd279b4a14e613d4fddd5e11a..999223a5bf1485dc3d4ee10f4d6e5a48e42293fd 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Media/Config.php +++ b/app/code/core/Mage/Catalog/Model/Product/Media/Config.php @@ -42,7 +42,7 @@ class Mage_Catalog_Model_Product_Media_Config implements Mage_Media_Model_Image_ */ public function getBaseMediaPathAddition() { - return 'catalog' . DS . 'product'; + return 'catalog' . DIRECTORY_SEPARATOR . 'product'; } /** @@ -64,7 +64,7 @@ class Mage_Catalog_Model_Product_Media_Config implements Mage_Media_Model_Image_ */ public function getBaseTmpMediaPathAddition() { - return 'tmp' . DS . $this->getBaseMediaPathAddition(); + return 'tmp' . DIRECTORY_SEPARATOR . $this->getBaseMediaPathAddition(); } /** @@ -80,7 +80,7 @@ class Mage_Catalog_Model_Product_Media_Config implements Mage_Media_Model_Image_ public function getBaseMediaPath() { - return Mage::getBaseDir('media') . DS . 'catalog' . DS . 'product'; + return Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . 'catalog' . DIRECTORY_SEPARATOR . 'product'; } public function getBaseMediaUrl() @@ -90,7 +90,7 @@ class Mage_Catalog_Model_Product_Media_Config implements Mage_Media_Model_Image_ public function getBaseTmpMediaPath() { - return Mage::getBaseDir('media') . DS . $this->getBaseTmpMediaPathAddition(); + return Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . $this->getBaseTmpMediaPathAddition(); } public function getBaseTmpMediaUrl() @@ -113,11 +113,11 @@ class Mage_Catalog_Model_Product_Media_Config implements Mage_Media_Model_Image_ { $file = $this->_prepareFileForPath($file); - if(substr($file, 0, 1) == DS) { - return $this->getBaseMediaPath() . DS . substr($file, 1); + if(substr($file, 0, 1) == DIRECTORY_SEPARATOR) { + return $this->getBaseMediaPath() . DIRECTORY_SEPARATOR . substr($file, 1); } - return $this->getBaseMediaPath() . DS . $file; + return $this->getBaseMediaPath() . DIRECTORY_SEPARATOR . $file; } public function getTmpMediaUrl($file) @@ -168,20 +168,20 @@ class Mage_Catalog_Model_Product_Media_Config implements Mage_Media_Model_Image_ { $file = $this->_prepareFileForPath($file); - if(substr($file, 0, 1) == DS) { - return $this->getBaseTmpMediaPath() . DS . substr($file, 1); + if(substr($file, 0, 1) == DIRECTORY_SEPARATOR) { + return $this->getBaseTmpMediaPath() . DIRECTORY_SEPARATOR . substr($file, 1); } - return $this->getBaseTmpMediaPath() . DS . $file; + return $this->getBaseTmpMediaPath() . DIRECTORY_SEPARATOR . $file; } protected function _prepareFileForUrl($file) { - return str_replace(DS, '/', $file); + return str_replace(DIRECTORY_SEPARATOR, '/', $file); } protected function _prepareFileForPath($file) { - return str_replace('/', DS, $file); + return str_replace('/', DIRECTORY_SEPARATOR, $file); } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php index bbdd8f4fc4c725e0c805e10aa41fd6df7ddddfc4..4718ae99d8ddefb40cac0f7f005ed44a097f2cd2 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php @@ -44,6 +44,26 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro */ protected $_formattedOptionValue = null; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * Constructor + * + * By default is looking for first argument as array and assigns it as object attributes + * This behavior may change in child classes + * + * @param Magento_Filesystem $filesystem + * @param array $data + */ + public function __construct(Magento_Filesystem $filesystem, $data = array()) + { + $this->_filesystem = $filesystem; + $this->_data = $data; + } + public function isCustomizedView() { return true; @@ -180,9 +200,9 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro /** * Upload init */ - $upload = new Zend_File_Transfer_Adapter_Http(); + $upload = new Zend_File_Transfer_Adapter_Http(); $file = $processingParams->getFilesPrefix() . 'options_' . $option->getId() . '_file'; - $maxFileSize = $this->getFileStorageHelper()->getMaxFileSize(); + $maxFileSize = $this->getFileSizeService()->getMaxFileSize(); try { $runValidation = $option->getIsRequire() || $upload->isUploaded($file); if (!$runValidation) { @@ -198,7 +218,7 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro // when file exceeds the upload_max_filesize, $_FILES is empty if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > $maxFileSize) { $this->setIsValid(false); - $value = $this->getFileStorageHelper()->getMaxFileSizeInMb(); + $value = $this->getFileSizeService()->getMaxFileSizeInMb(); Mage::throwException( Mage::helper('Mage_Catalog_Helper_Data')->__("The file you uploaded is larger than %s Megabytes allowed by server", $value) ); @@ -262,7 +282,7 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro $dispersion = Mage_Core_Model_File_Uploader::getDispretionPath($fileName); $filePath = $dispersion; - $fileHash = md5(file_get_contents($fileInfo['tmp_name'])); + $fileHash = md5($this->_filesystem->read($fileInfo['tmp_name'])); $filePath .= DS . $fileHash . '.' . $extension; $fileFullPath = $this->getQuoteTargetDir() . $filePath; @@ -281,7 +301,7 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro $_width = 0; $_height = 0; - if (is_readable($fileInfo['tmp_name'])) { + if ($this->_filesystem->isReadable($fileInfo['tmp_name'])) { $_imageSize = getimagesize($fileInfo['tmp_name']); if ($_imageSize) { $_width = $_imageSize[0]; @@ -341,7 +361,7 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro $fileFullPath = null; foreach ($checkPaths as $path) { - if (!is_file($path)) { + if (!$this->_filesystem->isFile($path)) { if (!Mage::helper('Mage_Core_Helper_File_Storage_Database')->saveFileToFilesystem($fileFullPath)) { continue; } @@ -385,16 +405,16 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro } // Maximum file size - $maxFileSize = $this->getFileStorageHelper()->getMaxFileSize(); + $maxFileSize = $this->getFileSizeService()->getMaxFileSize(); $validatorChain->addValidator( new Zend_Validate_File_FilesSize(array('max' => $maxFileSize)) ); if ($validatorChain->isValid($fileFullPath)) { - $ok = is_readable($fileFullPath) + $ok = $this->_filesystem->isReadable($fileFullPath) && isset($optionValue['secret_key']) - && substr(md5(file_get_contents($fileFullPath)), 0, 20) == $optionValue['secret_key']; + && substr(md5($this->_filesystem->read($fileFullPath)), 0, 20) == $optionValue['secret_key']; return $ok; } elseif ($validatorChain->getErrors()) { @@ -429,7 +449,7 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro || $errorCode == Zend_Validate_File_ImageSize::HEIGHT_TOO_BIG) { $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("Maximum allowed image size for '%s' is %sx%s px.", $option->getTitle(), $option->getImageSizeX(), $option->getImageSizeY()); } elseif ($errorCode == Zend_Validate_File_FilesSize::TOO_BIG) { - $maxFileSize = $this->getFileStorageHelper()->getMaxFileSizeInMb(); + $maxFileSize = $this->getFileSizeService()->getMaxFileSizeInMb(); $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' you uploaded is larger than %s Megabytes allowed by server", $fileInfo['title'], $maxFileSize); } } @@ -640,14 +660,16 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro throw new Exception(); } $quoteFileFullPath = Mage::getBaseDir() . $value['quote_path']; - if (!is_file($quoteFileFullPath) || !is_readable($quoteFileFullPath)) { + if (!$this->_filesystem->isFile($quoteFileFullPath) + || !$this->_filesystem->isReadable($quoteFileFullPath) + ) { throw new Exception(); } $orderFileFullPath = Mage::getBaseDir() . $value['order_path']; $dir = pathinfo($orderFileFullPath, PATHINFO_DIRNAME); $this->_createWriteableDir($dir); Mage::helper('Mage_Core_Helper_File_Storage_Database')->copyFile($quoteFileFullPath, $orderFileFullPath); - @copy($quoteFileFullPath, $orderFileFullPath); + $this->_filesystem->copy($quoteFileFullPath, $orderFileFullPath); } catch (Exception $e) { return $this; } @@ -710,14 +732,11 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro $this->_createWriteableDir($this->getOrderTargetDir()); // Directory listing and hotlink secure - $io = new Varien_Io_File(); - $io->cd($this->getTargetDir()); - if (!$io->fileExists($this->getTargetDir() . DS . '.htaccess')) { - $io->streamOpen($this->getTargetDir() . DS . '.htaccess'); - $io->streamLock(true); - $io->streamWrite("Order deny,allow\nDeny from all"); - $io->streamUnlock(); - $io->streamClose(); + if (!$this->_filesystem->isFile($this->getTargetDir() . DS . '.htaccess')) { + $stream = $this->_filesystem->createStream($this->getTargetDir() . DS . '.htaccess'); + $stream->open('w+'); + $stream->write("Order deny,allow\nDeny from all"); + $stream->close(); } } @@ -729,9 +748,12 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro */ protected function _createWriteableDir($path) { - $io = new Varien_Io_File(); - if (!$io->isWriteable($path) && !$io->mkdir($path, 0777, true)) { - Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__("Cannot create writeable directory '%s'.", $path)); + try { + $this->_filesystem->createDirectory($path, 0777); + } catch (Magento_Filesystem_Exception $e) { + Mage::throwException( + Mage::helper('Mage_Catalog_Helper_Data')->__("Cannot create writeable directory '%s'.", $path) + ); } } @@ -774,7 +796,7 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro } // File path came in - check the physical file - if (!is_readable($fileInfo)) { + if (!$this->_filesystem->isReadable($fileInfo)) { return false; } $imageInfo = getimagesize($fileInfo); @@ -787,10 +809,10 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro /** * Get file storage helper * - * @return Mage_Core_Helper_File_Storage + * @return Magento_File_Size */ - public function getFileStorageHelper() + public function getFileSizeService() { - return Mage::helper('Mage_Core_Helper_File_Storage'); + return Mage::getObjectManager()->get('Magento_File_Size'); } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php index 6ffd9803d8ddf81daf4373f0421f4825fe5fb4be..012432a7adca72b31c2dcc28d1e2ee01c76fe988 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php @@ -111,6 +111,11 @@ abstract class Mage_Catalog_Model_Product_Type_Abstract */ const OPTION_PREFIX = 'option_'; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + /** * Delete data specific for this product type * @@ -121,10 +126,12 @@ abstract class Mage_Catalog_Model_Product_Type_Abstract /** * Initialize data * + * @param Magento_Filesystem $filesystem * @param array $data */ - public function __construct(array $data = array()) + public function __construct(Magento_Filesystem $filesystem, array $data = array()) { + $this->_filesystem = $filesystem; $this->_helpers = isset($data['helpers']) ? $data['helpers'] : array(); } @@ -232,14 +239,17 @@ abstract class Mage_Catalog_Model_Product_Type_Abstract /** * Retrieve product attribute by identifier * - * @param int $attributeId - * @return Mage_Eav_Model_Entity_Attribute_Abstract + * @param int $attributeId + * @param Mage_Catalog_Model_Product $product + * @return Mage_Catalog_Model_Resource_Eav_Attribute|null */ public function getAttributeById($attributeId, $product) { - foreach ($this->getSetAttributes($product) as $attribute) { - if ($attribute->getId() == $attributeId) { - return $attribute; + if ($attributeId) { + foreach ($this->getSetAttributes($product) as $attribute) { + if ($attribute->getId() == $attributeId) { + return $attribute; + } } } return null; @@ -410,9 +420,14 @@ abstract class Mage_Catalog_Model_Product_Type_Abstract $uploader = isset($queueOptions['uploader']) ? $queueOptions['uploader'] : null; $path = dirname($dst); - $io = new Varien_Io_File(); - if (!$io->isWriteable($path) && !$io->mkdir($path, 0777, true)) { - Mage::throwException($this->_helper('Mage_Catalog_Helper_Data')->__("Cannot create writeable directory '%s'.", $path)); + + try { + $this->_filesystem->createDirectory($path, 0777); + } catch (Magento_Filesystem_Exception $e) { + Mage::throwException( + $this->_helper('Mage_Catalog_Helper_Data') + ->__("Cannot create writeable directory '%s'.", $path) + ); } $uploader->setDestination($path); @@ -979,4 +994,15 @@ abstract class Mage_Catalog_Model_Product_Type_Abstract { return true; } + + /** + * Set image for product without image if possible + * + * @param Mage_Catalog_Model_Product $product + * @return Mage_Catalog_Model_Product_Type_Abstract + */ + public function setImageFromChildProduct(Mage_Catalog_Model_Product $product) + { + return $this; + } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php index b8f6262e72619038f7fa055edbb55e0a246a33f8..0f96e0dbb3e6c81442665236d4ae1769d5d8b97a 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php @@ -138,10 +138,10 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr /** * Check attribute availability for super product creation * - * @param Mage_Eav_Model_Entity_Attribute $attribute - * @return bool + * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute + * @return bool */ - public function canUseAttribute(Mage_Eav_Model_Entity_Attribute $attribute) + public function canUseAttribute(Mage_Catalog_Model_Resource_Eav_Attribute $attribute) { return $attribute->getIsGlobal() == Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL && $attribute->getIsVisible() @@ -245,17 +245,19 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr { $res = array(); foreach ($this->getConfigurableAttributes($product) as $attribute) { + $eavAttribute = $attribute->getProductAttribute(); /* @var $attribute Mage_Catalog_Model_Product_Type_Configurable_Attribute */ - $res[] = array( + $res[$eavAttribute->getId()] = array( 'id' => $attribute->getId(), 'label' => $attribute->getLabel(), 'use_default' => $attribute->getUseDefault(), 'position' => $attribute->getPosition(), 'values' => $attribute->getPrices() ? $attribute->getPrices() : array(), - 'attribute_id' => $attribute->getProductAttribute()->getId(), - 'attribute_code' => $attribute->getProductAttribute()->getAttributeCode(), - 'frontend_label' => $attribute->getProductAttribute()->getFrontend()->getLabel(), - 'store_label' => $attribute->getProductAttribute()->getStoreLabel(), + 'attribute_id' => $eavAttribute->getId(), + 'attribute_code' => $eavAttribute->getAttributeCode(), + 'frontend_label' => $eavAttribute->getFrontend()->getLabel(), + 'store_label' => $eavAttribute->getStoreLabel(), + 'options' => $eavAttribute->getSource()->getAllOptions(false), ); } return $res; @@ -402,12 +404,12 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr foreach ($data as $attributeData) { /** @var $configurableAttribute Mage_Catalog_Model_Product_Type_Configurable_Attribute */ $configurableAttribute = Mage::getModel('Mage_Catalog_Model_Product_Type_Configurable_Attribute'); - if (isset($attributeData['id'])) { + if (!empty($attributeData['id'])) { $configurableAttribute->load($attributeData['id']); } else { $configurableAttribute->loadByProductAndAttribute( $product, - $product->getTypeInstance()->getAttributeById($attributeData['attribute_id'], $product) + $this->getAttributeById($attributeData['attribute_id'], $product) ); } unset($attributeData['id']); @@ -417,6 +419,17 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr ->setProductId($product->getId()) ->save(); } + /** @var $configurableAttributesCollection Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection */ + $configurableAttributesCollection = Mage::getResourceModel( + 'Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection' + ); + $configurableAttributesCollection->setProductFilter($product); + $configurableAttributesCollection->addFieldToFilter( + 'attribute_id', + array('nin'=> $this->getUsedProductAttributeIds($product)) + ); + $configurableAttributesCollection->walk('delete'); + } /* Save product relations */ @@ -468,7 +481,7 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr /** * Retrieve used product by attribute values - * $attrbutesInfo = array( + * $attributesInfo = array( * $attributeId => $attributeValue * ) * @@ -875,4 +888,135 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr $configurableAttribute = Mage::getModel('Mage_Catalog_Model_Product_Type_Configurable_Attribute'); $configurableAttribute->deleteByProduct($product); } + + /** + * Retrieve product attribute by identifier + * Difference from abstract: any attribute is available, not just the ones from $product's attribute set + * + * @param int $attributeId + * @param Mage_Catalog_Model_Product $product + * @return Mage_Catalog_Model_Resource_Eav_Attribute + */ + public function getAttributeById($attributeId, $product) + { + $attribute = parent::getAttributeById($attributeId, $product); + return $attribute ?: Mage::getModel('Mage_Catalog_Model_Resource_Eav_Attribute')->load($attributeId); + } + + /** + * Generate simple products to link with configurable + * + * @param Mage_Catalog_Model_Product $parentProduct + * @param array $productsData + * @return array + */ + public function generateSimpleProducts($parentProduct, $productsData) + { + $this->_prepareAttributeSetToBeBaseForNewVariations($parentProduct); + $generatedProductIds = array(); + foreach ($productsData as $simpleProductData) { + $newSimpleProduct = Mage::getModel('Mage_Catalog_Model_Product'); + $configurableAttribute = Mage::helper('Mage_Core_Helper_Data')->jsonDecode( + $simpleProductData['configurable_attribute'] + ); + unset($simpleProductData['configurable_attribute']); + + $this->_fillSimpleProductData( + $newSimpleProduct, + $parentProduct, + array_merge($simpleProductData, $configurableAttribute) + ); + $newSimpleProduct->save(); + + $generatedProductIds[] = $newSimpleProduct->getId(); + } + return $generatedProductIds; + } + + /** + * Set image for product without image if possible + * + * @param Mage_Catalog_Model_Product $product + * @return Mage_Catalog_Model_Product_Type_Configurable + */ + public function setImageFromChildProduct(Mage_Catalog_Model_Product $product) + { + if (!$product->getData('image') || $product->getData('image') === 'no_selection') { + foreach ($this->getUsedProducts($product) as $childProduct) { + if ($childProduct->getData('image') && $childProduct->getData('image') !== 'no_selection') { + $product->setImage($childProduct->getData('image')); + break; + } + } + } + return parent::setImageFromChildProduct($product); + } + + /** + * Prepare attribute set comprising all selected configurable attributes + * + * @param Mage_Catalog_Model_Product $product + */ + protected function _prepareAttributeSetToBeBaseForNewVariations(Mage_Catalog_Model_Product $product) + { + $attributes = $this->getUsedProductAttributes($product); + $attributeSetId = $product->getNewVariationsAttributeSetId(); + /** @var $attributeSet Mage_Eav_Model_Entity_Attribute_Set */ + $attributeSet = Mage::getModel('Mage_Eav_Model_Entity_Attribute_Set')->load($attributeSetId); + $attributeSet->addSetInfo( + Mage::getModel('Mage_Eav_Model_Entity')->setType(Mage_Catalog_Model_Product::ENTITY)->getTypeId(), + $attributes + ); + foreach ($attributes as $attribute) { + /* @var $attribute Mage_Catalog_Model_Entity_Attribute */ + if (!$attribute->isInSet($attributeSetId)) { + $attribute->setAttributeSetId($attributeSetId) + ->setAttributeGroupId($attributeSet->getDefaultGroupId($attributeSetId)) + ->save(); + } + } + } + + /** + * Fill simple product data during generation + * + * @param Mage_Catalog_Model_Product $product + * @param Mage_Catalog_Model_Product $parentProduct + * @param array $postData + */ + protected function _fillSimpleProductData( + Mage_Catalog_Model_Product $product, + Mage_Catalog_Model_Product $parentProduct, + $postData + ) { + $product->setStoreId(Mage_Core_Model_App::ADMIN_STORE_ID) + ->setTypeId($postData['weight'] + ? Mage_Catalog_Model_Product_Type::TYPE_SIMPLE + : Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL + )->setAttributeSetId($parentProduct->getNewVariationsAttributeSetId()); + + foreach ($product->getTypeInstance()->getEditableAttributes($product) as $attribute) { + if ($attribute->getIsUnique() + || $attribute->getAttributeCode() == 'url_key' + || $attribute->getFrontend()->getInputType() == 'gallery' + || $attribute->getFrontend()->getInputType() == 'media_image' + || !$attribute->getIsVisible() + ) { + continue; + } + + $product->setData( + $attribute->getAttributeCode(), + $parentProduct->getData($attribute->getAttributeCode()) + ); + } + + if (!isset($postData['stock_data']['use_config_manage_stock'])) { + $postData['stock_data']['use_config_manage_stock'] = 0; + } + $product->addData($postData) + ->setWebsiteIds($parentProduct->getWebsiteIds()) + ->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED) + ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE); + } } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php index eef926555e3ae10870d9d829ff7b92ad0c5dd8e5..54249d1445da9d4d3bfaa94fcdcbd8ed2696d8af 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php @@ -401,7 +401,7 @@ abstract class Mage_Catalog_Model_Resource_Abstract extends Mage_Eav_Model_Entit $storeAttributes[] = (int)$itemData['attribute_id']; } elseif ($attribute->isScopeWebsite()) { $websiteAttributes[] = (int)$itemData['attribute_id']; - } else { + } elseif ($itemData['value_id'] !== null) { $globalValues[] = (int)$itemData['value_id']; } } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php index 418d15bb3c54d91e1b6e0d34a96f57c0fa1fcd59..a675931cf918ab149726a5206e7bff71a814bc54 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php @@ -68,6 +68,7 @@ * @method int setIsUsedForCustomerSegment(int $value) * @method Mage_Catalog_Model_Resource_Eav_Attribute getIsUsedForTargetRules() * @method int setIsUsedForTargetRules(int $value) + * @method string getFrontendLabel() * * @category Mage * @package Mage_Catalog @@ -294,16 +295,6 @@ class Mage_Catalog_Model_Resource_Eav_Attribute extends Mage_Eav_Model_Entity_At return $this->getIsVisible() && in_array($this->getFrontendInput(), $allowedInputTypes); } - /** - * Retrieve don't translated frontend label - * - * @return string - */ - public function getFrontendLabel() - { - return $this->_getData('frontend_label'); - } - /** * Get default attribute source model * diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php index 2271e1b5e5ca3a62eeb4657ac7f4535ce1dec29b..9bf08c942cf15872b3f84f7d9dcdeaae912d15ef 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php @@ -104,22 +104,17 @@ class Mage_Catalog_Model_Resource_Product_Collection_AssociatedProduct */ public function _prepareSelect(Varien_Db_Select $select) { - $allowProductTypes = array(); + $allowedProductTypes = array(); foreach ($this->_configurationHelper->getConfigurableAllowedTypes() as $type) { - $allowProductTypes[] = $type->getName(); + $allowedProductTypes[] = $type->getName(); } - $product = $this->getProduct(); - $this->addAttributeToSelect('name') - ->addAttributeToSelect('sku') - ->addAttributeToSelect('attribute_set_id') - ->addAttributeToSelect('type_id') ->addAttributeToSelect('price') + ->addAttributeToSelect('sku') ->addAttributeToSelect('weight') - ->addFieldToFilter('attribute_set_id', $product->getAttributeSetId()) - ->addFieldToFilter('type_id', $allowProductTypes) - ->addFieldToFilter($product->getIdFieldName(), array('neq' => $product->getId())) + ->addFieldToFilter('type_id', $allowedProductTypes) + ->addFieldToFilter('entity_id', array('neq' => $this->getProduct()->getId())) ->addFilterByRequiredOptions() ->joinAttribute('name', 'catalog_product/name', 'entity_id', null, 'inner'); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php index 45e9b4e46a2df424d397bd1ba97185060cf1f97b..ed9bb8be0b8303f25aaf71fe67a9f214c1a40007 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php @@ -169,8 +169,9 @@ class Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection */ public function _addAssociatedProductFilters() { - $this->getProductType() - ->getUsedProducts($this->getProduct(), $this->getColumnValues('attribute_id')); // Filter associated products + $this->getProductType()->getUsedProducts( + $this->getProduct(), $this->getColumnValues('attribute_id') // Filter associated products + ); return $this; } @@ -198,7 +199,10 @@ class Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection ->from(array('def' => $this->_labelTable)) ->joinLeft( array('store' => $this->_labelTable), - $this->getConnection()->quoteInto('store.product_super_attribute_id = def.product_super_attribute_id AND store.store_id = ?', $this->getStoreId()), + $this->getConnection()->quoteInto( + 'store.product_super_attribute_id = def.product_super_attribute_id AND store.store_id = ?', + $this->getStoreId() + ), array( 'use_default' => $useDefaultCheck, 'label' => $labelCheck @@ -314,7 +318,7 @@ class Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection } /** - * Retrive product instance + * Retrieve product instance * * @return Mage_Catalog_Model_Product */ diff --git a/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml b/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml new file mode 100644 index 0000000000000000000000000000000000000000..2bdf9937aeb34996721edb5f101ce176f6b1f261 --- /dev/null +++ b/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml @@ -0,0 +1,60 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* @var $this Mage_Core_Block_Template */ +?> +<div id="<?php echo $this->getNameInLayout() ?>" style="display:none"> + <form action=""> + <ul class="messages"> + <li class="notice-msg"> + <ul> + <li>Attribute set comprising all selected configurable attributes need to be in order to save generated variations.</li> + </ul> + </li> + <li class="error-msg" style="display:none"> + </li> + </ul> + <div id="affected-attribute-set-current-container"> + <label> + <input type="radio" name="affected-attribute-set" value="current" checked="checked" /> + <?php echo $this->helper('Mage_Catalog_Helper_Data')->__('Add configurable attributes to the current set ("%s")', $this->getLayout()->getBlock('product_edit')->getAttributeSetName())?> + </label> + </div> + <div id="affected-attribute-set-new-container"> + <label> + <input type="radio" name="affected-attribute-set" value="new" /> + <?php echo $this->helper('Mage_Catalog_Helper_Data')->__('Add configurable attributes to the new set based on current')?> + </label> + </div> + <div id="affected-attribute-set-new-name-container" style="display:none"> + <label> + <?php echo $this->helper('Mage_Catalog_Helper_Data')->__('New attribute set name')?> + <span class="required">*</span><br /> + <input name="new-attribute-set-name" type="text" class="input-text required-entry validate-no-html-tags" /> + </label> + </div> + </form> +</div> diff --git a/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/js.phtml b/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/js.phtml new file mode 100644 index 0000000000000000000000000000000000000000..96cc136ac72c3611955420360fca3b431171aee6 --- /dev/null +++ b/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/js.phtml @@ -0,0 +1,137 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/* @var $this Mage_Catalog_Block_Product_Configurable_AttributeSelector */ +?> +<script type="text/javascript"> +jQuery(function($) { + 'use strict'; + $(function() { + var $form = $('#affected-attribute-set-form'), + resetValidation = function() { + $form.find('.messages .error-msg').hide(); + $form.find('form').validation().data('validator').resetForm(); + }; + + $('#product-edit-form').append($('<input>', { + type: 'hidden', + name: 'new-variations-attribute-set-id', + id: 'new-variations-attribute-set-id' + })); + + $form + .dialog({ + title: '<?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Choose Affected Attribute Set'); ?>', + autoOpen: false, + id: '<?php echo $this->getJsId() ?>', + minWidth: 700, + modal: true, + resizable: false, + close: resetValidation, + buttons: [{ + text: '<?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Cancel'); ?>', + id: '<?php echo $this->getJsId('close-button') ?>', + click: function() { + $form.dialog('close'); + } + }, { + text: '<?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Confirm'); ?>', + id: '<?php echo $this->getJsId('confirm-button') ?>', + click: function() { + if ($form.find('input[name=affected-attribute-set]:checked').val() == 'current') { + $('#new-variations-attribute-set-id').val($('#attribute_set_id').val()); + $form.dialog('close') + .data('target').click(); + return; + } + + $form.find('.messages .error-msg').hide(); + if (!$form.find('form').validation().valid()) { + $form.find('input[name=new-attribute-set-name]').focus(); + return false; + } + + $.ajax({ + type: 'POST', + url: '<?php echo $this->getAttributeSetCreationUrl()?>', + data: { + gotoEdit: 1, + attribute_set_name: $form.find('input[name=new-attribute-set-name]').val(), + skeleton_set: $('#attribute_set_id').val(), + form_key: '<?php echo $this->getFormKey()?>', + return_session_messages_only: 1 + }, + dataType: 'json', + showLoader: true, + context: $form + }) + .success(function (data) { + if (!data.error) { + $('#new-variations-attribute-set-id').val(data.id); + $form.dialog('close') + .data('target').click(); + } else { + $form.find('.messages .error-msg').replaceWith($(data.messages).find('.error-msg')); + } + }); + + return false; + } + }] + }) + .find('input[name=affected-attribute-set]').on('change', function() { + $('#affected-attribute-set-new-name-container')[$(this).val() == 'new' ? 'show' : 'hide'](); + resetValidation(); + if ($(this).val() == 'new') { + $form.find('input[name=new-attribute-set-name]').focus(); + } + }); + + $('#save-split-button .item') + .on('click', function(event) { + if ($('#new-variations-attribute-set-id').val() != '') { + return; // affected attribute set was already chosen + } + var extendingAttributes = []; + $.each($('#attributes-container').variationsAttributes('getAttributes'), function () { + if (!$('#attribute-' + this.code + '-container').length) { + extendingAttributes.push(this.id); + } + }); + if (!extendingAttributes.length) { + $('#new-variations-attribute-set-id').val($('#attribute_set_id').val()); + return; // all selected configurable attributes belong to current attribute set + } + if (!$('.associated-matrix-product-id:checked').closest('tr').has('input[name$="[name]"]').length) { + return; // no new simple products to save from matrix: uniting attribute set is not needed + } + + event.stopImmediatePropagation(); + $form.data('target', event.target) + .dialog('open'); + }); + }); +}); +</script> diff --git a/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/attribute-selector/js.phtml b/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/attribute-selector/js.phtml new file mode 100644 index 0000000000000000000000000000000000000000..1a4897bbb90c9d221145ccfd5ba5b9266f749062 --- /dev/null +++ b/app/code/core/Mage/Catalog/view/adminhtml/product/configurable/attribute-selector/js.phtml @@ -0,0 +1,71 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/** @var $this Mage_Catalog_Block_Product_Configurable_AttributeSelector */ +?> +<script type="text/javascript"> +(function($) { + 'use strict'; + $(function() { + $('#attribute-selector') + .autocomplete({ + minLength: 0, + appendTo: '#config_super_product', + source: function(request, response) { + $.ajax({ + url: '<?php echo $this->getSuggestUrl()?>', + data: {label_part: request.term}, + dataType: 'json', + context: '<div>' + }) + .success(function(data) { + var list = []; + $.each(data, function(id, item) { + if (!$('#configurable_attribute_' + id ).length) { + list.push(item); + } + }); + response(list); + }); + }, + focus: function(event, ui) { + return false; + }, + select: function(event, ui) { + var attribute = ui.item; + if (attribute.id) { + $('#attributes-container').trigger('add', attribute); + } + $(this).val('').blur(); + return false; + } + }) + .on('focus', function () { + $(this).autocomplete('search'); + }); + }); +})(jQuery); +</script> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_diagonals-thick_18_b81900_40x40.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_diagonals-thick_18_b81900_40x40.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_diagonals-thick_20_666666_40x40.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_diagonals-thick_20_666666_40x40.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_flat_10_000000_40x100.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_flat_10_000000_40x100.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_glass_100_f6f6f6_1x400.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_glass_100_fdf5ce_1x400.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_glass_65_ffffff_1x400.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_gloss-wave_35_f67028_500x100.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_gloss-wave_35_f67028_500x100.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_gloss-wave_35_f67028_500x100.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_gloss-wave_35_f67028_500x100.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_highlight-soft_100_eeeeee_1x100.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_highlight-soft_75_ffe45c_1x100.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_222222_256x240.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_222222_256x240.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_222222_256x240.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_222222_256x240.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_228ef1_256x240.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_228ef1_256x240.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_228ef1_256x240.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_ef8c08_256x240.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_ef8c08_256x240.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_ef8c08_256x240.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_ffd27a_256x240.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_ffd27a_256x240.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_ffd27a_256x240.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_ffffff_256x240.png similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/images/ui-icons_ffffff_256x240.png rename to app/code/core/Mage/Catalog/view/adminhtml/product/images/ui-icons_ffffff_256x240.png diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/jquery-ui-1.8.21.custom.css b/app/code/core/Mage/Catalog/view/adminhtml/product/product.css similarity index 54% rename from app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/jquery-ui-1.8.21.custom.css rename to app/code/core/Mage/Catalog/view/adminhtml/product/product.css index 50ee8c595b2afa149f430e97478a7baca341ab7b..7e2c060b86fecfb4892532627c277d37b132bdc7 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/css/ui-lightness/jquery-ui-1.8.21.custom.css +++ b/app/code/core/Mage/Catalog/view/adminhtml/product/product.css @@ -18,7 +18,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -67,7 +67,9 @@ filter: Alpha(Opacity = 0); } -.ui-state-disabled { + + +.ui-autocomplete .ui-state-disabled { cursor: default !important; } @@ -78,28 +80,6 @@ background-repeat: no-repeat; } -.ui-widget-overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.ui-widget { - font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; - font-size: 1.1em; -} - -.ui-widget .ui-widget { - font-size: 1em; -} - -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { - font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; - font-size: 1em; -} - .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; @@ -110,49 +90,51 @@ color: #333333; } -.ui-widget-header { - border: 1px solid #e78f08; - background: #f67028 url(images/ui-bg_gloss-wave_35_f67028_500x100.png) 50% 50% repeat-x; - color: #ffffff; - font-weight: bold; -} - -.ui-widget-header a { - color: #ffffff; -} - -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { +.ui-autocomplete .ui-state-default, +.ui-autocomplete .ui-widget-content .ui-state-default, +.ui-autocomplete .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { +.ui-autocomplete .ui-state-default a, +.ui-autocomplete .ui-state-default a:link, +.ui-autocomplete .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { +.ui-autocomplete .ui-state-hover, +.ui-autocomplete .ui-widget-content .ui-state-hover, +.ui-autocomplete .ui-widget-header .ui-state-hover, +.ui-autocomplete .ui-state-focus, +.ui-autocomplete .ui-widget-content .ui-state-focus, +.ui-autocomplete .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } -.ui-state-hover a, .ui-state-hover a:hover { +.ui-autocomplete .ui-state-hover a, .ui-autocomplete .ui-state-hover a:hover { color: #c77405; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { +.ui-autocomplete .ui-state-active, +.ui-autocomplete .ui-widget-content .ui-state-active, +.ui-autocomplete .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { +.ui-autocomplete .ui-state-active a, +.ui-autocomplete .ui-state-active a:link, +.ui-autocomplete .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } @@ -161,41 +143,31 @@ outline: none; } -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { +.ui-autocomplete .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a { +.ui-autocomplete .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { +.ui-autocomplete .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { +.ui-autocomplete .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { +.ui-autocomplete .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { - font-weight: bold; -} - -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { - opacity: .7; - filter: Alpha(Opacity = 70); - font-weight: normal; -} - -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { +.ui-autocomplete .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter: Alpha(Opacity = 35); background-image: none; @@ -207,34 +179,6 @@ background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon { - background-image: url(images/ui-icons_222222_256x240.png); -} - -.ui-widget-header .ui-icon { - background-image: url(images/ui-icons_ffffff_256x240.png); -} - -.ui-state-default .ui-icon { - background-image: url(images/ui-icons_ef8c08_256x240.png); -} - -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon { - background-image: url(images/ui-icons_ef8c08_256x240.png); -} - -.ui-state-active .ui-icon { - background-image: url(images/ui-icons_ef8c08_256x240.png); -} - -.ui-state-highlight .ui-icon { - background-image: url(images/ui-icons_228ef1_256x240.png); -} - -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { - background-image: url(images/ui-icons_ffd27a_256x240.png); -} - .ui-icon-carat-1-n { background-position: 0 0; } @@ -931,186 +875,59 @@ background-position: -80px -224px; } -.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { +.ui-autocomplete .ui-corner-all, +.ui-dialog.ui-corner-all, +.ui-dialog .ui-corner-all, +.ui-autocomplete .ui-corner-top, +.ui-autocomplete .ui-corner-left, +.ui-autocomplete .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { +.ui-autocomplete .ui-corner-all, +.ui-dialog.ui-corner-all, +.ui-dialog .ui-corner-all, +.ui-autocomplete .ui-corner-top, +.ui-autocomplete .ui-corner-right, +.ui-autocomplete .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { +.ui-autocomplete .ui-corner-all, +.ui-dialog.ui-corner-all, +.ui-dialog .ui-corner-all, +.ui-autocomplete .ui-corner-bottom, +.ui-autocomplete .ui-corner-left, +.ui-autocomplete .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { +.ui-autocomplete .ui-corner-all, +.ui-dialog.ui-corner-all, +.ui-dialog .ui-corner-all, +.ui-autocomplete .ui-corner-bottom, +.ui-autocomplete .ui-corner-right, +.ui-autocomplete .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-widget-overlay { - background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; - opacity: .50; - filter: Alpha(Opacity = 50); -} - -.ui-widget-shadow { - margin: -5px 0 0 -5px; - padding: 5px; - background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; - opacity: .20; - filter: Alpha(Opacity = 20); - -moz-border-radius: 5px; - -khtml-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; -} - -.ui-resizable { - position: relative; -} - -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - display: block; -} - -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { - display: none; -} - -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0; -} - -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0; -} - -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; - top: 0; - height: 100%; -} - -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0; - height: 100%; -} - -.ui-resizable-se { - cursor: se-resize; - width: 12px; - height: 12px; - right: 1px; - bottom: 1px; -} - -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: -5px; - bottom: -5px; -} - -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: -5px; - top: -5px; -} - -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: -5px; - top: -5px; -} - -.ui-selectable-helper { - position: absolute; - z-index: 100; - border: 1px dotted black; -} - -.ui-accordion { - width: 100%; -} - -.ui-accordion .ui-accordion-header { - cursor: pointer; - position: relative; - margin-top: 1px; - zoom: 1; -} - -.ui-accordion .ui-accordion-li-fix { - display: inline; -} - -.ui-accordion .ui-accordion-header-active { - border-bottom: 0 !important; -} - -.ui-accordion .ui-accordion-header a { - display: block; - font-size: 1em; - padding: .5em .5em .5em .7em; -} - -.ui-accordion-icons .ui-accordion-header a { - padding-left: 2.2em; -} - -.ui-accordion .ui-accordion-header .ui-icon { - position: absolute; - left: .5em; - top: 50%; - margin-top: -8px; -} - -.ui-accordion .ui-accordion-content { - padding: 1em 2.2em; - border-top: 0; - margin-top: -2px; - position: relative; - top: 1px; - margin-bottom: 2px; - overflow: auto; - display: none; - zoom: 1; -} - -.ui-accordion .ui-accordion-content-active { - display: block; +.ui-button.ui-corner-all { + -moz-border-radius: 0; + -webkit-border-radius: 0; + -khtml-border-radius: 0; + border-radius: 0; } .ui-autocomplete { @@ -1157,102 +974,6 @@ margin: -1px; } -.ui-button { - display: inline-block; - position: relative; - padding: 0; - margin-right: .1em; - text-decoration: none !important; - cursor: pointer; - text-align: center; - zoom: 1; - overflow: visible; -} - -.ui-button-icon-only { - width: 2.2em; -} - -button.ui-button-icon-only { - width: 2.4em; -} - -.ui-button-icons-only { - width: 3.4em; -} - -button.ui-button-icons-only { - width: 3.7em; -} - -.ui-button .ui-button-text { - display: block; - line-height: 1.4; -} - -.ui-button-text-only .ui-button-text { - padding: .4em 1em; -} - -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { - padding: .4em; - text-indent: -9999999px; -} - -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { - padding: .4em 1em .4em 2.1em; -} - -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { - padding: .4em 2.1em .4em 1em; -} - -.ui-button-text-icons .ui-button-text { - padding-left: 2.1em; - padding-right: 2.1em; -} - -input.ui-button { - padding: .4em 1em; -} - -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { - position: absolute; - top: 50%; - margin-top: -8px; -} - -.ui-button-icon-only .ui-icon { - left: 50%; - margin-left: -8px; -} - -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { - left: .5em; -} - -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { - right: .5em; -} - -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { - right: .5em; -} - -.ui-buttonset { - margin-right: 7px; -} - -.ui-buttonset .ui-button { - margin-left: 0; - margin-right: -.3em; -} - -button.ui-button::-moz-focus-inner { - border: 0; - padding: 0; -} - .ui-dialog { position: absolute; padding: .2em; @@ -1322,357 +1043,13 @@ button.ui-button::-moz-focus-inner { bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { - cursor: move; -} - -.ui-slider { - position: relative; - text-align: left; -} - -.ui-slider .ui-slider-handle { - position: absolute; - z-index: 2; - width: 1.2em; - height: 1.2em; - cursor: default; -} - -.ui-slider .ui-slider-range { - position: absolute; - z-index: 1; - font-size: .7em; - display: block; - border: 0; - background-position: 0 0; -} - -.ui-slider-horizontal { - height: .8em; -} - -.ui-slider-horizontal .ui-slider-handle { - top: -.3em; - margin-left: -.6em; -} - -.ui-slider-horizontal .ui-slider-range { - top: 0; - height: 100%; -} - -.ui-slider-horizontal .ui-slider-range-min { - left: 0; -} - -.ui-slider-horizontal .ui-slider-range-max { - right: 0; -} - -.ui-slider-vertical { - width: .8em; - height: 100px; -} - -.ui-slider-vertical .ui-slider-handle { - left: -.3em; - margin-left: 0; - margin-bottom: -.6em; -} - -.ui-slider-vertical .ui-slider-range { - left: 0; - width: 100%; -} - -.ui-slider-vertical .ui-slider-range-min { - bottom: 0; -} - -.ui-slider-vertical .ui-slider-range-max { - top: 0; -} - -.ui-tabs { - position: relative; - padding: .2em; - zoom: 1; -} - -.ui-tabs .ui-tabs-nav { - margin: 0; - padding: .2em .2em 0; -} - -.ui-tabs .ui-tabs-nav li { - list-style: none; - float: left; - position: relative; - top: 1px; - margin: 0 .2em 1px 0; - border-bottom: 0 !important; +.widget-button-split.widget-button-save { + margin: 0 0 3px 5px; padding: 0; - white-space: nowrap; -} - -.ui-tabs .ui-tabs-nav li a { - float: left; - padding: .5em 1em; - text-decoration: none; -} - -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { - margin-bottom: 0; - padding-bottom: 1px; -} - -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { - cursor: text; -} - -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { - cursor: pointer; -} - -.ui-tabs .ui-tabs-panel { - display: block; - border-width: 0; - padding: 1em 1.4em; - background: none; -} - -.ui-tabs .ui-tabs-hide { - display: none !important; -} - -.ui-datepicker { - width: 17em; - padding: .2em .2em 0; - display: none; -} - -.ui-datepicker .ui-datepicker-header { - position: relative; - padding: .2em 0; -} - -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { - position: absolute; - top: 2px; - width: 1.8em; - height: 1.8em; -} - -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { - top: 1px; -} - -.ui-datepicker .ui-datepicker-prev { - left: 2px; -} - -.ui-datepicker .ui-datepicker-next { - right: 2px; -} - -.ui-datepicker .ui-datepicker-prev-hover { - left: 1px; -} - -.ui-datepicker .ui-datepicker-next-hover { - right: 1px; -} - -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { - display: block; - position: absolute; - left: 50%; - margin-left: -8px; - top: 50%; - margin-top: -8px; -} - -.ui-datepicker .ui-datepicker-title { - margin: 0 2.3em; - line-height: 1.8em; - text-align: center; -} - -.ui-datepicker .ui-datepicker-title select { - font-size: 1em; - margin: 1px 0; -} - -.ui-datepicker select.ui-datepicker-month-year { - width: 100%; } - -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { - width: 49%; -} - -.ui-datepicker table { - width: 100%; - font-size: .9em; - border-collapse: collapse; - margin: 0 0 .4em; -} - -.ui-datepicker th { - padding: .7em .3em; - text-align: center; - font-weight: bold; - border: 0; -} - -.ui-datepicker td { - border: 0; - padding: 1px; -} - -.ui-datepicker td span, .ui-datepicker td a { - display: block; - padding: .2em; - text-align: right; - text-decoration: none; -} - -.ui-datepicker .ui-datepicker-buttonpane { - background-image: none; - margin: .7em 0 0 0; - padding: 0 .2em; - border-left: 0; - border-right: 0; - border-bottom: 0; -} - -.ui-datepicker .ui-datepicker-buttonpane button { - float: right; - margin: .5em .2em .4em; - cursor: pointer; - padding: .2em .6em .3em .6em; - width: auto; - overflow: visible; -} - -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { - float: left; -} - -.ui-datepicker.ui-datepicker-multi { - width: auto; -} - -.ui-datepicker-multi .ui-datepicker-group { - float: left; -} - -.ui-datepicker-multi .ui-datepicker-group table { - width: 95%; - margin: 0 auto .4em; -} - -.ui-datepicker-multi-2 .ui-datepicker-group { - width: 50%; -} - -.ui-datepicker-multi-3 .ui-datepicker-group { - width: 33.3%; -} - -.ui-datepicker-multi-4 .ui-datepicker-group { - width: 25%; -} - -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { - border-left-width: 0; -} - -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { - border-left-width: 0; -} - -.ui-datepicker-multi .ui-datepicker-buttonpane { - clear: left; -} - -.ui-datepicker-row-break { - clear: both; - width: 100%; - font-size: 0em; -} - -.ui-datepicker-rtl { - direction: rtl; -} - -.ui-datepicker-rtl .ui-datepicker-prev { - right: 2px; - left: auto; -} - -.ui-datepicker-rtl .ui-datepicker-next { - left: 2px; - right: auto; -} - -.ui-datepicker-rtl .ui-datepicker-prev:hover { - right: 1px; - left: auto; -} - -.ui-datepicker-rtl .ui-datepicker-next:hover { - left: 1px; - right: auto; -} - -.ui-datepicker-rtl .ui-datepicker-buttonpane { - clear: right; -} - -.ui-datepicker-rtl .ui-datepicker-buttonpane button { - float: left; -} - -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { - float: right; -} - -.ui-datepicker-rtl .ui-datepicker-group { - float: right; -} - -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { - border-right-width: 0; - border-left-width: 1px; -} - -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { - border-right-width: 0; - border-left-width: 1px; -} - -.ui-datepicker-cover { - display: none; - display /**/: block; - position: absolute; - z-index: -1; - filter: mask(); - top: -4px; - left: -4px; - width: 200px; - height: 200px; -} - -.ui-progressbar { - height: 2em; - text-align: left; - overflow: hidden; -} - -.ui-progressbar .ui-progressbar-value { - margin: -1px; - height: 100%; +.widget-button-split.widget-button-save .main-control, .widget-button-split.widget-button-save .btn-toggle { + padding: 0 7px 2px; + font: bold 12px arial,helvetica,sans-serif; + filter: none; + text-shadow: none; } diff --git a/app/code/core/Mage/Catalog/view/frontend/images/magnifier_handle.gif b/app/code/core/Mage/Catalog/view/frontend/images/magnifier_handle.gif new file mode 100644 index 0000000000000000000000000000000000000000..cab1a4728c64a13501c48ce4cc667559f0d8ef43 Binary files /dev/null and b/app/code/core/Mage/Catalog/view/frontend/images/magnifier_handle.gif differ diff --git a/app/code/core/Mage/Catalog/view/frontend/js/compare.js b/app/code/core/Mage/Catalog/view/frontend/js/compare.js index d6bfdb4d690422b9579ab8bc1e96b1db3737df58..ae84491095147858bb0b6e4d94410ddbd5b80907 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/compare.js +++ b/app/code/core/Mage/Catalog/view/frontend/js/compare.js @@ -25,25 +25,24 @@ /*jshint browser:true jquery:true*/ /*global confirm:true*/ (function ($) { - $(document).ready(function () { - var _compare = { - listSelector: null, - removeConfirmMessage: null, - removeSelector: null, - clearAllConfirmMessage: null, - clearAllSelector: null - }; + $.widget('mage.compareItems', { + _create: function() { + this.element.decorate('list', true); + this._confirm(this.options.removeSelector, this.options.removeConfirmMessage); + this._confirm(this.options.clearAllSelector, this.options.clearAllConfirmMessage); + }, - $.mage.event.trigger('mage.compare.initialize', _compare); - $(_compare.listSelector).decorate('list', true); - - function _confirmMessage(selector, message) { - $(selector).on('click', function () { + /** + * Set up a click event on the given selector to display a confirmation request message + * and ask for that confirmation. + * @param selector Selector for the confirmation on click event + * @param message Message to display asking for confirmation to perform action + * @private + */ + _confirm: function(selector, message) { + $(selector).on('click', function() { return confirm(message); }); } - - _confirmMessage(_compare.removeSelector, _compare.removeConfirmMessage); - _confirmMessage(_compare.clearAllSelector, _compare.clearAllConfirmMessage); }); })(jQuery); \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/view/frontend/js/configurable.js b/app/code/core/Mage/Catalog/view/frontend/js/configurable.js index 236512b259ad752deef138b24ddf9eecf94bf751..fd618cca2f7ee328b2bbd52dbf93ff93689fd37c 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/configurable.js +++ b/app/code/core/Mage/Catalog/view/frontend/js/configurable.js @@ -22,51 +22,108 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/*jshint evil:true browser:true jquery:true*/ +/*jshint browser:true jquery:true*/ -(function ($, undefined) { +(function($, undefined) { $.widget('mage.configurable', { options: { + superSelector: '.super-attribute-select', state: {} }, - _create: function () { + + _create: function() { + // Initial setting of various option values + this._initializeOptions(); + + // Override defaults with URL query parameters and/or inputs values + this._overrideDefaults(); + + // Change events to check select reloads + this._setupChangeEvents(); + + // Fill state + this._fillState(); + + // Setup child and prev/next settings + this._setChildSettings(); + + // Setup/configure values to inputs + this._configureForValues(); + }, + + /** + * Initialize tax configuration, initial settings, and options values. + * @private + */ + _initializeOptions: function() { this.options.taxConfig = this.options.spConfig.taxConfig; - if (this.options.containerId) { - this.options.setings = $('#' + this.options.spConfig.containerId + ' ' + '.super-attribute-select'); - } else { - this.options.setings = $('.super-attribute-select'); - } - // Overwrite defaults by url - if (this.options.spConfig.defaultValues) { - this.options.values = this.options.spConfig.defaultValues; - } - var separatorIndex = window.location.href.indexOf('#'); - if (separatorIndex !== -1) { - var paramsStr = window.location.href.substr(separatorIndex + 1); - var urlValues = paramsStr.toQueryParams(); - if (!this.options.spConfig.defaultValues) { - this.options.values = {}; - } - for (var i = 0; i < urlValues.length; i++) { - this.options.values[i] = urlValues[i]; - } + this.options.settings = (this.options.spConfig.containerId) ? + $(this.options.spConfig.containerId).find(this.options.superSelector) : + $(this.options.superSelector); + this.options.values = this.options.spConfig.defaultValues || {}; + this.options.parentImage = $('#image').attr('src'); + }, + + /** + * Override default options values settings with either URL query parameters or + * initialized inputs values. + * @private + */ + _overrideDefaults: function() { + var hashIndex = window.location.href.indexOf('#'); + if (hashIndex !== -1) { + this._parseQueryParams(window.location.href.substr(hashIndex + 1)); } - // Overwrite defaults by inputs values if needed if (this.options.spConfig.inputsInitialized) { - this.options.values = {}; - $.each(this.options.setings, $.proxy(function (index, element) { - if (element.value) { - var attributeId = element.id.replace(/[a-z]*/, ''); - this.options.values[attributeId] = element.value; - } - }, this)); + this._setValuesByAttribute(); } - // Put events to check select reloads - $.each(this.options.setings, $.proxy(function (index, element) { + }, + + /** + * Parse query parameters from a query string and set options values based on the + * key value pairs of the parameters. + * @param queryString URL query string containing query parameters. + * @private + */ + _parseQueryParams: function(queryString) { + var queryParams = $.parseQuery({query: queryString}); + $.each(queryParams, $.proxy(function(key, value) { + this.options.values[key] = value; + }, this)); + }, + + /** + * Override default options values with values based on each element's attribute + * identifier. + * @private + */ + _setValuesByAttribute: function() { + this.options.values = {}; + $.each(this.options.settings, $.proxy(function(index, element) { + if (element.value) { + var attributeId = element.id.replace(/[a-z]*/, ''); + this.options.values[attributeId] = element.value; + } + }, this)); + }, + + /** + * Set up .on('change') events for each option element to configure the option. + * @private + */ + _setupChangeEvents: function() { + $.each(this.options.settings, $.proxy(function(index, element) { $(element).on('change', this, this._configure); }, this)); - // fill state - $.each(this.options.setings, $.proxy(function (index, element) { + }, + + /** + * Iterate through the option settings and set each option's element configuration, + * attribute identifier. Set the state based on the attribute identifier. + * @private + */ + _fillState: function() { + $.each(this.options.settings, $.proxy(function(index, element) { var attributeId = element.id.replace(/[a-z]*/, ''); if (attributeId && this.options.spConfig.attributes[attributeId]) { element.config = this.options.spConfig.attributes[attributeId]; @@ -74,36 +131,63 @@ this.options.state[attributeId] = false; } }, this)); + }, + + /** + * Set each option's child settings, and next/prev option setting. Fill (initialize) + * an option's list of selections as needed or disable an option's setting. + * @private + */ + _setChildSettings: function() { var childSettings = []; - for (var j = this.options.setings.length - 1; j >= 0; j--) { - var prevSetting = this.options.setings[j - 1] ? this.options.setings[j - 1] : false; - var nextSetting = this.options.setings[j + 1] ? this.options.setings[j + 1] : false; + for (var j = this.options.settings.length - 1; j >= 0; j--) { + var prevSetting = this.options.settings[j - 1] ? this.options.settings[j - 1] : false, + nextSetting = this.options.settings[j + 1] ? this.options.settings[j + 1] : false; if (j === 0) { - this._fillSelect(this.options.setings[j]); + this._fillSelect(this.options.settings[j]); } else { - this.options.setings[j].disabled = true; + this.options.settings[j].disabled = true; } - this.options.setings[j].childsetings = childSettings.slice(0); - this.options.setings[j].prevSetting = prevSetting; - this.options.setings[j].nextSetting = nextSetting; - childSettings.push(this.options.setings[j]); + this.options.settings[j].childSettings = childSettings.slice(0); + this.options.settings[j].prevSetting = prevSetting; + this.options.settings[j].nextSetting = nextSetting; + childSettings.push(this.options.settings[j]); } - // Set values to inputs - this._configureForValues(); }, - _configureForValues: function () { + + /** + * Setup for all configurable option settings. Set the value of the option and configure + * the option, which sets its state, and initializes the option's choices, etc. + * @private + */ + _configureForValues: function() { if (this.options.values) { - this.options.setings.each($.proxy(function (index, element) { + this.options.settings.each($.proxy(function(index, element) { var attributeId = element.attributeId; - element.value = (typeof(this.options.values[attributeId]) === 'undefined') ? '' : this.options.values[attributeId]; + element.value = (typeof(this.options.values[attributeId]) === 'undefined') ? + '' : + this.options.values[attributeId]; this._configureElement(element); }, this)); } }, - _configure: function (event) { + + /** + * Event handler for configuring an option. + * @private + * @param event Event triggered to configure an option. + */ + _configure: function(event) { event.data._configureElement(this); }, - _configureElement: function (element) { + + /** + * Configure an option, initializing it's state and enabling related options, which + * populates the related option's selection and resets child option selections. + * @private + * @param element The element associated with a configurable option. + */ + _configureElement: function(element) { this._reloadOptionLabels(element); if (element.value) { this.options.state[element.config.id] = element.value; @@ -117,32 +201,117 @@ this._resetChildren(element); } this._reloadPrice(); + this._changeProductImage(); }, - _reloadOptionLabels: function (element) { - var selectedPrice = 0; - if (element.options[element.selectedIndex].config && !this.options.spConfig.stablePrices) { - selectedPrice = parseFloat(element.options[element.selectedIndex].config.price); + + /** + * Change displayed product image according to chosen options of configurable product + * @private + */ + _changeProductImage: function () { + var images = this.options.spConfig.images, + imagesArray = null; + $.each(this.options.settings, function (k, v) { + var selectValue = parseInt(v.value, 10), + attributeId = v.id.replace(/[a-z]*/, ''); + if (selectValue > 0 && attributeId) { + if (!imagesArray) { + imagesArray = images[attributeId][selectValue]; + } else { + var intersectedArray = {}; + $.each(imagesArray, function (productId) { + if (images[attributeId][selectValue][productId]) { + intersectedArray[productId] = images[attributeId][selectValue][productId]; + } + }); + imagesArray = intersectedArray; + } + } + }); + + var result = []; + $.each(imagesArray || {}, function() { + result.push(this); + }); + $('#image').attr('src', (result.length === 1 ? result.pop() : null) || this.options.parentImage); + + this._fitImageToContainer(); + }, + + /** + * Fit image to container when changing displayed product image according to chosen options + * @private + */ + _fitImageToContainer: function () { + var $image = $('#image'), + width = $image.width(), + height = $image.height(), + parentWidth = $image.parent().width(), + parentHeight = $image.parent().height(); + + // Image is smaller than parent container, no need to see full picture or zoom slider + if (width < parentWidth && height < parentHeight) { + return; + } + // Resize Image to fit parent container + $image.css({ + width: width > height ? parentWidth : '', + height: width > height ? '' : parentHeight, + top: width > height ? ((parentHeight - height) / 2) + 'px' : '', + left: width > height ? '' : ((parentWidth - width) / 2) + 'px' + }); + }, + + /** + * Option labels show the option value and its price. This method reloads these labels + * for a specified option. + * @private + * @param element The element associated with the configurable option. + */ + _reloadOptionLabels: function(element) { + if (!(element && element.options[element.selectedIndex])) { + return false; + } + var selectedPrice = 0, + selOption = element.options[element.selectedIndex]; + + if ('config' in selOption && selOption.config && !this.options.spConfig.stablePrices) { + selectedPrice = parseFloat(selOption.config.price); } for (var i = 0; i < element.options.length; i++) { if (element.options[i].config) { - element.options[i].text = this._getOptionLabel(element.options[i].config, element.options[i].config.price - selectedPrice); + element.options[i].text = + this._getOptionLabel(element.options[i].config, element.options[i].config.price - selectedPrice); } } }, - _resetChildren: function (element) { - if (element.childsetings) { - for (var i = 0; i < element.childsetings.length; i++) { - element.childsetings[i].selectedIndex = 0; - element.childsetings[i].disabled = true; + + /** + * For a given option element, reset all of its selectable options. Clear any selected + * index, disable the option choice, and reset the option's state if necessary. + * @private + * @param element The element associated with a configurable option. + */ + _resetChildren: function(element) { + if (element.childSettings) { + for (var i = 0; i < element.childSettings.length; i++) { + element.childSettings[i].selectedIndex = 0; + element.childSettings[i].disabled = true; if (element.config) { this.options.state[element.config.id] = false; } } } }, - _fillSelect: function (element) { - var attributeId = element.id.replace(/[a-z]*/, ''); - var options = this._getAttributeOptions(attributeId); + + /** + * Populates an option's selectable choices. + * @private + * @param element Element associated with a configurable option. + */ + _fillSelect: function(element) { + var attributeId = element.id.replace(/[a-z]*/, ''), + options = this._getAttributeOptions(attributeId); this._clearSelect(element); element.options[0] = new Option('', ''); element.options[0].innerHTML = this.options.spConfig.chooseText; @@ -176,7 +345,16 @@ } } }, - _getOptionLabel: function (option, price) { + + /** + * Generate the label associated with a configurable option. This includes the option's + * label or value and the option's price. + * @private + * @param option A single choice among a group of choices for a configurable option. + * @param price The price associated with the option choice. + * @return {String} The option label with option value and price (e.g. Black +1.99) + */ + _getOptionLabel: function(option, price) { price = parseFloat(price); var tax, incl, excl; if (this.options.taxConfig.includeTax) { @@ -188,24 +366,25 @@ excl = price; incl = excl + tax; } - - if (this.options.taxConfig.showIncludeTax || this.options.taxConfig.showBothPrices) { - price = incl; - } else { - price = excl; - } - + price = (this.options.taxConfig.showIncludeTax || this.options.taxConfig.showBothPrices) ? incl : excl; var str = option.label; if (price) { - if (this.options.taxConfig.showBothPrices) { - str += ' ' + this._formatPrice(excl, true) + ' (' + this._formatPrice(price, true) + ' ' + this.options.taxConfig.inclTaxTitle + ')'; - } else { + str = (this.options.taxConfig.showBothPrices) ? + str += ' ' + this._formatPrice(excl, true) + ' (' + this._formatPrice(price, true) + ' ' + this.options.taxConfig.inclTaxTitle + ')' : str += ' ' + this._formatPrice(price, true); - } } return str; }, - _formatPrice: function (price, showSign) { + + /** + * Format's the price of a configurable option's choice. Add sign as needed, round, + * and format the rounded price with the appropriate sign. + * @private + * @param price An option choice's price + * @param showSign Whether to show the sign as '-' or '+' in the formatted price. + * @return {String} Returns the formatted price with or without the sign. + */ + _formatPrice: function(price, showSign) { var str = ''; price = parseFloat(price); if (showSign) { @@ -218,40 +397,56 @@ } } var roundedPrice = (Math.round(price * 100) / 100).toString(); - if (this.options.spConfig.prices && this.options.spConfig.prices[roundedPrice]) { - str += this.options.spConfig.prices[roundedPrice]; - } - else { - str += this.options.spConfig.template.replace(/#\{(.*?)\}/, price.toFixed(2)); - } + str = (this.options.spConfig.prices && this.options.spConfig.prices[roundedPrice]) ? + str + this.options.spConfig.prices[roundedPrice] : + str + this.options.spConfig.template.replace(/#\{(.*?)\}/, price.toFixed(2)); return str; }, - _clearSelect: function (element) { + + /** + * Removes an option's selections. + * @private + * @param element The element associated with a configurable option. + */ + _clearSelect: function(element) { for (var i = element.options.length - 1; i >= 0; i--) { element.remove(i); } }, - _getAttributeOptions: function (attributeId) { + + /** + * Retrieve the attribute options associated with a specific attribute Id. + * @private + * @param attributeId The id of the attribute whose configurable options are sought. + * @return {Object} Object containing the attribute options. + */ + _getAttributeOptions: function(attributeId) { if (this.options.spConfig.attributes[attributeId]) { return this.options.spConfig.attributes[attributeId].options; } }, - _reloadPrice: function () { + + /** + * Reload the price of the configurable product incorporating the prices of all of the + * configurable product's option selections. + * @private + * @return {Number} The price of the configurable product including selected options. + */ + _reloadPrice: function() { if (this.options.spConfig.disablePriceReload) { return true; } - var price = 0; - var oldPrice = 0; - for (var i = this.options.setings.length - 1; i >= 0; i--) { - var selected = this.options.setings[i].options[this.options.setings[i].selectedIndex]; - if (selected.config) { + var price = 0, + oldPrice = 0; + for (var i = this.options.settings.length - 1; i >= 0; i--) { + var selected = this.options.settings[i].options[this.options.settings[i].selectedIndex]; + if (selected && selected.config) { price += parseFloat(selected.config.price); oldPrice += parseFloat(selected.config.oldPrice); } } - this.options.priceOptionInstance.changePrice('config', {'price': price, 'oldPrice': oldPrice}); - this.options.priceOptionInstance.reloadPrice(); + this.element.trigger('changePrice', {'config': 'config', 'price': {'price': price, 'oldPrice': oldPrice} }).trigger('reloadPrice'); return price; } }); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/app/code/core/Mage/Catalog/view/frontend/js/date-option.js b/app/code/core/Mage/Catalog/view/frontend/js/date-option.js new file mode 100644 index 0000000000000000000000000000000000000000..8f406e989f15e479a6689c48ff1824b22449ebc5 --- /dev/null +++ b/app/code/core/Mage/Catalog/view/frontend/js/date-option.js @@ -0,0 +1,107 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage date option + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +(function($) { + $.widget('mage.dateOption', { + _create: function() { + $(this.options.datepickerFieldSelector) + .on('change', $.proxy(function() {this.element.trigger('reloadPrice');}, this)); + $(this.options.monthSelector) + .on('change', $.proxy(function(event) {this._reloadMonth(event);}, this)); + $(this.options.yearSelector) + .on('change', $.proxy(function(event) {this._reloadMonth(event);}, this)); + }, + + /** + * Calculates the total number of days in the specified month in the specified year. + * Can be between 1-31 depending on the month (e.g. usually 28, 29, 30, or 31). + * @private + * @param month Numerical value of the month (e.g. 1-12) + * @param year Numerical value of the year (e.g. 2012) + * @return {Number} The number of days in the month of the year (e.g. 1-31) + */ + _getDaysInMonth: function(month, year) + { + return new Date(year, month, 0).getDate(); + }, + + /** + * Adds a new DOM option element to the given selector, typically a day selector. This + * is used for adjusting the number of available options (e.g. days of the month) based + * on which month and year has been chosen. + * @private + * @param select A select element, usually for the number of days in the month. + * @param text Text value that represents the numerical day for the new option. + * @param value Value that represents the numerical day for the new option. + */ + _addOption: function(select, text, value) + { + var option = document.createElement('OPTION'); + option.value = value; + option.text = text; + + if (select.options.add) { + select.options.add(option); + } else { + select.appendChild(option); + } + }, + + /** + * Adjusts the number of days in the day option element based on which month or year + * is selected (changed). Adjusts the days to 28, 29, 30, or 31 typically. + * @private + * @param event Event from an .on('change') for the month and year select elements. + * @return {(null|Boolean}} Returns false if the select element doesn't contain the + * right number of parts. Otherwise returns nothing. + */ + _reloadMonth: function(event) { + var selectEl = $(event.target), + idParts = selectEl.attr('id').split("_"); + + if (idParts.length !== 3) { + return false; + } + + var optionIdPrefix = "#" + idParts[0] + "_" + idParts[1], + month = parseInt($(optionIdPrefix + "_month").val(), 10), + year = parseInt($(optionIdPrefix + "_year").val(), 10), + dayEl = $(optionIdPrefix + "_day")[0], + days = this._getDaysInMonth(month, year); + + for (var i = dayEl.length - 1; i >= 0; i--) { + if (dayEl.options[i].value > days) { + dayEl.remove(dayEl.options[i].index); + } + } + + var lastDay = parseInt(dayEl.options[dayEl.length-1].value, 10); + for (i = lastDay + 1; i <= days; i++) { + this._addOption(dayEl, i, i); + } + } + }); +})(jQuery); + diff --git a/app/code/core/Mage/Catalog/view/frontend/js/file-option.js b/app/code/core/Mage/Catalog/view/frontend/js/file-option.js index 354d49d13500491975d1ac2d64ac43c927242f42..358684e9def2a55b1822484571d7fd3839c1c2d6 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/file-option.js +++ b/app/code/core/Mage/Catalog/view/frontend/js/file-option.js @@ -42,6 +42,11 @@ }, this)); }, + /** + * Toggles whether the current file is being changed or not. If the file is being deleted + * then the option to change the file is disabled. + * @private + */ _toggleFileChange: function() { this.element.toggle(); this.fileChangeFlag = !this.fileChangeFlag; @@ -51,6 +56,12 @@ } }, + /** + * Toggles whether the file is to be deleted. When the file is being deleted, the name of + * the file is decorated with strike-through text and the option to change the file is + * disabled. + * @private + */ _toggleFileDelete: function() { this.fileDeleteFlag = $(this.options.deleteFileSelector + ':checked').val(); $(this.inputFieldAction).attr('value', diff --git a/app/code/core/Mage/Catalog/view/frontend/js/list.js b/app/code/core/Mage/Catalog/view/frontend/js/list.js index bb35676e03856b2b6fa754abb20fca5037269e67..6e7b80dd8b0a282eb3a0f1a1fd36615ef43bfddb 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/list.js +++ b/app/code/core/Mage/Catalog/view/frontend/js/list.js @@ -23,64 +23,43 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /*jshint browser:true jquery:true*/ +(function ($, window) { + $.widget('mage.compareList', { + _create: function() { + this.element.decorate('table'); -(function ($) { - $(document).ready(function () { - var _compareList = { - productSelector: null, - productImageSelector: null, - productAddToCartSelector: null, - productWishListSelector: null, - productRemoveSelector: null, - productFormSelector: null, - ajaxSpinner: null, - windowCloseSelector: null, - printSelector: null - }; - - $.mage.event.trigger('mage.compare-list.initialize', _compareList); - $(_compareList.productFormSelector).decorate('table'); + $(this.options.windowCloseSelector).on('click', function() { + window.close(); + }); - function _setParentWindow(selector) { - $(selector).on('click', function (e) { + $(this.options.windowPrintSelector).on('click', function(e) { e.preventDefault(); - window.opener.focus(); - window.opener.location.href = $(this).data('url'); + window.print(); }); - } - - // Window close - $(_compareList.windowCloseSelector).on('click', function () { - window.close(); - }); - // Window print - $(_compareList.printSelector).on('click', function (e) { - e.preventDefault(); - window.print(); - }); - $(_compareList.productRemoveSelector).on('click', function (e) { - e.preventDefault(); - // Send remove item request, after that reload windows - $.ajax({ - url: $(_compareList.productRemoveSelector).data('url'), - type: 'POST', - beforeSend: function () { - $(_compareList.ajaxSpinner).show(); - } - }).done(function () { - $(_compareList.ajaxSpinner).hide(); - window.location.reload(); - window.opener.location.reload(); + var ajaxSpinner = $(this.options.ajaxSpinner); + $(this.options.productRemoveSelector).on('click', function(e) { + e.preventDefault(); + $.ajax({ + url: $(e.target).data('url'), + type: 'POST', + beforeSend: function() { + ajaxSpinner.show(); + } + }).done(function() { + ajaxSpinner.hide(); + window.location.reload(); + window.opener.location.reload(); + }); }); - }); - $.each(_compareList, function (index, prop) { - // Removed properties that doesn't need to call _setParentWindow - var notAllowedProp = ['windowCloseSelector', 'printSelector', 'productRemoveSelector', 'ajaxSpinner','productFormSelector']; - if ($.inArray(index, notAllowedProp) === -1) { - _setParentWindow(prop); - } - }); + $.each(this.options.selectors, function(i, selector) { + $(selector).on('click', function(e) { + e.preventDefault(); + window.opener.focus(); + window.opener.location.href = $(this).data('url'); + }); + }); + } }); -})(jQuery); \ No newline at end of file +})(jQuery, window); diff --git a/app/code/core/Mage/Catalog/view/frontend/js/mage-attributes-processing.js b/app/code/core/Mage/Catalog/view/frontend/js/mage-attributes-processing.js index 7a7f2c143778174e2d00425345e25eff361643d6..11972a56986c36518399afe075f9317be93ebd53 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/mage-attributes-processing.js +++ b/app/code/core/Mage/Catalog/view/frontend/js/mage-attributes-processing.js @@ -29,11 +29,11 @@ var data = eval("(" + $(this).attr('data-mage-redirect') + ")"); $(this).on(data.event, function () { if (data.url) { - $(location).attr('href', data.url); + location.href = data.url; } else { - $(location).attr('href', $(this).val()); + location.href = $(this).val(); } }); }); }); -}(jQuery)); \ No newline at end of file +}(jQuery)); diff --git a/app/code/core/Mage/Catalog/view/frontend/js/msrp.js b/app/code/core/Mage/Catalog/view/frontend/js/msrp.js index e3333f28f27770866e5a25e6813bc6576658e1dd..950f395d0db687bffd4d433eb7c771e123452c22 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/msrp.js +++ b/app/code/core/Mage/Catalog/view/frontend/js/msrp.js @@ -23,46 +23,39 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/*jshint browser:true jquery:true*/ -(function ($) { - - var _clickForPrice = { - helpLink: [] - }; - var _popupCloseData = { - closeButtonId: '' - }; - - var _helpLinkData = { - helpText: [] - }; - - var _popupCartData = { - cartData: [] - }; - - var _cartData = { - cartFormData: [] - }; - - $(document).ready(function () { - $.mage.event.trigger("mage.price.helplink", _clickForPrice); - $.mage.event.trigger("map.popup.close", _popupCloseData); - $.mage.event.trigger("mage.popup.whatsthislink", _helpLinkData); - $.mage.event.trigger("map.popup.button", _popupCartData); - $.mage.event.trigger("product.addtocart.button", _cartData); - $.mage.event.trigger("product.updatecart.button", _cartData); - - $.each(_clickForPrice.helpLink, function (index, value) { - - $(value.popupId).on('click', function (e) { - if(value.submitUrl){ - location.href=value.submitUrl; +/*jshint evil:true browser:true jquery:true*/ +(function($) { + $.widget('mage.addToCart', { + options: { + groupedProductContainer: '.grouped-items-table' + }, + + _create: function() { + $(this.options.cartButtonId).on('click', $.proxy(function() { + this._addToCartSubmit(); + }, this)); + + if (this.element.parents(this.options.groupedProductContainer).length > 0) { + this.options.clickUpdate = true; + } + + if (!$('#map-popup-price').html() && this.options.realPrice && !this.options.clickUpdate) { + $('#map-popup-price').html($(this.options.realPrice)); + $('#map-popup-msrp').html(this.options.msrpPrice); + } + + $(this.options.popupId).on('click', $.proxy(function(e) { + if (this.options.submitUrl) { + location.href = this.options.submitUrl; } else { - $('#map-popup-heading').text(value.productName); - $('#map-popup-price').html($(value.realPrice)); - $('#map-popup-msrp').html(value.msrpPrice); - + $(this.options.popupCartButtonId).on('click', $.proxy(function() { + this._addToCartSubmit(); + }, this)); + $('#map-popup-heading').text(this.options.productName); + if (this.options.clickUpdate) { + $('#map-popup-price').html($(this.options.realPrice)); + $('#map-popup-msrp').html(this.options.msrpPrice); + } var width = $('#map-popup').width(); var offsetX = e.pageX - (width / 2) + "px"; $('#map-popup').css({left: offsetX, top: e.pageY}).show(); @@ -71,13 +64,10 @@ $('#map-popup-text-what-this').hide(); return false; } - }); + }, this)); - }); - - $.each(_helpLinkData.helpText, function (index, value) { - $(value.helpLinkId).on('click', function (e) { - $('#map-popup-heading').text(value.productName); + $(this.options.helpLinkId).on('click', $.proxy(function(e) { + $('#map-popup-heading').text(this.options.productName); var width = $('#map-popup').width(); var offsetX = e.pageX - (width / 2) + "px"; $('#map-popup').css({left: offsetX, top: e.pageY}).show(); @@ -85,60 +75,28 @@ $('#map-popup-text').hide(); $('#map-popup-text-what-this').show(); return false; - }); - }); + }, this)); - $(_popupCloseData.closeButtonId).on('click', function () { - $('#map-popup').hide(); - return false; - }); + $(this.options.closeButtonId).on('click', $.proxy(function() { + $('#map-popup').hide(); + return false; + }, this)); - $.each($.merge(_cartData.cartFormData, _popupCartData.cartData), function (index, value) { - $(value.cartButtonId).on('click', function () { + }, - if(value.cartForm){ - $(value.cartForm).mage().validate({ - errorPlacement: function (error, element) { - if (element.is(':radio') || element.is(':checkbox')) { - element.closest('ul').after(error); - } else { - element.after(error); - } - }, - highlight: function (element) { - if ($(element).is(':radio') || $(element).is(':checkbox')) { - $(element).closest('ul').addClass('mage-error'); - } else { - $(element).addClass('mage-error'); - } - }, - unhighlight: function (element) { - if ($(element).is(':radio') || $(element).is(':checkbox')) { - $(element).closest('ul').removeClass('mage-error'); - } else { - $(element).removeClass('mage-error'); - } - } - }); - } - if(value.addToCartUrl) { - if($('#map-popup')){ - $('#map-popup').hide(); - } - if(opener !== null){ - opener.location.href=value.addToCartUrl; - } else { - location.href=value.addToCartUrl; - } - - }else if(value.cartForm){ - $(value.cartForm).submit(); + _addToCartSubmit: function() { + if (this.options.addToCartUrl) { + $('#map-popup').hide(); + if (opener !== null) { + opener.location.href = this.options.addToCartUrl; + } else { + location.href = this.options.addToCartUrl; } - }); - }); - + } else if (this.options.cartForm) { + $(this.options.cartForm).submit(); + } + } }); - })(jQuery); diff --git a/app/code/core/Mage/Catalog/view/frontend/js/price-option.js b/app/code/core/Mage/Catalog/view/frontend/js/price-option.js index 5518b82e138918c16c1e54a7bb742e05d1d51434..f8b6e037f48a9caef3aeeed915dd854d13f5a3a9 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/price-option.js +++ b/app/code/core/Mage/Catalog/view/frontend/js/price-option.js @@ -24,48 +24,53 @@ */ /*jshint evil:true browser:true jquery:true*/ -(function ($, undefined) { +(function($, undefined) { + "use strict"; $.widget('mage.priceOption', { options: { productCustomSelector: '.product-custom-option', - prices: {} + mapPopupPrice: '#map-popup-price', + prices: {}, + priceTemplate: '<span class="price">${formattedPrice}</span>' }, - _create: function () { + _create: function() { + + this.element.on('changePrice', $.proxy(function(e, data) { + this.changePrice(data.config, data.price); + }, this)).on('reloadPrice', $.proxy(function() { + this.reloadPrice(); + }, this)); + $(this.options.productCustomSelector).each( - $.proxy(function (key, value) { - var element = $(value); - if (element.attr('type') === 'checkbox' || element.attr('type') === 'radio') { - element.on('click', $.proxy(this.reloadPrice, this)); - } - else if (element.prop('tagName') === 'SELECT' || - element.prop('tagName') === 'TEXTAREA' || - element.attr('type') === 'text' || element.attr('type') === 'file') { - element.on('change', $.proxy(this.reloadPrice, this)); - } + $.proxy(function(key, value) { + var element = $(value), + inputs = element.filter(":input"), + isNotCheckboxRadio = inputs.is(':not(":checkbox, :radio")'); + element.on((isNotCheckboxRadio ? 'change' : 'click'), $.proxy(this.reloadPrice, this)); }, this) ); }, - _formatCurrency: function (price, format, showPlus) { - var precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision; - var integerRequired = isNaN(format.integerRequired = Math.abs(format.integerRequired)) ? 1 : format.integerRequired; - var decimalSymbol = format.decimalSymbol === undefined ? "," : format.decimalSymbol; - var groupSymbol = format.groupSymbol === undefined ? "." : format.groupSymbol; - var groupLength = format.groupLength === undefined ? 3 : format.groupLength; - var s = ''; + _formatCurrency: function(price, format, showPlus) { + var precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision, + integerRequired = isNaN(format.integerRequired = Math.abs(format.integerRequired)) ? 1 : format.integerRequired, + decimalSymbol = format.decimalSymbol === undefined ? "," : format.decimalSymbol, + groupSymbol = format.groupSymbol === undefined ? "." : format.groupSymbol, + groupLength = format.groupLength === undefined ? 3 : format.groupLength, + s = ''; if (showPlus === undefined || showPlus === true) { s = price < 0 ? "-" : ( showPlus ? "+" : ""); } else if (showPlus === false) { s = ''; } - var i = parseInt(price = Math.abs(+price || 0).toFixed(precision), 10) + ''; - var pad = (i.length < integerRequired) ? (integerRequired - i.length) : 0; + var i = parseInt(price = Math.abs(+price || 0).toFixed(precision), 10) + '', + pad = (i.length < integerRequired) ? (integerRequired - i.length) : 0; while (pad) { i = '0' + i; pad--; } - var j = i.length > groupLength ? i.length % groupLength : 0; - var re = new RegExp("(\\d{" + groupLength + "})(?=\\d)", "g"); + var j = i.length > groupLength ? i.length % groupLength : 0, + re = new RegExp("(\\d{" + groupLength + "})(?=\\d)", "g"); /** * replace(/-/, 0) is only for fixing Safari bug which appears @@ -73,51 +78,50 @@ * Result is "0.-0" :( */ var r = (j ? i.substr(0, j) + groupSymbol : "") + i.substr(j).replace(re, "$1" + groupSymbol) + - (precision ? decimalSymbol + Math.abs(price - i).toFixed(precision).replace(/-/, 0).slice(2) : ""); - var pattern = ''; - pattern = format.pattern.indexOf('{sign}') < 0 ? s + format.pattern : format.pattern.replace('{sign}', s); + (precision ? decimalSymbol + Math.abs(price - i).toFixed(precision).replace(/-/, 0).slice(2) : ""), + pattern = format.pattern.indexOf('{sign}') < 0 ? s + format.pattern : format.pattern.replace('{sign}', s); return pattern.replace('%s', r).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); - }, - changePrice: function (key, price) { + changePrice: function(key, price) { this.options.prices[key] = price; }, - _getOptionPrices: function () { - var price = 0; - var oldPrice = 0; - $.each(this.options.prices, function (key, pair) { + _getOptionPrices: function() { + var price = 0, + oldPrice = 0; + $.each(this.options.prices, function(key, pair) { price += parseFloat(pair.price); oldPrice += parseFloat(pair.oldPrice); }); var result = [price, oldPrice]; return result; }, - reloadPrice: function () { + reloadPrice: function() { if (this.options.priceConfig) { - var priceSelectors = [ - '#product-price-' + this.options.priceConfig.productId, - '#bundle-price-' + this.options.priceConfig.productId, - '#price-including-tax-' + this.options.priceConfig.productId, - '#price-excluding-tax-' + this.options.priceConfig.productId, - '#old-price-' + this.options.priceConfig.productId - ]; - var getOptionPrices = this._getOptionPrices(); - var optionPrice = { - excludeTax: 0, - includeTax: 0, - oldPrice: 0, - price: 0, - update: function (price, excludeTax, includeTax, oldPrice) { - this.price += price; - this.excludeTax += excludeTax; - this.includeTax += includeTax; - this.oldPrice += oldPrice; - } - }; - $(this.options.productCustomSelector).each($.proxy(function (key, elements) { + var skipIds = [], + priceSelectors = [ + '#product-price-' + this.options.priceConfig.productId, + '#bundle-price-' + this.options.priceConfig.productId, + '#price-including-tax-' + this.options.priceConfig.productId, + '#price-excluding-tax-' + this.options.priceConfig.productId, + '#old-price-' + this.options.priceConfig.productId + ], + getOptionPrices = this._getOptionPrices(), + optionPrice = { + excludeTax: 0, + includeTax: 0, + oldPrice: 0, + price: 0, + update: function(price, excludeTax, includeTax, oldPrice) { + this.price += price; + this.excludeTax += excludeTax; + this.includeTax += includeTax; + this.oldPrice += oldPrice; + } + }; + $(this.options.productCustomSelector).each($.proxy(function(key, elements) { var element = $(elements); var optionIdStartIndex, optionIdEndIndex; - if (element.attr('type') === 'file') { + if (element.is(":file")) { optionIdStartIndex = element.attr('name').indexOf('_') + 1; optionIdEndIndex = element.attr('name').lastIndexOf('_'); } else { @@ -127,8 +131,8 @@ var optionId = parseInt(element.attr('name').substring(optionIdStartIndex, optionIdEndIndex), 10); if (this.options.optionConfig[optionId]) { var configOptions = this.options.optionConfig[optionId]; - if (element.attr('type') === 'checkbox' || element.attr('type') === 'radio') { - if (element.prop('checked')) { + if (element.is(":checkbox, :radio")) { + if (element.is(":checked")) { if (configOptions[element.val()]) { optionPrice.update(configOptions[element.val()].price, configOptions[element.val()].excludeTax, @@ -136,8 +140,20 @@ configOptions[element.val()].oldPrice); } } - } else if (element.prop('tagName') === 'SELECT') { - element.find('option:selected').each(function () { + } else if (element.hasClass('datetime-picker') && ($.inArray(optionId, skipIds) === -1)) { + var dateSelected = true; + $('.datetime-picker[id^="options_' + optionId + '"]').each(function() { + if ($(this).val() === '') { + dateSelected = false; + } + }); + if (dateSelected) { + optionPrice.update(configOptions.price, configOptions.excludeTax, + configOptions.includeTax, configOptions.oldPrice); + skipIds[optionId] = optionId; + } + } else if (element.is('select')) { + element.find(':selected').each(function() { if (configOptions[$(this).val()]) { optionPrice.update(configOptions[$(this).val()].price, configOptions[$(this).val()].excludeTax, @@ -145,12 +161,12 @@ configOptions[$(this).val()].oldPrice); } }); - } else if (element.prop('tagName') === 'TEXTAREA' || element.attr('type') === 'text') { + } else if (element.is('textarea,:text')) { if (element.val()) { optionPrice.update(configOptions.price, configOptions.excludeTax, configOptions.includeTax, configOptions.oldPrice); } - } else if (element.attr('type') === 'file') { + } else if (element.is(":file")) { if (element.val() || element.parent('div').siblings().length > 0) { optionPrice.update(configOptions.price, configOptions.excludeTax, configOptions.includeTax, configOptions.oldPrice); @@ -165,9 +181,9 @@ productPrice: optionPrice.price + this.options.priceConfig.productPrice }; // Loop through each priceSelector and update price - $.each(priceSelectors, $.proxy(function (index, value) { - var priceElement = $(value); - var clone = $(value + this.options.priceConfig.idSuffix); + $.each(priceSelectors, $.proxy(function(index, value) { + var priceElement = $(value), + clone = $(value + this.options.priceConfig.idSuffix); var isClone = false; if (priceElement.length === 0) { priceElement = clone; @@ -191,11 +207,13 @@ } price = price + getOptionPrices[0]; - priceElement.html("<span class='price'>" + this._formatCurrency(price, this.options.priceConfig.priceFormat) + "</span>"); + var priceHtml = $.tmpl(this.options.priceTemplate, {'formattedPrice': this._formatCurrency(price, this.options.priceConfig.priceFormat)}); + priceElement.html(priceHtml[0].outerHTML); // If clone exists, update clone price as well if (!isClone && clone.length === 1) { - clone.html("<span class='price'>" + this._formatCurrency(price, this.options.priceConfig.priceFormat) + "</span>"); + clone.html(priceHtml[0].outerHTML); } + $(this.options.mapPopupPrice).find(value).html(priceHtml); } }, this)); } diff --git a/app/code/core/Mage/Catalog/view/frontend/js/zoom.js b/app/code/core/Mage/Catalog/view/frontend/js/zoom.js index 5efada5bc591cfc573adfbff509322da02653bd8..6e50f959cd84a963fdd63bd01388e03335023b51 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/zoom.js +++ b/app/code/core/Mage/Catalog/view/frontend/js/zoom.js @@ -22,176 +22,190 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/*jshint evil:true browser:true jquery:true*/ -(function ($) { - $(document).ready(function () { - // Default zoom variables - var zoomInit = { - imageSelector: '#image', - sliderSelector: '#slider', - sliderSpeed: 10, - zoomNoticeSelector: '#track_hint', - zoomInSelector: '#zoom_in', - zoomOutSelector: '#zoom_out' - }; - $.mage.event.trigger("mage.zoom.initialize", zoomInit); +/*jshint evil:true browser:true jquery:true expr:true*/ +(function($) { + $.widget('mage.zoom', { + options: { + sliderSpeed: 10 + }, - var slider, intervalId = null; - var sliderMax = $(zoomInit.sliderSelector).width(); - var image = $(zoomInit.imageSelector); - var imageWidth = image.width(); - var imageHeight = image.height(); - var imageParent = image.parent(); - var imageParentWidth = imageParent.width(); - var imageParentHeight = imageParent.height(); - var ceilingZoom, imageInitTop, imageInitLeft; - var showFullImage = false; + _create: function() { + this.sliderMax = $(this.options.sliderSelector).width(); + this.image = this.element; + this.imageWidth = this.image.width(); + this.imageHeight = this.image.height(); + this.imageParent = this.image.parent(); + this.imageParentWidth = this.imageParent.width(); + this.imageParentHeight = this.imageParent.height(); + this.showFullImage = false; - // Image is small than parent container, no need to see full picutre or zoom slider - if (imageWidth < imageParentWidth && imageHeight < imageParentHeight) { - $(zoomInit.sliderSelector).parent().hide(); - $(zoomInit.zoomNoticeSelector).hide(); - return; - } - // Resize Image to fit parent container - if (imageWidth > imageHeight) { - ceilingZoom = imageWidth / imageParentWidth; - image.width(imageParentWidth); - image.css('top', ((imageParentHeight - image.height()) / 2) + 'px'); - } else { - ceilingZoom = imageHeight / imageParentHeight; - image.height(imageParentHeight); - image.css('left', ((imageParentWidth - image.width()) / 2) + 'px'); - } - // Remember Image original position - imageInitTop = image.position().top; - imageInitLeft = image.position().left; + if (!this._isZoomable()) { + return; + } + this._initialResize(); + + // Slide slider to zoom in or out the picture + this.slider = $(this.options.sliderSelector).slider({ + value: 0, + min: 0, + max: this.sliderMax, + slide: $.proxy(function(event, ui) { + this._zoom(ui.value, this.sliderMax); + }, this), + change: $.proxy(function(event, ui) { + this._zoom(ui.value, this.sliderMax); + }, this) + }); + + // Mousedown on zoom in icon to zoom in picture + $(this.options.zoomInSelector).on('mousedown', $.proxy(function() { + this.intervalId = setInterval($.proxy(function() { + this.slider.slider('value', this.slider.slider('value') + 1); + }, this), this.options.sliderSpeed); + }, this)).on('mouseup mouseleave', $.proxy(function() { + clearInterval(this.intervalId); + }, this)); - // Make Image Draggable - function draggableImage() { - var topX = image.offset().left, - topY = image.offset().top, - bottomX = image.offset().left, - bottomY = image.offset().top; + // Mousedown on zoom out icon to zoom out picture + $(this.options.zoomOutSelector).on('mousedown', $.proxy(function() { + this.intervalId = setInterval($.proxy(function() { + this.slider.slider('value', this.slider.slider('value') - 1); + }, this), this.options.sliderSpeed); + }, this)).on('mouseup mouseleave', $.proxy(function() { + clearInterval(this.intervalId); + }, this)); + + // Double-click image to see full picture + this.element.on('dblclick', $.proxy(function() { + this.showFullImage = !this.showFullImage; + var ratio = this.showFullImage ? this.sliderMax : this.slider.slider('value'); + this._zoom(ratio, this.sliderMax); + if (this.showFullImage) { + $(this.options.sliderSelector).hide(); + $(this.options.zoomInSelector).hide(); + $(this.options.zoomOutSelector).hide(); + this.imageParent.css({'overflow': 'visible', 'zIndex': '1000'}); + } else { + $(this.options.sliderSelector).show(); + $(this.options.zoomInSelector).show(); + $(this.options.zoomOutSelector).show(); + this.imageParent.css({'overflow': 'hidden', 'zIndex': '9'}); + } + }, this)); + + // Window resize will change offset for draggable + $(window).resize(this._draggableImage()); + }, + + /** + * If image dimension is smaller than parent container, disable zoom + * @private + */ + _isZoomable: function() { + if (this.imageWidth <= this.imageParentWidth && this.imageHeight <= this.imageParentHeight) { + $(this.options.sliderSelector).parent().hide(); + $(this.options.zoomNoticeSelector).hide(); + return false; + } + return true; + }, + + /** + * Resize image to fit parent container and set initial image dimension + * @private + */ + _initialResize: function() { + if (this.imageWidth > this.imageHeight) { + this.ceilingZoom = this.imageWidth / this.imageParentWidth; + this.image.width(this.imageParentWidth); + this.image.css('top', ((this.imageParentHeight - this.image.height()) / 2) + 'px'); + } else { + this.ceilingZoom = this.imageHeight / this.imageParentHeight; + this.image.height(this.imageParentHeight); + this.image.css('left', ((this.imageParentWidth - this.image.width()) / 2) + 'px'); + } + // Remember Image original position + this.imageInitTop = this.image.position().top; + this.imageInitLeft = this.image.position().left; + }, + + /** + * Make Image draggable inside parent container dimension + * @private + */ + _draggableImage: function() { + var topX = this.image.offset().left, + topY = this.image.offset().top, + bottomX = this.image.offset().left, + bottomY = this.image.offset().top; // Calculate x offset if image width is greater than image container width - if (image.width() > imageParentWidth) { - topX = image.width() - (imageParent.offset().left - image.offset().left) - imageParentWidth; - topX = image.offset().left - topX; - bottomX = imageParent.offset().left - image.offset().left; - bottomX = image.offset().left + bottomX; + if (this.image.width() > this.imageParentWidth) { + topX = this.image.width() - (this.imageParent.offset().left - + this.image.offset().left) - this.imageParentWidth; + topX = this.image.offset().left - topX; + bottomX = this.imageParent.offset().left - this.image.offset().left; + bottomX = this.image.offset().left + bottomX; } // Calculate y offset if image height is greater than image container height - if (image.height() > imageParentHeight) { - topY = image.height() - (imageParent.offset().top - image.offset().top) - imageParentHeight; - topY = image.offset().top - topY; - bottomY = imageParent.offset().top - image.offset().top; - bottomY = image.offset().top + bottomY; + if (this.image.height() > this.imageParentHeight) { + topY = this.image.height() - (this.imageParent.offset().top - + this.image.offset().top) - this.imageParentHeight; + topY = this.image.offset().top - topY; + bottomY = this.imageParent.offset().top - this.image.offset().top; + bottomY = this.image.offset().top + bottomY; } // containment field is used because image is larger than parent container - $(zoomInit.imageSelector).draggable({ + this.element.draggable({ containment: [topX, topY, bottomX, bottomY], scroll: false }); - } + }, - // Image zooming bases on slider position - function zoom(sliderPosition, sliderLength) { + /** + * Resize image based on slider position + * @param sliderPosition - current slider position (0 to slider track max length) + * @param sliderLength - slider track max length + * @private + */ + _zoom: function(sliderPosition, sliderLength) { var ratio = sliderPosition / sliderLength; ratio = ratio > 1 ? 1 : ratio; - var imageOldLeft = image.position().left; - var imageOldTop = image.position().top; - var imageOldWidth = image.width(); - var imageOldHeight = image.height(); - var overSize = (imageWidth > imageParentWidth || imageHeight > imageParentHeight); + var imageOldLeft = this.image.position().left; + var imageOldTop = this.image.position().top; + var imageOldWidth = this.image.width(); + var imageOldHeight = this.image.height(); + var overSize = (this.imageWidth > this.imageParentWidth || this.imageHeight > this.imageParentHeight); var floorZoom = 1; - var imageZoom = floorZoom + (ratio * (ceilingZoom - floorZoom)); + var imageZoom = floorZoom + (ratio * (this.ceilingZoom - floorZoom)); // Zoomed image is larger than container, and resize image based on zoom ratio if (overSize) { - if (imageWidth > imageHeight) { - image.width(imageZoom * imageParentWidth); - } else { - image.height(imageZoom * imageParentHeight); - } + this.imageWidth > this.imageHeight ? this.image.width(imageZoom * this.imageParentWidth) : + this.image.height(imageZoom * this.imageParentHeight); } else { - $(zoomInit.sliderSelector).hide(); + $(this.options.sliderSelector).hide(); } // Position zoomed image properly - var imageNewLeft = imageOldLeft - (image.width() - imageOldWidth) / 2; - var imageNewTop = imageOldTop - (image.height() - imageOldHeight) / 2; + var imageNewLeft = imageOldLeft - (this.image.width() - imageOldWidth) / 2; + var imageNewTop = imageOldTop - (this.image.height() - imageOldHeight) / 2; // Image can't be positioned more left than original left - if (imageNewLeft > imageInitLeft || image.width() < imageParentWidth) { - imageNewLeft = imageInitLeft; + if (imageNewLeft > this.imageInitLeft || this.image.width() < this.imageParentWidth) { + imageNewLeft = this.imageInitLeft; } // Image can't be positioned more right than the difference between parent width and image current width - if (Math.abs(imageNewLeft) > Math.abs(imageParentWidth - image.width())) { - imageNewLeft = imageParentWidth - image.width(); + if (Math.abs(imageNewLeft) > Math.abs(this.imageParentWidth - this.image.width())) { + imageNewLeft = this.imageParentWidth - this.image.width(); } // Image can't be positioned more down than original top - if (imageNewTop > imageInitTop || image.height() < imageParentHeight) { - imageNewTop = imageInitTop; + if (imageNewTop > this.imageInitTop || this.image.height() < this.imageParentHeight) { + imageNewTop = this.imageInitTop; } // Image can't be positioned more top than the difference between parent height and image current height - if (Math.abs(imageNewTop) > Math.abs(imageParentHeight - image.height())) { - imageNewTop = imageParentHeight - image.height(); + if (Math.abs(imageNewTop) > Math.abs(this.imageParentHeight - this.image.height())) { + imageNewTop = this.imageParentHeight - this.image.height(); } - image.css('left', imageNewLeft + 'px'); - image.css('top', imageNewTop + 'px'); - // Because image size and position changed, we need to call recalculate draggable image containment - draggableImage(); + this.image.css({'left': imageNewLeft + 'px', 'top': imageNewTop + 'px'}); + // Because image size and position changed, we need to recalculate draggable image containment + this._draggableImage(); } - - // Slide slider to zoom in or out the picture - slider = $(zoomInit.sliderSelector).slider({ - value: 0, - min: 0, - max: sliderMax, - slide: function (event, ui) { - zoom(ui.value, sliderMax); - }, - change: function (event, ui) { - zoom(ui.value, sliderMax); - } - }); - - // Mousedown on zoom in icon to zoom in picture - $(zoomInit.zoomInSelector).on('mousedown',function () { - intervalId = setInterval(function () { - slider.slider('value', slider.slider('value') + 1); - }, zoomInit.sliderSpeed); - }).on('mouseup mouseleave', function () { - clearInterval(intervalId); - }); - - // Mousedown on zoom out icon to zoom out picture - $(zoomInit.zoomOutSelector).on('mousedown',function () { - intervalId = setInterval(function () { - slider.slider('value', slider.slider('value') - 1); - }, zoomInit.sliderSpeed); - }).on('mouseup mouseleave', function () { - clearInterval(intervalId); - }); - - // Double-click image to see full picture - $(zoomInit.imageSelector).on('dblclick', function () { - showFullImage = !showFullImage; - var ratio = showFullImage ? sliderMax : slider.slider('value'); - zoom(ratio, sliderMax); - if (showFullImage) { - $(zoomInit.sliderSelector).hide(); - $(zoomInit.zoomInSelector).hide(); - $(zoomInit.zoomOutSelector).hide(); - imageParent.css('overflow', 'visible'); - imageParent.css('zIndex', '1000'); - } else { - $(zoomInit.sliderSelector).show(); - $(zoomInit.zoomInSelector).show(); - $(zoomInit.zoomOutSelector).show(); - imageParent.css('overflow', 'hidden'); - imageParent.css('zIndex', '9'); - } - }); - - // Window resize will change offset for draggable - $(window).resize(draggableImage); }); }(jQuery)); \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/view/frontend/layout.xml b/app/code/core/Mage/Catalog/view/frontend/layout.xml index 7bd2167e46a64c0fcf4192285540c710b5aa71a9..6fb9a182f12207cb50ca15efbc95c0a12002008b 100644 --- a/app/code/core/Mage/Catalog/view/frontend/layout.xml +++ b/app/code/core/Mage/Catalog/view/frontend/layout.xml @@ -161,6 +161,7 @@ Product view <reference name="head"> <action method="addJs"><file>varien/product.js</file></action> <action method="addJs"><file>varien/configurable.js</file></action> + <action method="addCss"><file>Mage_Catalog::zoom.css</file></action> </reference> <update handle="page_calendar"/> <reference name="content"> @@ -195,7 +196,6 @@ Product view <block type="Mage_Core_Block_Template" name="product.info.container" as="options_container"> <block type="Mage_Catalog_Block_Product_View" name="product.info.options.wrapper" as="product_options_wrapper" template="product/view/options/wrapper.phtml" translate="label"> <label>Info Column Options Wrapper</label> - <block type="Mage_Core_Block_Template" name="options_js" template="Mage_Catalog::product/view/options/js.phtml"/> <block type="Mage_Catalog_Block_Product_View_Options" name="product.info.options" as="product_options" template="product/view/options.phtml"> <action method="addOptionRenderer"><type>text</type><block>Mage_Catalog_Block_Product_View_Options_Type_Text</block><template>product/view/options/type/text.phtml</template></action> <action method="addOptionRenderer"><type>file</type><block>Mage_Catalog_Block_Product_View_Options_Type_File</block><template>product/view/options/type/file.phtml</template></action> diff --git a/app/code/core/Mage/Catalog/view/frontend/msrp.js b/app/code/core/Mage/Catalog/view/frontend/msrp.js deleted file mode 100644 index 9340c55bbad3f4a3f8b98c3753c03b939768e788..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Catalog/view/frontend/msrp.js +++ /dev/null @@ -1,368 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package base_default - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -if (!window.Catalog) { - window.Catalog = {}; -} - -Catalog.Map = { - - helpLinks: [], - - active: false - -// addHelpLink: function(linkElement, title, actualPrice, msrpPrice, addToCartLink) { -// if (typeof linkElement == 'string') { -// linkElement = $$(linkElement)[0]; -// } -// -// if (!linkElement) { -// return; -// } -// -// var helpLink = { -// 'link': linkElement -// }; -// -// var showPopup = false; -// -// if (typeof title == 'string' && title) { -// helpLink.title = title; -// showPopup = true; -// } -// -// if (typeof actualPrice == 'string' && actualPrice || typeof actualPrice == 'object' && actualPrice) { -// helpLink.price = actualPrice; -// showPopup = true; -// } -// -// if (typeof msrpPrice == 'string' && msrpPrice) { -// helpLink.msrp = msrpPrice; -// showPopup = true; -// } -// -// if (typeof addToCartLink == 'string' && addToCartLink) { -// helpLink.cartLink = addToCartLink; -// } else if (addToCartLink && addToCartLink.url) { -// helpLink.cartLink = addToCartLink.url; -// if (addToCartLink.qty) { -// helpLink.qty = addToCartLink.qty; -// } -// if (addToCartLink.notUseForm) { -// helpLink.notUseForm = addToCartLink.notUseForm; -// } -// } -// -// if (!showPopup) { -// this.setGotoView(linkElement, addToCartLink); -// } else { -// var helpLinkIndex = this.helpLinks.push(helpLink) - 1; -// Event.observe(linkElement, 'click', this.showHelp.bind(this.helpLinks[helpLinkIndex])); -// } -// return helpLink; -// }, - -// setGotoView: function(element, viewPageUrl) { -// $(element).stopObserving('click'); -// element.href = viewPageUrl; -// if(window.opener) { -// Event.observe(element, 'click', function(event) { -// setPLocation(this.href,true); -// Catalog.Map.hideHelp(); -// event.stop(); -// }); -// } else { -// Event.observe(element, 'click', function(event) { -// setLocation(this.href); -// Catalog.Map.hideHelp(); -// window.opener.focus(); -// event.stop(); -// }); -// } -// }, - -// showSelects: function() { -// var elements = document.getElementsByTagName("select"); -// for (i=0;i< elements.length;i++) { -// elements[i].style.visibility='visible'; -// } -// }, - -// hideSelects: function() { -// var elements = document.getElementsByTagName("select"); -// for (i=0;i< elements.length;i++) { -// elements[i].style.visibility='hidden'; -// } -// }, - -// showHelp: function(event) { -// var helpBox = $('map-popup'), -// isIE6 = typeof document.body.style.maxHeight === "undefined"; -// if (!helpBox) { -// return; -// } -// -// //Move help box to be right in body tag -// var bodyNode = $$('body')[0]; -// if (helpBox.parentNode != bodyNode) { -// helpBox.remove(); -// bodyNode.insert(helpBox); -// // Fix for FF4-FF5 bug with missing alt text after DOM manipulations -// var paypalImg = helpBox.select('.paypal-logo > a > img')[0]; -// if (paypalImg) paypalImg.src = paypalImg.src; -// } -// -// if (this != Catalog.Map && Catalog.Map.active != this.link) { -// helpBox.style.display = 'none'; -// if (!helpBox.offsetPosition) { -// helpBox.offsetPosition = {left:0, top: 0}; -// } -// -// helpBox.removeClassName('map-popup-right'); -// helpBox.removeClassName('map-popup-left'); -// if (Element.getWidth(bodyNode) < event.pageX + Element.getWidth(helpBox)) { -// helpBox.addClassName('map-popup-left'); -// } else if (event.pageX - Element.getWidth(helpBox) < 0) { -// helpBox.addClassName('map-popup-right'); -// } -// -// helpBox.style.left = event.pageX - (Element.getWidth(helpBox) / 2) + 'px'; -// helpBox.style.top = event.pageY + 10 + 'px'; -// -// //Title -// var mapTitle = $('map-popup-heading'); -// if (typeof this.title != 'undefined') { -// Element.update(mapTitle, this.title); -// $(mapTitle).show(); -// } else { -// $(mapTitle).hide(); -// } -// -// //MSRP price -// var mapMsrp = $('map-popup-msrp-box'); -// if (typeof this.msrp != 'undefined') { -// Element.update($('map-popup-msrp'), this.msrp); -// $(mapMsrp).show(); -// } else { -// $(mapMsrp).hide(); -// } -// -// //Actual price -// var mapPrice = $('map-popup-price-box'); -// if (typeof this.price != 'undefined') { -// var price = typeof this.price == 'object' ? this.price.innerHTML : this.price; -// Element.update($('map-popup-price'), price); -// $(mapPrice).show(); -// } else { -// $(mapPrice).hide(); -// } - -// //`Add to cart` button -// var cartButton = $('map-popup-button'); -// if (typeof this.cartLink != 'undefined') { -// if (typeof productAddToCartForm == 'undefined' || this.notUseForm) { -// Catalog.Map.setGotoView(cartButton, this.cartLink); -// productAddToCartForm = $('product_addtocart_form_from_popup'); -// } else { -// if (this.qty) { -// productAddToCartForm.qty = this.qty; -// } -// cartButton.stopObserving('click'); -// cartButton.href = this.cartLink; -// Event.observe(cartButton, 'click', function(event) { -// productAddToCartForm.action = this.href; -// productAddToCartForm.submit(this); -// }); -// } -// productAddToCartForm.action = this.cartLink; -// var productField = $('map-popup-product-id'); -// productField.value = this.product_id; -// $(cartButton).show(); -// $$('.additional-addtocart-box').invoke('show'); -// } else { -// $(cartButton).hide(); -// $$('.additional-addtocart-box').invoke('hide'); -// } - -// //Horizontal line -// var mapText = $('map-popup-text'), -// mapTextWhatThis = $('map-popup-text-what-this'), -// mapContent = $('map-popup-content'); -// if (!mapMsrp.visible() && !mapPrice.visible() && !cartButton.visible()) { -// //If just `What's this?` link -// $(mapText).hide(); -// $(mapTextWhatThis).show(); -// $(mapTextWhatThis).removeClassName('map-popup-only-text'); -// $(mapContent).hide().setStyle({visibility: 'hidden'}); -// $('product_addtocart_form_from_popup').hide(); -// } else { -// $(mapTextWhatThis).hide(); -// $(mapText).show(); -// $(mapText).addClassName('map-popup-only-text'); -// $(mapContent).show().setStyle({visibility: 'visible'}); -// $('product_addtocart_form_from_popup').show(); -// } -// -// $(helpBox).show(); -// if (isIE6) { -// Catalog.Map.hideSelects(); -// } -// var closeButton = $('map-popup-close'); -// if (closeButton) { -// $(closeButton).stopObserving('click'); -// Event.observe(closeButton, 'click', Catalog.Map.showHelp.bind(this)); -// Catalog.Map.active = this.link; -// } -// } else { -// $(helpBox).hide(); -// if (isIE6) { -// Catalog.Map.showSelects(); -// } -// Catalog.Map.active = false; -// } -// -// Event.stop(event); -// } - -// hideHelp: function(){ -// var helpBox = $('map-popup'); -// if (helpBox) { -// var isIE6 = typeof document.body.style.maxHeight === "undefined"; -// $(helpBox).hide(); -// if (isIE6) { -// Catalog.Map.showSelects(); -// } -// Catalog.Map.active = false; -// } -// } - -// bindProductForm: function(){ -// if (('undefined' != typeof productAddToCartForm) && productAddToCartForm) { -// productAddToCartFormOld = productAddToCartForm; -// productAddToCartForm = new VarienForm('product_addtocart_form_from_popup'); -// productAddToCartForm.submitLight = productAddToCartFormOld.submitLight; -// } else if(!$('product_addtocart_form_from_popup')) { -// return false; -// } else if ('undefined' == typeof productAddToCartForm) { -// productAddToCartForm = new VarienForm('product_addtocart_form_from_popup'); -// } -// -// productAddToCartForm.submit = function(button, url) { -// if (('undefined' != typeof productAddToCartFormOld) && productAddToCartFormOld) { -// if (Catalog.Map.active) { -// Catalog.Map.hideHelp(); -// } -// if (productAddToCartForm.qty && $('qty')) { -// $('qty').value = productAddToCartForm.qty; -// } -// parentResult = productAddToCartFormOld.submit(); -// return false; -// } -// if(window.opener) { -// var parentButton = button; -// new Ajax.Request(this.form.action, { -// parameters: {isAjax: 1, method: 'GET'}, -// onSuccess: function(transport) { -// window.opener.focus(); -// if (parentButton && parentButton.href) { -// setPLocation(parentButton.href, true); -// Catalog.Map.hideHelp(); -// } -// } -// }); -// return; -// } -// if (this.validator.validate()) { -// var form = this.form; -// var oldUrl = form.action; -// -// if (url) { -// form.action = url; -// } -// if (!form.getAttribute('action')) { -// form.action = productAddToCartForm.action; -// } -// try { -// this.form.submit(); -// } catch (e) { -// this.form.action = oldUrl; -// throw e; -// } -// this.form.action = oldUrl; -// -// if (button && button != 'undefined') { -// button.disabled = true; -// } -// } -// }; -// } -}; - -Event.observe(window, 'resize', function (event) { - if (Catalog.Map.active) { - Catalog.Map.showHelp(event); - } -}) - -$(document).observe('bundle:reload-price', function (event) { //reload price - var data = event.memo, bundle = data.bundle; - if (!Number(bundle.config.isMAPAppliedDirectly) && !Number(bundle.config.isFixedPrice)) { - var canApplyMAP = false; - try { - for (var option in bundle.config.selected) { - if (bundle.config.options[option] && bundle.config.options[option].selections) { - var selections = bundle.config.options[option].selections; - for (var i = 0, l = bundle.config.selected[option].length; i < l; i++) { - var selectionId = bundle.config.selected[option][i]; - if (Number(selections[selectionId].canApplyMAP)) { - canApplyMAP = true; - break; - } - } - } - if (canApplyMAP) { - break; - } - } - } catch (e) { - canApplyMAP = true; - } - if (canApplyMAP) { - $$('.full-product-price').each(function (e) { - $(e).hide(); - }); - $$('.map-info').each(function (e) { - $(e).show(); - }); - event.noReloadPrice = true; - } else { - $$('.full-product-price').each(function (e) { - $(e).show(); - }); - $$('.map-info').each(function (e) { - $(e).hide(); - }); - } - } -}); diff --git a/app/code/core/Mage/Catalog/view/frontend/msrp.xml b/app/code/core/Mage/Catalog/view/frontend/msrp.xml index 0d8d9887518a7f53c5778cabe0b1c1f63a301a0c..2eaef2dd119af6faa7eebb6b3369cf55dbc1cef9 100644 --- a/app/code/core/Mage/Catalog/view/frontend/msrp.xml +++ b/app/code/core/Mage/Catalog/view/frontend/msrp.xml @@ -75,9 +75,6 @@ Default layout, loads most of the pages </tag_customer_view> <MAP_popup> - <reference name="head"> - <action method="addJs" ifconfig="sales/msrp/enabled"><file>Mage_Catalog::msrp.js</file></action> - </reference> <reference name="content"> <block type="Mage_Core_Block_Template" template="Mage_Catalog::msrp/popup.phtml" name="product.tooltip"/> </reference> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml index 9658c14743d5413b559f56d842fb969bfb398ef3..de404c6e46e9fae7c21afa17acbec68b500b7f25 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml @@ -31,7 +31,7 @@ </div> <?php $_total=$this->getItems()->getSize() ?> <?php if($_total): ?> -<table class="data-table compare-table" id="product_comparison"> +<table class="data-table compare-table" id="product-comparison"> <?php $_i=0 ?> <?php foreach($this->getItems() as $_item): ?> <?php if($_i++%10==0): ?> @@ -140,18 +140,20 @@ </div> <script type="text/javascript"> (function($) { - $.mage.event.observe('mage.compare-list.initialize', function (e, o) { - o.productSelector = 'h2.product-name > a', - o.productImageSelector = '.product-image' - o.productAddToCartSelector = '.btn-cart', - o.productWishListSelector = '.link-wishlist', - o.productRemoveSelector = '.btn-remove', - o.productFormSelector = '#product_comparison', - o.ajaxSpinner ='#compare-list-please-wait', - o.windowCloseSelector = '#window-close', - o.printSelector = '.link-print' + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/list.js')?>", function() { + $('#product-comparison').compareList({ + productRemoveSelector: 'a.btn-remove', + ajaxSpinner: '#compare-list-please-wait', + windowCloseSelector: '#window-close', + windowPrintSelector: 'a.link-print', + selectors: { + productSelector: 'h2.product-name > a', + productImageSelector: 'a.product-image', + productAddToCartSelector: 'button.btn-cart', + productWishListSelector: 'a.link-wishlist' + } + }); }); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/list.js')?>"); })(jQuery); </script> <?php else: ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml b/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml index 9eb8b3f1fa97b54b1fd9300810d03637561496f7..9517965fbe79a0595a873bb416b6a8538080a3b5 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml @@ -50,20 +50,20 @@ $_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null; </ol> <div class="actions"> <a id='compare-clear-all' href="<?php echo $_helper->getClearListUrl() ?>" ><?php echo $this->__('Clear All') ?></a> - <button type="button" title="<?php echo $this->__('Compare') ?>" class="button" data-mage-popwin="{windowURL:'<?php echo $_helper->getListUrl() ?>',windowName:'compare',resizable:1,scrollbars:1,width:820,height:600}"><span><span><?php echo $this->__('Compare') ?></span></span></button> + <button type="button" title="<?php echo $this->__('Compare') ?>" class="button" data-mage-popwin="{windowURL:'<?php echo $_helper->getListUrl() ?>',windowName:'compare',centerScreen:1,resizable:1,scrollbars:1,width:820,height:600}"><span><span><?php echo $this->__('Compare') ?></span></span></button> </div> <script type="text/javascript"> (function($) { - $.mage.event.observe('mage.compare.initialize', function (e, o) { - o.listSelector = '#compare-items', - o.removeConfirmMessage = '<?php echo $this->__('Are you sure you would like to remove this item from the compare products?') ?>', - o.removeSelector = '#compare-items .btn-remove', - o.clearAllConfirmMessage = '<?php echo $this->__('Are you sure you would like to remove all products from your comparison?') ?>', - o.clearAllSelector = '#compare-clear-all' - }); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('jquery/jquery.popupwindow.js') ?>"); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('mage/popup-window.js') ?>"); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/compare.js') ?>"); + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.popupwindow.js') ?>", + "<?php echo $this->getViewFileUrl('mage/popup-window.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Catalog::js/compare.js') ?>", function() { + $('#compare-items').compareItems({ + removeConfirmMessage: '<?php echo $this->__('Are you sure you would like to remove this item from the compare products?') ?>', + removeSelector: '#compare-items a.btn-remove', + clearAllConfirmMessage: '<?php echo $this->__('Are you sure you would like to remove all products from your comparison?') ?>', + clearAllSelector: '#compare-clear-all' + }); + }); })(jQuery); </script> <?php else: ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/list.phtml index 32486fd66449bfb51f907ef7dcb807cc994b092d..552e22de1c9038bb10b3a534a8b5c6600a50a632 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/list.phtml @@ -96,15 +96,8 @@ $_helper = $this->helper('Mage_Catalog_Helper_Output'); <?php endforeach; ?> </ol> <script type="text/javascript"> - //<![CDATA[ - (function($) { - $.mage.event.observe('mage.grid.initialize', function (event, initData) { - initData.listId = '#products-list'; - }); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/grid.js') ?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); - })(jQuery); - //]]> + jQuery('#products-list').decorate('list'); + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); </script> <?php else: ?> @@ -159,16 +152,8 @@ $_helper = $this->helper('Mage_Catalog_Helper_Output'); <?php endif ?> <?php endforeach ?> <script type="text/javascript"> - //<![CDATA[ - (function($) { - $.mage.event.observe('mage.grid.initialize', function (event, initData) { - initData.genericSelector = 'ul.products-grid > li'; - initData.decoratorParam = ['odd', 'even', 'first', 'last']; - }); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/grid.js') ?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); - })(jQuery); - //]]> + jQuery('ul.products-grid > li').decorate('generic', ['odd', 'even', 'first', 'last']); + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); </script> <?php endif; ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml b/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml index 6848da2ebf323afdd0e95e29aa9b93a7021cf6dc..64dc48f22064eb3250e8bfa25d777b7ddf4a04b5 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml @@ -106,7 +106,7 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); })(jQuery); //]]> </script> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml index 914f8b0a80a12f37f9717a0da0bce1fdc055640e..cf648ae5de1cdc5d4d836de67347fcff1b36c27e 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml @@ -45,47 +45,33 @@ <?php endif; ?> <?php $helpLinkId = 'msrp-click-' . $_product->getId() . $this->helper('Mage_Core_Helper_Data')->getRandomString(20); ?> <a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__('Click for price') ?></a> - <script type="text/javascript"> - //<![CDATA[ - (function ($) { - <?php if ($this->helper('Mage_Catalog_Helper_Data')->isShowPriceOnGesture($_product)): ?> - $.mage.event.observe('mage.price.helplink', function (event, clickForPrice) { - var helpLink = { + </div> + + <script type="text/javascript"> + //<![CDATA[ + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>", function () { + <?php if ($this->helper('Mage_Catalog_Helper_Data')->isShowPriceOnGesture($_product)): ?> + $('#<?php echo($helpLinkId);?>').addToCart({ popupId: "#<?php echo($helpLinkId);?>", productName: '<?php echo $_product->getName() ?>', realPrice: '<?php echo $this->getRealPriceJs($_product) ?>', msrpPrice: '<?php echo $_msrpPrice ?>', - priceElementId: '<?php echo $priceElementId ?>' - }; - clickForPrice.helpLink.push(helpLink); - }); - - $.mage.event.observe('map.popup.button', function (event, popupCartData) { - var initData = { - cartButtonId: "#map-popup-button", - addToCartUrl: "<?php echo $this->getAddToCartUrl($_product) ?>" - }; - popupCartData.cartData.push(initData); - }); - $.mage.event.observe('map.popup.close', function (event, initData) { - initData.closeButtonId = '#map-popup-close'; - }); - <?php else: ?> - - $.mage.event.observe('mage.price.helplink', function (event, clickForPrice) { - var helpLink = { + priceElementId: '<?php echo $priceElementId ?>', + closeButtonId: '#map-popup-close', + popupCartButtonId: "#map-popup-button", + addToCartUrl: "<?php echo $this->getAddToCartUrl($_product) ?>", + clickUpdate: true + }); + <?php else: ?> + $('#<?php echo($popupId);?>').addToCart({ popupId: "#<?php echo($helpLinkId);?>", submitUrl: "<?php echo $_product->getProductUrl() ?>" - }; - clickForPrice.helpLink.push(helpLink); + }); + <?php endif; ?> }); - <?php endif; ?> + })(jQuery); + //]]> + </script> - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); - })(jQuery); - //]]> - </script> - </div> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml index 33d3fadc4cf53efa042b0ff6cf9652842aee67f5..4114b29fd72c9634ebb707888f90010d1b89d314 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml @@ -57,62 +57,40 @@ $priceElementIdPrefix = $this->getPriceElementIdPrefix() ? $this->getPriceElemen <?php $popupId = 'msrp-popup-' . $_id . $_coreHelper->getRandomString(20); ?> <a href="#" id="<?php echo($popupId);?>"><?php echo $this->__('Click for price'); ?></a> - <script type="text/javascript"> - //<![CDATA[ - (function ($) { - <?php if ($this->helper('Mage_Catalog_Helper_Data')->isShowPriceOnGesture($_product)): ?> - $.mage.event.observe('mage.price.helplink', function (event, clickForPrice) { - var helpLink = { - popupId: "#<?php echo($popupId);?>", - productName: '<?php echo $_product->getName() ?>', - realPrice: '<?php echo $this->getRealPriceJs($_product) ?>', - msrpPrice: '<?php echo $_msrpPrice ?>', - priceElementId: '<?php echo $priceElementId ?>' - }; - clickForPrice.helpLink.push(helpLink); - }); - - $.mage.event.observe('map.popup.close', function (event, initData) { - initData.closeButtonId = '#map-popup-close'; - }); - - $.mage.event.observe('map.popup.button', function (event, popupCartData) { - var initData = { - cartButtonId: "#map-popup-button", - cartForm: "#product_addtocart_form" - }; - popupCartData.cartData.push(initData); - }); - - <?php endif; ?> - - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); - })(jQuery); - //]]> - </script> - <?php else: ?> <span class="msrp-price-hide-message"> - <?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?> - </span> + <?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?> + </span> <?php endif; ?> <?php $helpLinkId = 'msrp-help-' . $_id . $_coreHelper->getRandomString(20); ?> <a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__("What's this?"); ?></a> - <script type="text/javascript"> - //<![CDATA[ - (function ($) { - $.mage.event.observe('mage.popup.whatsthislink', function (event, helpLinkData) { - var helpText = { +</div> + +<script type="text/javascript"> + //<![CDATA[ + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>", + function () { + <?php if ($this->helper('Mage_Catalog_Helper_Data')->isShowPriceOnGesture($_product)): ?> + $('#<?php echo($popupId);?>').addToCart({ + cartForm: "#product_addtocart_form", + popupId: "#<?php echo($popupId);?>", + productName: '<?php echo $_product->getName() ?>', + realPrice: '<?php echo $this->getRealPriceJs($_product) ?>', + msrpPrice: '<?php echo $_msrpPrice ?>', + priceElementId: '<?php echo $priceElementId ?>', + closeButtonId: '#map-popup-close', + popupCartButtonId: "#map-popup-button" + }); + <?php endif; ?> + $("#<?php echo($helpLinkId);?>").addToCart({ helpLinkId: "#<?php echo($helpLinkId);?>", productName: '<?php echo $_product->getName() ?>' - }; - helpLinkData.helpText.push(helpText); + }); }); - })(jQuery); - //]]> - </script> + })(jQuery); + //]]> +</script> + -</div> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml index ecbbebab91d51abe50be1dc85ebdcf90b14103c4..097cf774aea3fd98b4c95a3e45b884e855726363 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml @@ -45,47 +45,30 @@ <?php endif; ?> <?php $helpLinkId = 'msrp-click-' . $_product->getId() . $this->helper('Mage_Core_Helper_Data')->getRandomString(20); ?> <a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__('Click for price') ?></a> - <script type="text/javascript"> - //<![CDATA[ - (function ($) { - <?php if ($this->helper('Mage_Catalog_Helper_Data')->isShowPriceOnGesture($_product)): ?> - $.mage.event.observe('mage.price.helplink', function (event, clickForPrice) { - var helpLink = { + </div> + + <script type="text/javascript"> + //<![CDATA[ + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>", function () { + <?php if ($this->helper('Mage_Catalog_Helper_Data')->isShowPriceOnGesture($_product)): ?> + $('#<?php echo($helpLinkId);?>').addToCart({ popupId: "#<?php echo($helpLinkId);?>", productName: '<?php echo $_product->getName() ?>', realPrice: '<?php echo $this->getRealPriceJs($_product) ?>', msrpPrice: '<?php echo $_msrpPrice ?>', - priceElementId: '<?php echo $priceElementId ?>' - }; - clickForPrice.helpLink.push(helpLink); - }); - - $.mage.event.observe('map.popup.button', function (event, popupCartData) { - var initData = { - cartButtonId: "#map-popup-button", + priceElementId: '<?php echo $priceElementId ?>', + closeButtonId: '#map-popup-close', + popupCartButtonId: "#map-popup-button", addToCartUrl: "<?php echo $this->getAddToCartUrl($_product) ?>" - }; - popupCartData.cartData.push(initData); - }); - $.mage.event.observe('map.popup.close', function (event, initData) { - initData.closeButtonId = '#map-popup-close'; - }); - <?php else: ?> - - $.mage.event.observe('mage.price.helplink', function (event, clickForPrice) { - var helpLink = { + }); + <?php else: ?> + $('#<?php echo($popupId);?>').addToCart({ popupId: "#<?php echo($helpLinkId);?>", submitUrl: "<?php echo $_product->getProductUrl() ?>" - }; - clickForPrice.helpLink.push(helpLink); + }); + <?php endif; ?> }); - <?php endif; ?> - - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); - - })(jQuery); - //]]> - </script> - </div> + })(jQuery); + //]]> + </script> \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view.phtml index aa6d7bba48618fb65ef7ac61d023dada505a6cfa..6220bd7d28d8c96ea5455d89b55be7e895be516c 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view.phtml @@ -34,10 +34,10 @@ <?php $_helper = $this->helper('Mage_Catalog_Helper_Output'); ?> <?php $_product = $this->getProduct(); ?> <script type="text/javascript"> - (function ($) { - head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/price-option.js') ?>", function () { - priceOptionInstance = $.mage.priceOption({"priceConfig":<?php echo $this->getJsonConfig() ?>}); - }); + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/price-option.js') ?>", function () { + $('#product_addtocart_form').priceOption({"priceConfig":<?php echo $this->getJsonConfig() ?>}); + }); })(jQuery); </script> <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/addto.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/addto.phtml index 3c682b0bce0904098d70702bbd41a657d023383f..f66717aa10871e72612df6aca57e17a838e63cab 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/addto.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/addto.phtml @@ -30,7 +30,7 @@ <ul class="add-to-links"> <?php if ($this->helper('Mage_Wishlist_Helper_Data')->isAllow()) : ?> - <li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li> + <li><a href="<?php echo $_wishlistSubmitUrl ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li> <?php endif; ?> <?php $_compareUrl = $this->helper('Mage_Catalog_Helper_Product_Compare')->getAddUrl($_product); diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml index f04de355207e22d5125c100c30905f8a63fa3381..9f58a28a87e5b9894a90207b388a8c049f95e686 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml @@ -33,25 +33,55 @@ <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" data-validate="{required:true,digits:true}"/> <?php endif; ?> - <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" id="product-addtocart-button"> + <button type="submit" title="<?php echo $buttonTitle ?>" class="button btn-cart" id="product-addtocart-button"> <span><span><?php echo $buttonTitle ?></span></span></button> <?php echo $this->getChildHtml('', true) ?> </div> <?php endif; ?> <script type="text/javascript"> - //<![CDATA[ (function ($) { - $.mage.event.observe('product.addtocart.button', function (event, cartData) { - var initData = { - cartButtonId: "#product-addtocart-button", - cartForm: "#product_addtocart_form" - }; - cartData.cartFormData.push(initData); - }); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", function () { + $('#product_addtocart_form').validation({ + errorPlacement: function (error, element) { + if (element.attr('data-validate') && element.attr('data-validate').indexOf('validate-one-checkbox-required-by-name') > 0) { + error.appendTo('#links-advice-container'); + } else if (element.attr('data-validate')&& element.attr('data-validate').indexOf('validate-grouped-qty') > 0) { + $('#super-product-table').siblings(this.errorElement + '.' + this.errorClass).remove(); + $('#super-product-table').after(error); + } else if (element.is(':radio, :checkbox')) { + element.closest('ul').after(error); + } else { + element.after(error); + } + }, + highlight: function (element, errorClass) { + if ($(element).attr('data-validate') && $(element).attr('data-validate').indexOf('validate-required-datetime') > 0) { + $(element).parent().find('.datetime-picker').each(function() { + $(this).removeClass(errorClass); + if ($(this).val().length === 0) { + $(this).addClass(errorClass); + } + }); + } else if ($(element).is(':radio, :checkbox')) { + $(element).closest('ul').addClass(errorClass); + } else { + $(element).addClass(errorClass); + } + }, + unhighlight: function (element, errorClass) { + if ($(element).attr('data-validate') && $(element).attr('data-validate').indexOf('validate-required-datetime') > 0) { + $(element).parent().find('.datetime-picker').removeClass(errorClass); + } else if ($(element).is(':radio, :checkbox')) { + $(element).closest('ul').removeClass(errorClass); + } else { + $(element).removeClass(errorClass); + } + } + }); + }); })(jQuery); - //]]> </script> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml index 60d8da4ee19a34bcd6c5c313745a051feb59d3a3..728c428305a38411f1ad3397a140eecc9e76cf11 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml @@ -41,24 +41,23 @@ echo $_helper->productAttribute($_product, $_img, 'image'); ?> </p> -<p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p> -<div class="zoom no-bg"> - <img id="zoom_out" src="<?php echo $this->getViewFileUrl('Mage_Catalog::images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" /> +<p class="zoom-notice" id="track-hint"><?php echo $this->__('Double click on above image to view full picture') ?></p> +<div class="zoom"> + <img id="zoom-out" src="<?php echo $this->getViewFileUrl('Mage_Catalog::images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" /> <div id="slider"></div> - <img id="zoom_in" src="<?php echo $this->getViewFileUrl('Mage_Catalog::images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" /> + <img id="zoom-in" src="<?php echo $this->getViewFileUrl('Mage_Catalog::images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" /> </div> <script type="text/javascript"> //<![CDATA[ (function ($) { - $.mage.load.css("<?php echo $this->getViewFileUrl('Mage_Catalog::zoom.css') ?>"); - $.mage.event.observe('mage.zoom.initialize', function (event, initData) { - initData.imageSelector = '#image', - initData.sliderSelector = '#slider', - initData.zoomNoticeSelector = '#track_hint', - initData.zoomInSelector = '#zoom_in', - initData.zoomOutSelector = '#zoom_out' + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/zoom.js')?>", function() { + $('#image').zoom({ + sliderSelector: '#slider', + zoomNoticeSelector: '#track-hint', + zoomInSelector: '#zoom-in', + zoomOutSelector: '#zoom-out' + }); }); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/zoom.js') ?>"); })(jQuery); //]]> </script> @@ -84,8 +83,9 @@ </div> <script type="text/javascript"> (function($) { - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('jquery/jquery.popupwindow.js')?>"); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('mage/popup-window.js')?>"); + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.popupwindow.js')?>", + "<?php echo $this->getViewFileUrl('mage/popup-window.js')?>" + ); })(jQuery); </script> <?php endif; ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml index 9d38bdc5f2c458be8bc2153b03d583a4630cb8ee..ed5d772522317801d8cfde658bc045a0a9f1f8e6 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml @@ -31,8 +31,7 @@ <script type="text/javascript"> (function ($) { head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/price-option.js') ?>", function () { - priceOptionInstance.options.optionConfig = <?php echo $this->getJsonConfig()?>; - priceOptionInstance.reloadPrice(); + $('#product_addtocart_form').priceOption({'optionConfig':<?php echo $this->getJsonConfig()?>}).trigger('reloadPrice'); }); })(jQuery); </script> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/date.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/date.phtml index 90fce38b45628ad54c94d55ddfd9539fd94af97b..7142934f9e782132a7cddc0f45dddedac347d25a 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/date.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/date.phtml @@ -36,12 +36,19 @@ <?php echo $this->getDateHtml() ?> <?php if (!$this->useCalendar()): ?> - <script type="text/javascript"> - //<![CDATA[ - Event.observe('options_<?php echo $_optionId ?>_month', 'change', dateOption.reloadMonth.bind(dateOption)); - Event.observe('options_<?php echo $_optionId ?>_year', 'change', dateOption.reloadMonth.bind(dateOption)); - //]]> - </script> + <script type="text/javascript"> + //<![CDATA[ + (function($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/date-option.js') ?>", function() { + $.mage.dateOption({ + datepickerFieldSelector: 'select.datetime-picker', + monthSelector: '#options_<?php echo $_optionId ?>_month', + yearSelector: '#options_<?php echo $_optionId ?>_year' + }); + }); + })(jQuery); + //]]> + </script> <?php endif; ?> <?php endif; ?> @@ -51,42 +58,20 @@ <span class="time-picker"><?php echo $this->getTimeHtml() ?></span> <?php endif; ?> - <input type="hidden" name="validate_datetime_<?php echo $_optionId ?>" class="validate-datetime-<?php echo $_optionId ?>" value="" /> - <script type="text/javascript"> - //<![CDATA[ <?php if ($_option->getIsRequire()): ?> - Validation.addAllThese( - [ - ['validate-datetime-<?php echo $_optionId ?>', '<?php echo $this->jsQuoteEscape( Mage::helper('Mage_Catalog_Helper_Data')->__('This is a required option') )?>', function(v) { - var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]'); - for (var i=0; i < dateTimeParts.length; i++) { - if (dateTimeParts[i].value == "") return false; - } - return true; - }] - ] - ); + <input type="hidden" name="validate_datetime_<?php echo $_optionId ?>" class="validate-datetime-<?php echo $_optionId ?>" value="" data-validate="{'validate-required-datetime':<?php echo $_optionId?>}"/> <?php else: ?> - Validation.add( - 'validate-datetime-<?php echo $_optionId ?>', - '<?php echo $this->jsQuoteEscape( Mage::helper('Mage_Catalog_Helper_Data')->__('Field is not complete') )?>', - function(v) { - var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]'); - var hasWithValue = false, hasWithNoValue = false; - var pattern = /day_part$/i; - for (var i=0; i < dateTimeParts.length; i++) { - if (! pattern.test(dateTimeParts[i].id)) { - if (dateTimeParts[i].value === "") { - hasWithValue = true; - } else { - hasWithNoValue = true; - } - } - } - return hasWithValue ^ hasWithNoValue; - } - ); + <input type="hidden" name="validate_datetime_<?php echo $_optionId ?>" class="validate-datetime-<?php echo $_optionId ?>" value="" data-validate="{'validate-optional-datetime':<?php echo $_optionId?>}"/> <?php endif; ?> - //]]> - </script> + +<script type="text/javascript"> +//<![CDATA[ + (function($) { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", function() { + $.validator.setDefaults({ignore: ':hidden:not(input[name^="validate_datetime_"])'}); + }); + })(jQuery); +//]]> +</script> + </dd> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/type/grouped.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/type/grouped.phtml index a6f0c99352aaa000a8225589d94ce16d5f3df692..ca178b8a9f3cefbfd9ac043192efd21a9cf90e2f 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/type/grouped.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/type/grouped.phtml @@ -75,7 +75,7 @@ <?php if ($_product->isSaleable()): ?> <td class="a-center"> <?php if ($_item->isSaleable()) : ?> - <input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" /> + <input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> <?php else: ?> <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p> <?php endif; ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml index ec21b2a903d15006e697e8cb7ed5232f45b6950c..ec52f4ba2dd9e198116c2771615606e1aba00dbb 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml @@ -32,7 +32,7 @@ $_attributes = Mage::helper('Mage_Core_Helper_Data')->decorateArray($this->getAl <?php if ($_product->isSaleable() && count($_attributes)):?> <dl> <?php foreach($_attributes as $_attribute): ?> - <dt><label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt> + <dt><label class="required"><em>*</em><?php echo $this->escapeHtml($_attribute->getLabel()) ?></label></dt> <dd<?php if ($_attribute->getDecoratedIsLast()):?> class="last"<?php endif; ?>> <div class="input-box"> <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" data-validate="{required:true}" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="super-attribute-select"> @@ -44,8 +44,9 @@ $_attributes = Mage::helper('Mage_Core_Helper_Data')->decorateArray($this->getAl </dl> <script type="text/javascript"> (function ($) { - head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/configurable.js') ?>", function () { - $.mage.configurable({"spConfig":<?php echo $this->getJsonConfig() ?>, "priceOptionInstance": priceOptionInstance}); + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.parsequery.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Catalog::js/configurable.js') ?>", function () { + $('#product_addtocart_form').configurable({"spConfig":<?php echo $this->getJsonConfig() ?>}); }) })(jQuery); </script> diff --git a/app/code/core/Mage/Catalog/view/frontend/zoom.css b/app/code/core/Mage/Catalog/view/frontend/zoom.css index dd90f3cfaf7dd88298b2c4c84fa17d15e2fc548b..3946ee7708e1e455168c864cd2737e842a991f9f 100644 --- a/app/code/core/Mage/Catalog/view/frontend/zoom.css +++ b/app/code/core/Mage/Catalog/view/frontend/zoom.css @@ -22,9 +22,25 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -.ui-slider { - margin: 0 2px; +.product-img-box .ui-slider-handle { + background: url("images/magnifier_handle.gif") no-repeat scroll 0 0 transparent; + height: 22px; + left: 0; + position: absolute; + top: -2px; + width: 9px; + margin-left: -5px; } -#zoom_out, #zoom_in { - top: -3px; +.product-img-box .ui-slider { + height: 20px; + border: none; + position: relative; + background: none; + z-index: 100; +} +#track .ui-slider-handle { + top: 1px; +} +body .product-view .product-img-box .zoom { + padding: 0 31px; } \ No newline at end of file diff --git a/app/code/core/Mage/CatalogInventory/view/adminhtml/layout.xml b/app/code/core/Mage/CatalogInventory/view/adminhtml/layout.xml index 181f21958c9037ffb761df443f98185c2f5a197e..8046c49af7bdba479c75d796189ade42b471edae 100644 --- a/app/code/core/Mage/CatalogInventory/view/adminhtml/layout.xml +++ b/app/code/core/Mage/CatalogInventory/view/adminhtml/layout.xml @@ -36,7 +36,7 @@ <reference name="admin.product.edit.tab.super.config.grid.columnSet"> <block type="Mage_Backend_Block_Widget_Grid_Column" as="inventory_in_stock" after="admin.product.edit.tab.super.config.grid.sku"> <arguments> - <header translate="true" module="Mage_Core">Inventory</header> + <header translate="true" module="Mage_Core">Stock Availability</header> <type>text</type> <index>inventory_in_stock</index> <id>inventory_in_stock</id> diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/advanced/form.phtml b/app/code/core/Mage/CatalogSearch/view/frontend/advanced/form.phtml index 27ed76782e6cc20233664b9c3d612b0b1669da45..80c496e6ad5b667202dac86658dba894068c7103 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/advanced/form.phtml +++ b/app/code/core/Mage/CatalogSearch/view/frontend/advanced/form.phtml @@ -47,16 +47,16 @@ <?php switch($this->getAttributeInputType($_attribute)): case 'number': ?> <div class="input-range"> - <input type="text" name="<?php echo $_code ?>[from]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" maxlength="<?php echo $maxQueryLength;?>" /> + <input type="text" name="<?php echo $_code ?>[from]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text" maxlength="<?php echo $maxQueryLength;?>" data-validate="{number:true, 'less-than-equals-to':'#<?php echo $_code ?>_to'}" /> <span class="separator">-</span> - <input type="text" name="<?php echo $_code ?>[to]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" maxlength="<?php echo $maxQueryLength;?>" /> + <input type="text" name="<?php echo $_code ?>[to]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text" maxlength="<?php echo $maxQueryLength;?>" data-validate="{number:true, 'greater-than-equals-to':'#<?php echo $_code ?>'}" /> </div> <?php break; case 'price': ?> <div class="input-range"> - <input name="<?php echo $_code ?>[from]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" type="text" maxlength="<?php echo $maxQueryLength;?>" /> + <input name="<?php echo $_code ?>[from]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text" type="text" maxlength="<?php echo $maxQueryLength;?>" data-validate="{number:true, 'less-than-equals-to':'#<?php echo $_code ?>_to'}" /> <span class="separator">-</span> - <input name="<?php echo $_code ?>[to]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" type="text" maxlength="<?php echo $maxQueryLength;?>" /> + <input name="<?php echo $_code ?>[to]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text" type="text" maxlength="<?php echo $maxQueryLength;?>" data-validate="{number:true, 'greater-than-equals-to':'#<?php echo $_code ?>'}" /> <small>(<?php echo $this->getCurrency($_attribute); ?>)</small> </div> <?php break; @@ -90,7 +90,27 @@ </div> </form> <script type="text/javascript"> -//<![CDATA[ - var dataForm = new VarienForm('form-validate', true); -//]]> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#form-validate').validation({ + errorPlacement: function (error, element) { + var parent = element.parent(); + if (parent.hasClass('input-range')) { + parent.find(this.errorElement + '.' + this.errorClass).remove().end().append(error); + } else { + error.insertAfter(element); + } + }, + messages: { + 'price[to]': {'greater-than-equals-to': 'Please enter a valid price range.'}, + 'price[from]': {'less-than-equals-to': 'Please enter a valid price range.'} + } + }); + }); + })(jQuery); </script> diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/form-mini.js b/app/code/core/Mage/CatalogSearch/view/frontend/form-mini.js index 457276e3c1b8c2de1de8ee71f50dedb0304d2943..fecbed30b49adb1f225ca533d530d1920e6bf3aa 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/form-mini.js +++ b/app/code/core/Mage/CatalogSearch/view/frontend/form-mini.js @@ -63,14 +63,27 @@ this.searchForm.on('submit', $.proxy(this._onSubmit, this)); }, + /** + * @return {Element} The first element in the suggestion list. + * @private + */ _getFirstVisibleElement: function() { return this.responseList.indexList ? this.responseList.indexList.first() : false; }, + /** + * @return {Element} The last element in the suggestion list. + * @private + */ _getLastElement: function() { return this.responseList.indexList ? this.responseList.indexList.last() : false; }, + /** + * Clears the item selected from the suggestion list and resets the suggestion list. + * @param {boolean} all Controls whether to clear the suggestion list. + * @private + */ _resetResponseList: function(all) { this.responseList.selected = null; if (all === true) { @@ -78,6 +91,12 @@ } }, + /** + * Executes when the search box is submitted. Sets the search input field to the + * value of the selected item. + * @param {Event} e The submit event + * @private + */ _onSubmit: function(e) { if (this.element.val() === this.options.placeholder || this.element.val() === '') { e.preventDefault(); @@ -87,6 +106,13 @@ } }, + /** + * Executes when keys are pressed in the search input field. Performs specific actions + * depending on which keys are pressed. + * @param {Event} e The key down event + * @return {Boolean} Default return type for any unhandled keys + * @private + */ _onKeyDown: function (e) { var keyCode = e.keyCode || e.which; switch (keyCode) { @@ -129,6 +155,12 @@ } }, + /** + * Executes when the value of the search input field changes. Executes a GET request + * to populate a suggestion list based on entered text. Handles click (select), hover, + * and mouseout events on the populated suggestion list dropdown. + * @private + */ _onPropertyChange: function () { var searchField = this.element; var clonePosition = { diff --git a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php index c2c344681734b3ccb4a83ddecf153d02b207c9dc..e4ddf6d12be03c56c0db3705e42fd4842ebfbf1b 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php @@ -102,9 +102,16 @@ class Mage_Checkout_Block_Cart_Item_Renderer extends Mage_Core_Block_Template protected function _getThumbnail() { if (is_null($this->_productThumbnail)) { - $thumbnail = $this->helper('Mage_Catalog_Helper_Image')->init($this->getProduct(), 'thumbnail'); + $product = $this->getProduct(); + if ($this->getProduct()->isConfigurable()) { + $children = $this->getItem()->getChildren(); + if (isset($children[0]) && $children[0]->getProduct()->getThumbnail() != 'no_selection') { + $product = $children[0]->getProduct(); + } + } + $thumbnail = $this->helper('Mage_Catalog_Helper_Image')->init($product, 'thumbnail'); } else { - $thumbnail =$this->_productThumbnail; + $thumbnail = $this->_productThumbnail; } return $thumbnail; } diff --git a/app/code/core/Mage/Checkout/view/frontend/cart.phtml b/app/code/core/Mage/Checkout/view/frontend/cart.phtml index 96ca0189cfb3b331c87120d2b6b5f7ddc54bbc99..fd080232e0c8c0ff13d6a17be7a4d504478555bb 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart.phtml @@ -46,7 +46,7 @@ </div> <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> <?php echo $this->getChildHtml('form_before') ?> - <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post"> + <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post" id="form-validate" > <fieldset> <table id="shopping-cart-table" class="data-table cart-table"> <col width="1" /> @@ -158,3 +158,16 @@ </div> </div> </div> + +<script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#form-validate').validation(); + }); + })(jQuery); +</script> \ No newline at end of file diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/coupon.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/coupon.phtml index 9ec52ec642c0644d4c353fea53118d276763c061..46b9da0c203fdad6d9d5fcff9c5d8b4e1309a376 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/coupon.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/coupon.phtml @@ -46,10 +46,9 @@ //<![CDATA[ (function($) { head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", "<?php echo $this->getViewFileUrl('Mage_Checkout::js/discount-codes.js')?>", function() { $('#discount-coupon-form').discountCode({ couponCodeSelector: '#coupon_code', removeCouponSelector: '#remove-coupon', diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/item/configure/updatecart.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/item/configure/updatecart.phtml index a0c9f0ab79723853eba9e55ef4368e9a9cc175cf..b4e28d4c77c4b315c55e1959fc7aeaca5867aaa3 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/item/configure/updatecart.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/item/configure/updatecart.phtml @@ -31,30 +31,25 @@ <div class="add-to-cart"> <?php if (!$_product->isGrouped()): ?> <label for="qty"><?php echo $this->__('Qty:') ?></label> - <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" /> + <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" data-validate="{required:true,digits:true}"/> <?php endif; ?> <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" id="product-updatecart-button"><span><span><?php echo $buttonTitle ?></span></span></button> <?php echo $this->getChildHtml('', true) ?> </div> <script type="text/javascript"> - //<![CDATA[ (function ($) { - $.mage.event.observe('product.updatecart.button', function (event, cartData) { - var initData = { - cartButtonId: "#product-updatecart-button", - cartForm: "#product_addtocart_form" - }; - cartData.cartFormData.push(initData); - }); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>"); - + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>", function () { + $('#product_addtocart_form').addToCart({ + cartButtonId: "#product-updatecart-button", + cartForm: "#product_addtocart_form" + }).validation(); + }); })(jQuery); - //]]> </script> <?php endif; ?> diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/item/default.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/item/default.phtml index 7eb82f379562add31eb0df30ccf4d88f6478659a..ec2998775f00b609aec3bd1ec7f7c20356d0610f 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/item/default.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/item/default.phtml @@ -179,7 +179,7 @@ $canApplyMsrp = Mage::helper('Mage_Catalog_Helper_Data')->canApplyMsrp($_item->g <?php endif; ?> <?php endif; ?> <td class="a-center"> - <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12" /> + <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12" data-validate="{required:true,digits:true}"/> </td> <?php if (($this->helper('Mage_Tax_Helper_Data')->displayCartPriceExclTax() || $this->helper('Mage_Tax_Helper_Data')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?> <td class="a-right"> diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/shipping.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/shipping.phtml index 15eeec5bb959d469596bde38223003674f6141c6..d599310956759e2f33ad5fd760bc6f5e03fd0792 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/shipping.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/shipping.phtml @@ -64,24 +64,23 @@ </li> </ul> <div class="buttons-set"> - <button type="button" title="<?php echo $this->__('Get a Quote') ?>" class="button"><span><span><?php echo $this->__('Get a Quote') ?></span></span></button> + <button type="submit" title="<?php echo $this->__('Get a Quote') ?>" class="button"><span><span><?php echo $this->__('Get a Quote') ?></span></span></button> </div> </form> <script type="text/javascript"> - (function ($) { + (function($) { head.js( "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", - "<?php echo $this->getViewFileUrl('jquery/additional-methods.js') ?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js') ?>", - "<?php echo $this->getViewFileUrl('mage/validation/validate.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", "<?php echo $this->getViewFileUrl('Mage_Checkout::js/region-updater.js') ?>", function() { $('#country').regionUpdater({ regionListId: '#region_id', regionInputId: '#region', postcodeId: '#postcode', - formId: '#shipping-zip-form', + form: $('#shipping-zip-form').validation(), regionJson: <?php echo $this->helper('Mage_Directory_Helper_Data')->getRegionJson() ?>, defaultRegion: "<?php echo $this->getEstimateRegionId() ?>", countriesWithOptionalZip: <?php echo $this->helper('Mage_Directory_Helper_Data')->getCountriesWithOptionalZip(true) ?> diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/sidebar.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/sidebar.phtml index f82a910ab0ba83e5d63b53c72df75b3cd3ad127b..f012b5b881ab6ef41b0a307fbecd01876f93dfe8 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/sidebar.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/sidebar.phtml @@ -64,7 +64,7 @@ <?php if ($_cartQty && $this->isPossibleOnepageCheckout()): ?> <div class="actions"> <?php echo $this->getChildHtml('extra_actions') ?> - <button type="button" title="<?php echo $this->__('Checkout') ?>" class="button"> + <button id="sidebar-btn-checkout" type="button" title="<?php echo $this->__('Checkout') ?>" class="button"> <span><span><?php echo $this->__('Checkout') ?></span></span></button> </div> <?php endif ?> @@ -78,15 +78,14 @@ </ol> <script type="text/javascript"> (function($) { - $.mage.event.observe('mage.checkout.initialize', function (e, o) { - o.cartSelector = '#cart-sidebar', - o.isRecursive = true, - o.url = '<?php echo $this->getCheckoutUrl();?>', - o.button = ':button[title=' + '<?php echo $this->__('Checkout') ?>' + ']', - o.confirmMessage = '<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>', - o.closeList = '#cart-sidebar a.btn-remove' + head.js("<?php echo $this->getViewFileUrl('Mage_Checkout::js/sidebar.js') ?>", function() { + $('#cart-sidebar').sidebar({ + checkoutUrl: '<?php echo $this->getCheckoutUrl();?>', + checkoutButton: '#sidebar-btn-checkout', + removeButton: '#cart-sidebar a.btn-remove', + confirmMessage: '<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>' + }); }); - $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Checkout::js/sidebar.js') ?>"); })(jQuery); </script> <?php else: ?> diff --git a/app/code/core/Mage/Checkout/view/frontend/js/checkout-topcart.js b/app/code/core/Mage/Checkout/view/frontend/js/checkout-topcart.js index 5dd3bbd85299927894ac76645322ae8949c621e9..4c4cdcf9b472c4bf64f9c90afbac7dff399c5389 100644 --- a/app/code/core/Mage/Checkout/view/frontend/js/checkout-topcart.js +++ b/app/code/core/Mage/Checkout/view/frontend/js/checkout-topcart.js @@ -24,44 +24,45 @@ */ /*jshint browser:true jquery:true*/ (function ($) { - $(document).ready(function () { + $.widget('mage.topCart', { + options: { + intervalDuration: 4000 + }, - var topCartInit = { - // Default values - intervalDuration: 4000, - // Filled in initialization event - container: null, - closeButton: null - }; + _create: function(){ + this.element.find(this.options.closeSelector) + .on('click', $.proxy(this.hide, this)); + this.element.parent() + .on('mouseleave', $.proxy(this._onMouseleave, this)) + .on('mouseenter', $.proxy(this._stopTimer, this)); + this.element.prev().on('click', $.proxy(function () { + this.element.slideToggle('slow'); + }, this)); + }, - $.mage.event.trigger('mage.checkout.initialize', topCartInit); + /** + * Hide (slide up) the checkout top-cart. + */ + hide: function(){ + this.element.slideUp('slow', $.proxy(this._stopTimer, this)); + }, - topCartInit.container = $(topCartInit.container); - topCartInit.closeButton = $(topCartInit.closeButton); - - var topCartSettings = { - element: topCartInit.container.parent(), - elementHeader: topCartInit.container.prev(), - interval: null - }; - - topCartInit.closeButton.on('click', function () { - topCartInit.container.slideUp('slow', function () { - clearTimeout(topCartInit.interval); - }); - }); - - topCartSettings.element.on('mouseleave',function () { - topCartInit.interval = setTimeout(function () { - topCartInit.closeButton.trigger('click'); - }, topCartInit.intervalDuration); - }).on('mouseenter', function () { - clearTimeout(topCartSettings.interval); - }); - - topCartSettings.elementHeader.on('click', function () { - $(topCartInit.container).slideToggle('slow'); - }); + /** + * Clear (stop) the timer that controls the show/hide of the checkout top-cart. + * @private + */ + _stopTimer: function() { + clearTimeout(this.timer); + }, + /** + * Executes when the mouse leaves the top-cart area. Initiates hiding of the top-cart + * after a set interval duration. + * @private + */ + _onMouseleave: function() { + this._stopTimer(); + this.timer = setTimeout($.proxy(this.hide, this), this.options.intervalDuration); + } }); })(jQuery); \ No newline at end of file diff --git a/app/code/core/Mage/Checkout/view/frontend/js/discount-codes.js b/app/code/core/Mage/Checkout/view/frontend/js/discount-codes.js index f2c4204538e6d9b6b912e95ca27fbdbac1fb6579..73fdcc71420ce343947b23613ca18c0cc0733f49 100644 --- a/app/code/core/Mage/Checkout/view/frontend/js/discount-codes.js +++ b/app/code/core/Mage/Checkout/view/frontend/js/discount-codes.js @@ -27,17 +27,17 @@ $.widget('mage.discountCode', { options: { }, - _create: function() { + _create: function () { this.couponCode = $(this.options.couponCodeSelector); this.removeCoupon = $(this.options.removeCouponSelector); - $(this.options.applyButton).on('click', $.proxy(function() { + $(this.options.applyButton).on('click', $.proxy(function () { this.couponCode.attr('data-validate', '{required:true}'); this.removeCoupon.attr('value', '0'); - this.element.mage().validate().submit(); + $(this.element).validation().submit(); }, this)); - $(this.options.cancelButton).on('click', $.proxy(function() { + $(this.options.cancelButton).on('click', $.proxy(function () { this.couponCode.removeAttr('data-validate'); this.removeCoupon.attr('value', '1'); this.element.submit(); diff --git a/app/code/core/Mage/Checkout/view/frontend/js/region-updater.js b/app/code/core/Mage/Checkout/view/frontend/js/region-updater.js index 809b5dc36308695d70c26560b88b5644fa91863c..81d7fcf19b24bf7cd79d8c13399cff53fb5b8e36 100644 --- a/app/code/core/Mage/Checkout/view/frontend/js/region-updater.js +++ b/app/code/core/Mage/Checkout/view/frontend/js/region-updater.js @@ -26,55 +26,79 @@ (function($) { $.widget('mage.regionUpdater', { options: { + regionTemplate: '<option value="${value}" title="${title}" {{if isSelected}}selected="selected"{{/if}}>${title}</option>' }, + _create: function() { this._updateRegion(this.element.find('option:selected').val()); this.element.on('change', $.proxy(function(e) { this._updateRegion($(e.target).val()); }, this)); - // Form validation this.element.addClass('required'); - $(this.options.formId).mage().validate(); - $(this.options.formId + ' button').on('click', $.proxy(function() { - $(this.options.formId).submit(); + }, + + /** + * Remove options from dropdown list + * @param {object} selectElement - jQuery object for dropdown list + * @private + */ + _removeSelectOptions: function(selectElement) { + selectElement.find('option').each(function (index){ + index && $(this).remove(); + }); + }, + + /** + * Render dropdown list + * @param {object} selectElement - jQuery object for dropdown list + * @param {string} key - region code + * @param {object} value - region object + * @private + */ + _renderSelectOption: function(selectElement, key, value) { + selectElement.append($.proxy(function() { + $.template('regionTemplate', this.options.regionTemplate); + if (this.options.defaultRegion === key) { + return $.tmpl('regionTemplate', {value: key, title: value.name, isSelected: true}); + } else { + return $.tmpl('regionTemplate', {value: key, title: value.name}); + } }, this)); }, + + /** + * Update dropdown list based on the country selected + * @param {string} country - 2 uppercase letter for country code + * @private + */ _updateRegion: function(country) { // Clear validation error messages - var form = $(this.options.formId), - regionList = $(this.options.regionListId), + var regionList = $(this.options.regionListId), regionInput = $(this.options.regionInputId), - postcode = $(this.options.postcodeId); - form.find('div.mage-error').remove(); - form.find('.mage-error').removeClass('mage-error'); + postcode = $(this.options.postcodeId), + requiredLabel = regionList.parent().siblings('label').children('em'); + this.options.form && this.options.form.validation('clearError', + this.options.regionListId, this.options.regionInputId, this.options.postcodeId); // Populate state/province dropdown list if available or use input box if (this.options.regionJson[country]) { - regionList.find('option').each(function (index){ - index && $(this).remove(); - }); + this._removeSelectOptions(regionList); $.each(this.options.regionJson[country], $.proxy(function(key, value) { - regionList.append($.proxy(function() { - var option = '<option value="%v" title="%t">%t</option>'; - var optionWithSelect = '<option value="%v" title="%t" selected="selected">%t</option>'; - if (this.options.defaultRegion === key) { - return optionWithSelect.replace(/%v/g, key).replace(/%t/g, value.name); - } else { - return option.replace(/%v/g, key).replace(/%t/g, value.name); - } - }, this)); + this._renderSelectOption(regionList, key, value); }, this)); - regionList.addClass('required').show(); - regionInput.removeClass('required').hide(); + regionList.addClass('required-entry').show(); + regionInput.hide(); + requiredLabel.show(); } else { - regionList.removeClass('required').hide(); - regionInput.addClass('required').show(); + regionList.removeClass('required-entry').hide(); + regionInput.show(); + requiredLabel.hide(); } // If country is in optionalzip list, make postcode input not required $.inArray(country, this.options.countriesWithOptionalZip) >= 0 ? - regionList.add(regionInput).add(postcode).removeClass('required') : - regionList.add(regionInput).add(postcode).addClass('required'); + postcode.removeClass('required-entry').parent().siblings('label').children('em').hide() : + postcode.addClass('required-entry').parent().siblings('label').children('em').show(); // Add defaultvalue attribute to state/province select element regionList.attr('defaultvalue', this.options.defaultRegion); } }); -}(jQuery)); \ No newline at end of file +})(jQuery); \ No newline at end of file diff --git a/app/code/core/Mage/Checkout/view/frontend/js/sidebar.js b/app/code/core/Mage/Checkout/view/frontend/js/sidebar.js index 65af00a7445394432ee559b1e34e83624adb1e98..697cd7fcd5250aad18be4e3421824ecd706cbccd 100644 --- a/app/code/core/Mage/Checkout/view/frontend/js/sidebar.js +++ b/app/code/core/Mage/Checkout/view/frontend/js/sidebar.js @@ -25,24 +25,18 @@ /*jshint browser:true jquery:true*/ /*global confirm:true*/ (function ($) { - $(document).ready(function () { - var checkout = { - cartSelector: null, - isRecursive: undefined, - url: null, - button: null, - confirmMessage: null, - closeList: null - }; - - $.mage.event.trigger('mage.checkout.initialize', checkout); - $(checkout.cartSelector).decorate('list', checkout.isRecursive); - - $(checkout.button).on('click', function () { - location.href = checkout.url; - }); - $(checkout.closeList).on('click', function () { - return confirm(checkout.confirmMessage); - }); + $.widget('mage.sidebar', { + options: { + isRecursive: true + }, + _create: function() { + this.element.decorate('list', this.options.isRecursive); + $(this.options.checkoutButton).on('click', $.proxy(function() { + location.href = this.options.checkoutUrl; + }, this)); + $(this.options.removeButton).on('click', $.proxy(function() { + return confirm(this.options.confirmMessage); + }, this)); + } }); })(jQuery); diff --git a/app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php b/app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php index 862b23dd74f4c85ced22cb3362c4d6b95e618ba7..d9b871fbe09314a5ecd3bc53bf0fd60a15e481e8 100644 --- a/app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php +++ b/app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php @@ -49,6 +49,24 @@ class Mage_Cms_Helper_Wysiwyg_Images extends Mage_Core_Helper_Abstract */ protected $_storeId = null; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * Constructor + * + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->ensureDirectoryExists($this->getStorageRoot()); + $this->_filesystem->setWorkingDirectory($this->getStorageRoot()); + } + /** * Set a specified store ID value @@ -204,13 +222,16 @@ class Mage_Cms_Helper_Wysiwyg_Images extends Mage_Core_Helper_Abstract $path = $this->_getRequest()->getParam($this->getTreeNodeName()); if ($path) { $path = $this->convertIdToPath($path); - if (is_dir($path)) { + if ($this->_filesystem->isDirectory($path)) { $currentPath = $path; } } - $io = new Varien_Io_File(); - if (!$io->isWriteable($currentPath) && !$io->mkdir($currentPath)) { - $message = Mage::helper('Mage_Cms_Helper_Data')->__('The directory %s is not writable by server.',$currentPath); + try { + if (!$this->_filesystem->isWritable($currentPath)) { + $this->_filesystem->createDirectory($currentPath); + } + } catch (Magento_Filesystem_Exception $e) { + $message = Mage::helper('Mage_Cms_Helper_Data')->__('The directory %s is not writable by server.', $currentPath); Mage::throwException($message); } $this->_currentPath = $currentPath; diff --git a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php index a4a758eb34849b89316a6e85b8d7bf39714ec0ef..abcd1c2839e2ccfcdc630bfddcc8c0537bad6b03 100644 --- a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php @@ -51,6 +51,25 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object */ protected $_configAsArray; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * Constructor + * + * @param Magento_Filesystem $filesystem + * @param array $data + */ + public function __construct(Magento_Filesystem $filesystem, array $data = array()) + { + $this->_filesystem = $filesystem; + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->setWorkingDirectory($this->getHelper()->getStorageRoot()); + parent::__construct($data); + } + /** * Return one-level child directories for specified path * @@ -63,9 +82,7 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object $subDirectories = Mage::getModel('Mage_Core_Model_File_Storage_Directory_Database')->getSubdirectories($path); foreach ($subDirectories as $directory) { $fullPath = rtrim($path, DS) . DS . $directory['name']; - if (!file_exists($fullPath)) { - mkdir($fullPath, 0777, true); - } + $this->_filesystem->ensureDirectoryExists($fullPath, 0777, $path); } } @@ -187,18 +204,18 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object if (!preg_match(self::DIRECTORY_NAME_REGEXP, $name)) { Mage::throwException(Mage::helper('Mage_Cms_Helper_Data')->__('Invalid folder name. Please, use alphanumeric characters, underscores and dashes.')); } - if (!is_dir($path) || !is_writable($path)) { + if (!$this->_filesystem->isDirectory($path) || !$this->_filesystem->isWritable($path)) { $path = $this->getHelper()->getStorageRoot(); } $newPath = $path . DS . $name; - if (file_exists($newPath)) { + if ($this->_filesystem->isDirectory($newPath, $path)) { Mage::throwException(Mage::helper('Mage_Cms_Helper_Data')->__('A directory with the same name already exists. Please try another folder name.')); } - $io = new Varien_Io_File(); - if ($io->mkdir($newPath)) { + $this->_filesystem->createDirectory($newPath); + try { if (Mage::helper('Mage_Core_Helper_File_Storage_Database')->checkDbUsage()) { $relativePath = Mage::helper('Mage_Core_Helper_File_Storage_Database')->getMediaRelativePath($newPath); Mage::getModel('Mage_Core_Model_File_Storage_Directory_Database')->createRecursive($relativePath); @@ -211,8 +228,9 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object 'id' => $this->getHelper()->convertPathToId($newPath) ); return $result; + } Catch (Magento_Filesystem_Exception $e) { + Mage::throwException(Mage::helper('Mage_Cms_Helper_Data')->__('Cannot create new directory.')); } - Mage::throwException(Mage::helper('Mage_Cms_Helper_Data')->__('Cannot create new directory.')); } /** @@ -231,17 +249,20 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object Mage::throwException(Mage::helper('Mage_Cms_Helper_Data')->__('Cannot delete root directory %s.', $path)); } - $io = new Varien_Io_File(); if (Mage::helper('Mage_Core_Helper_File_Storage_Database')->checkDbUsage()) { Mage::getModel('Mage_Core_Model_File_Storage_Directory_Database')->deleteDirectory($path); } - if (!$io->rmdir($path, true)) { + try { + $this->_filesystem->delete($path); + } catch (Magento_Filesystem_Exception $e) { Mage::throwException(Mage::helper('Mage_Cms_Helper_Data')->__('Cannot delete directory %s.', $path)); } if (strpos($pathCmp, $rootCmp) === 0) { - $io->rmdir($this->getThumbnailRoot() . DS . ltrim(substr($pathCmp, strlen($rootCmp)), '\\/'), true); + $this->_filesystem->delete( + $this->getThumbnailRoot() . DS . ltrim(substr($pathCmp, strlen($rootCmp)), '\\/') + ); } } @@ -253,13 +274,16 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object */ public function deleteFile($target) { - $io = new Varien_Io_File(); - $io->rm($target); + if ($this->_filesystem->isFile($target)) { + $this->_filesystem->delete($target); + } Mage::helper('Mage_Core_Helper_File_Storage_Database')->deleteFile($target); $thumb = $this->getThumbnailPath($target, true); if ($thumb) { - $io->rm($thumb); + if ($this->_filesystem->isFile($thumb)) { + $this->_filesystem->delete($thumb); + } Mage::helper('Mage_Core_Helper_File_Storage_Database')->deleteFile($thumb); } return $this; @@ -316,7 +340,7 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object if (strpos($filePath, $mediaRootDir) === 0) { $thumbPath = $this->getThumbnailRoot() . DS . substr($filePath, strlen($mediaRootDir)); - if (! $checkFile || is_readable($thumbPath)) { + if (!$checkFile || $this->_filesystem->isReadable($thumbPath)) { return $thumbPath; } } @@ -338,7 +362,7 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object if (strpos($filePath, $mediaRootDir) === 0) { $thumbSuffix = self::THUMBS_DIRECTORY_NAME . DS . substr($filePath, strlen($mediaRootDir)); - if (! $checkFile || is_readable($mediaRootDir . $thumbSuffix)) { + if (! $checkFile || $this->_filesystem->isReadable($mediaRootDir . $thumbSuffix)) { $randomIndex = '?rand=' . time(); return str_replace('\\', '/', $this->getHelper()->getBaseUrl() . $thumbSuffix) . $randomIndex; } @@ -356,16 +380,16 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object */ public function resizeFile($source, $keepRation = true) { - if (!is_file($source) || !is_readable($source)) { + if (!$this->_filesystem->isFile($source) + || !$this->_filesystem->isReadable($source)) { return false; } $targetDir = $this->getThumbsPath($source); - $io = new Varien_Io_File(); - if (!$io->isWriteable($targetDir)) { - $io->mkdir($targetDir); + if (!$this->_filesystem->isWritable($targetDir)) { + $this->_filesystem->createDirectory($targetDir); } - if (!$io->isWriteable($targetDir)) { + if (!$this->_filesystem->isWritable($targetDir)) { return false; } $adapter = Mage::helper('Mage_Core_Helper_Data')->getImageAdapterType(); @@ -377,7 +401,7 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object $image->resize($width, $height); $dest = $targetDir . DS . pathinfo($source, PATHINFO_BASENAME); $image->save($dest); - if (is_file($dest)) { + if ($this->_filesystem->isFile($dest)) { return $dest; } return false; diff --git a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage/Collection.php b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage/Collection.php index d194647030b52b79771b8ba6e9ee16eda5040b21..0704fb9e24eef7087bdd5a6923b044c3eb944576 100644 --- a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage/Collection.php +++ b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage/Collection.php @@ -33,14 +33,30 @@ */ class Mage_Cms_Model_Wysiwyg_Images_Storage_Collection extends Varien_Data_Collection_Filesystem { + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * Constructor + * + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + parent::__construct(); + } + protected function _generateRow($filename) { $filename = preg_replace('~[/\\\]+~', DIRECTORY_SEPARATOR, $filename); - + return array( 'filename' => $filename, 'basename' => basename($filename), - 'mtime' => filemtime($filename) + 'mtime' => $this->_filesystem->getMTime($filename) ); } } diff --git a/app/code/core/Mage/Connect/Block/Adminhtml/Extension/Custom/Edit.php b/app/code/core/Mage/Connect/Block/Adminhtml/Extension/Custom/Edit.php index 2a783005a1bfdee64f3ef170c96facfec12d8353..d50fd3f6c46bf1f471591e6f18fdf8fd27efafde 100644 --- a/app/code/core/Mage/Connect/Block/Adminhtml/Extension/Custom/Edit.php +++ b/app/code/core/Mage/Connect/Block/Adminhtml/Extension/Custom/Edit.php @@ -53,16 +53,20 @@ class Mage_Connect_Block_Adminhtml_Extension_Custom_Edit extends Mage_Adminhtml_ 'label' => Mage::helper('Mage_Connect_Helper_Data')->__('Save Data and Create Package'), 'class' => 'save', 'onclick' => "createPackage()", - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#edit_form'), + ), ), )); $this->_addButton('save_as', array( 'label' => Mage::helper('Mage_Connect_Helper_Data')->__('Save As...'), 'title' => Mage::helper('Mage_Connect_Helper_Data')->__('Save package with custom package file name'), 'onclick' => 'saveAsPackage(event)', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#edit_form'), + ), ), )); } diff --git a/app/code/core/Mage/Connect/Helper/Data.php b/app/code/core/Mage/Connect/Helper/Data.php index 2dd56624169ebe3e8f4e25d0adaea48be0109fe3..18d8c10882847fbd499b1a4a6dbde17272eab2ed 100644 --- a/app/code/core/Mage/Connect/Helper/Data.php +++ b/app/code/core/Mage/Connect/Helper/Data.php @@ -33,6 +33,19 @@ */ class Mage_Connect_Helper_Data extends Mage_Core_Helper_Data { + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + } + /** * Retrieve file system path for local extension packages * Return path with last directory separator @@ -127,16 +140,16 @@ class Mage_Connect_Helper_Data extends Mage_Core_Helper_Data $xmlFile = $path . $packageName . '.xml'; $serFile = $path . $packageName . '.ser'; - if (file_exists($xmlFile) && is_readable($xmlFile)) { - $xml = simplexml_load_file($xmlFile); + if ($this->_filesystem->isFile($xmlFile) && $this->_filesystem->isReadable($xmlFile)) { + $xml = simplexml_load_string($this->_filesystem->read($xmlFile)); $data = Mage::helper('Mage_Core_Helper_Data')->xmlToAssoc($xml); if (!empty($data)) { return $data; } } - if (file_exists($serFile) && is_readable($xmlFile)) { - $data = unserialize(file_get_contents($serFile)); + if ($this->_filesystem->isFile($serFile) && $this->_filesystem->isReadable($xmlFile)) { + $data = unserialize($this->_filesystem->read($serFile)); if (!empty($data)) { return $data; } diff --git a/app/code/core/Mage/Connect/Model/Extension.php b/app/code/core/Mage/Connect/Model/Extension.php index 16deae927fdb173ff737979b7938a9728c592ed9..88b5769ac0e373e0704e718c368c59f1feed1a26 100644 --- a/app/code/core/Mage/Connect/Model/Extension.php +++ b/app/code/core/Mage/Connect/Model/Extension.php @@ -24,7 +24,6 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - /** * Extension model * @@ -35,19 +34,34 @@ class Mage_Connect_Model_Extension extends Varien_Object { /** - * Cache for targets - * - * @var array - */ + * Cache for targets + * + * @var array + */ protected $_targets; /** - * Internal cache for package - * - * @var Mage_Connect_Package - */ + * Internal cache for package + * + * @var Mage_Connect_Package + */ protected $_package; + /** + * @var Magento_Filesystem $filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + * @param array $data + */ + public function __construct(Magento_Filesystem $filesystem, array $data = array()) + { + parent::__construct($data); + $this->_filesystem = $filesystem; + } + /** * Return package object * @@ -62,10 +76,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Set package object. - * - * @return Mage_Connect_Model_Extension - */ + * Set package object. + * + * @return Mage_Connect_Model_Extension + */ public function generatePackageXml() { Mage::getSingleton('Mage_Connect_Model_Session') @@ -85,10 +99,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Set general information. - * - * @return Mage_Connect_Model_Extension - */ + * Set general information. + * + * @return Mage_Connect_Model_Extension + */ protected function _setPackage() { $this->getPackage() @@ -101,10 +115,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Set release information - * - * @return Mage_Connect_Model_Extension - */ + * Set release information + * + * @return Mage_Connect_Model_Extension + */ protected function _setRelease() { $this->getPackage() @@ -117,10 +131,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Set authors - * - * @return Mage_Connect_Model_Extension - */ + * Set authors + * + * @return Mage_Connect_Model_Extension + */ protected function _setAuthors() { $authors = $this->getData('authors'); @@ -132,17 +146,16 @@ class Mage_Connect_Model_Extension extends Varien_Object return $this; } - protected function packageFilesToArray($filesString) { $packageFiles = array(); - if($filesString) { + if ($filesString) { $filesArray = preg_split("/[\n\r]+/", $filesString); - foreach($filesArray as $file) { + foreach ($filesArray as $file) { $file = trim($file, "/"); $res = explode(DIRECTORY_SEPARATOR, $file, 2); array_map('trim', $res); - if(2 == count($res)) { + if (2 == count($res)) { $packageFiles[] = array('target'=>$res[0], 'path'=>$res[1]); } } @@ -151,10 +164,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Set php, php extensions, another packages dependencies - * - * @return Mage_Connect_Model_Extension - */ + * Set php, php extensions, another packages dependencies + * + * @return Mage_Connect_Model_Extension + */ protected function _setDependencies() { $this->getPackage() @@ -193,10 +206,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Set contents. Add file or entire directory. - * - * @return Mage_Connect_Model_Extension - */ + * Set contents. Add file or entire directory. + * + * @return Mage_Connect_Model_Extension + */ protected function _setContents() { $this->getPackage()->clearContents(); @@ -223,10 +236,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Save package file to var/connect. - * - * @return boolean - */ + * Save package file to var/connect. + * + * @return boolean + */ public function savePackage() { if ($this->getData('file_name') != '') { @@ -243,42 +256,40 @@ class Mage_Connect_Model_Extension extends Varien_Object if (!$this->getPackageXml()) { $this->generatePackageXml(); } + if (!$this->getPackageXml()) { return false; } - $path = Mage::helper('Mage_Connect_Helper_Data')->getLocalPackagesPath(); - if (!@file_put_contents($path . 'package.xml', $this->getPackageXml())) { - return false; - } + try { + $path = Mage::helper('Mage_Connect_Helper_Data')->getLocalPackagesPath(); + $this->_filesystem->write($path . 'package.xml', $this->getPackageXml()); - $this->unsPackageXml(); - $this->unsTargets(); - $xml = Mage::helper('Mage_Core_Helper_Data')->assocToXml($this->getData()); - $xml = new Varien_Simplexml_Element($xml->asXML()); + $this->unsPackageXml(); + $this->unsTargets(); + $xml = Mage::helper('Mage_Core_Helper_Data')->assocToXml($this->getData()); + $xml = new Varien_Simplexml_Element($xml->asXML()); - // prepare dir to save - $parts = explode(DS, $fileName); - array_pop($parts); - $newDir = implode(DS, $parts); - if ((!empty($newDir)) && (!is_dir($path . $newDir))) { - if (!@mkdir($path . $newDir, 0777, true)) { - return false; - } - } + // prepare dir to save + $parts = explode(DS, $fileName); + array_pop($parts); + $newDir = implode(DS, $parts); - if (!@file_put_contents($path . $fileName . '.xml', $xml->asNiceXml())) { + if (!empty($newDir) && !$this->_filesystem->isDirectory($path . $newDir)) { + $this->_filesystem->ensureDirectoryExists($path, $newDir, 0777); + } + $this->_filesystem->write($path . $fileName . '.xml', $xml->asNiceXml()); + } catch (Magento_Filesystem_Exception $e) { return false; } - return true; } /** - * Create package file - * - * @return boolean - */ + * Create package file + * + * @return boolean + */ public function createPackage() { $path = Mage::helper('Mage_Connect_Helper_Data')->getLocalPackagesPath(); @@ -293,10 +304,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Create package file compatible with previous version of Magento Connect Manager - * - * @return boolean - */ + * Create package file compatible with previous version of Magento Connect Manager + * + * @return boolean + */ public function createPackageV1x() { $path = Mage::helper('Mage_Connect_Helper_Data')->getLocalPackagesPathV1x(); @@ -311,10 +322,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Retrieve stability value and name for options - * - * @return array - */ + * Retrieve stability value and name for options + * + * @return array + */ public function getStabilityOptions() { return array( @@ -326,10 +337,10 @@ class Mage_Connect_Model_Extension extends Varien_Object } /** - * Retrieve targets - * - * @return array - */ + * Retrieve targets + * + * @return array + */ public function getLabelTargets() { if (!is_array($this->_targets)) { diff --git a/app/code/core/Mage/Core/Block/Html/Date/Jquery/Calendar.php b/app/code/core/Mage/Core/Block/Html/Date/Jquery/Calendar.php deleted file mode 100644 index 39c0516cf3c1b6139e29813b132f1c5a35966e6e..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Core/Block/Html/Date/Jquery/Calendar.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category Mage - * @package Mage_Core - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * HTML calendar element block implemented using the jQuery datepicker widget. - * - * @category Mage - * @package Mage_Core - * @author Magento Core Team <core@magentocommerce.com> - */ -class Mage_Core_Block_Html_Date_Jquery_Calendar extends Mage_Core_Block_Html_Date -{ - /** - * File path for the regional localized Javascript file. - */ - const LOCALIZED_URL_PATH = 'jquery/ui/i18n/jquery.ui.datepicker-%s.js'; - - /** - * Return the path to the localized Javascript file given the locale or null if it doesn't exist. - * - * @param string $locale - The locale (e.g. en-US or just en) - * @return string - Url path to the localized Javascript file - * - * @SuppressWarnings(PHPMD.UnusedLocalVariable) - */ - private function _getUrlPathByLocale($locale) - { - $urlPath = sprintf(self::LOCALIZED_URL_PATH, $locale); - try { - $urlPath = $this->getViewFileUrl($urlPath); - } catch (Magento_Exception $e) { - $urlPath = null; - } - return $urlPath; - } - - /** - * Generate HTML containing a Javascript <script> tag for creating a calendar instance implemented - * using the jQuery datepicker. - * - * @return string - */ - protected function _toHtml() - { - $displayFormat = Magento_Date_Jquery_Calendar::convertToDateTimeFormat( - $this->getFormat(), true, (bool)$this->getTime() - ); - - $html = '<input type="text" name="' . $this->getName() . '" id="' . $this->getId() . '" '; - $html .= 'value="' . $this->escapeHtml($this->getValue()) . '" class="' . $this->getClass() . '" ' - . $this->getExtraParams() . '/> '; - - $yearRange = "c-10:c+10"; /* Default the range to the current year + or - 10 years. */ - $calendarYearsRange = $this->getYearsRange(); - if ($calendarYearsRange) { - /* Convert to the year range format that the jQuery datepicker understands. */ - sscanf($calendarYearsRange, "[%[0-9], %[0-9]]", $yearStart, $yearEnd); - $yearRange = "$yearStart:$yearEnd"; - } - - /* First include jquery-ui. */ - $jsFiles = '"' . $this->getViewFileUrl("jquery/jquery-ui.min.js") . '", '; - - /* There are a small handful of localized files that use the 5 character locale. */ - $locale = str_replace('_', '-', Mage::app()->getLocale()->getLocaleCode()); - $localizedJsFilePath = $this->_getUrlPathByLocale($locale); - - if ($localizedJsFilePath == null) { - /* Most localized files use the 2 character locale. */ - $locale = substr($locale, 0, 2); - $localizedJsFilePath = $this->_getUrlPathByLocale($locale); - if ($localizedJsFilePath == null) { - /* Localized Javascript file doesn't exist. Default locale to empty string (English). */ - $locale = ''; - } else { - /* Include the regional localized Javascript file. */ - $jsFiles .= '"' . $localizedJsFilePath . '", '; - } - } else { - /* Include the regional localized Javascript file. */ - $jsFiles .= '"' . $localizedJsFilePath . '", '; - } - - $jsFiles .= '"' . $this->getViewFileUrl("mage/calendar/calendar.js") . '"'; /* Lastly, the datepicker. */ - $cssFile = '"' . $this->getViewFileUrl("mage/calendar/css/calendar.css") . '"'; - - $html - .= ' - <script type="text/javascript"> - //<![CDATA[ - (function($) { - $.mage.event.observe("mage.calendar.initialize", function (event, initData) { - var datepicker = { - inputSelector: "#' . $this->getId() . '", - locale: "' . $locale . '", - options: { - buttonImage: "' . $this->getImage() . '", - buttonText: "' . $this->helper("Mage_Core_Helper_Data")->__("Select Date") . '", - dateFormat: "' . $displayFormat . '", - yearRange: "' . $yearRange . '" - } - }; - initData.datepicker.push(datepicker); - }); - $.mage.load.css( ' . $cssFile . ' ); - $.mage.load.jsSync(' . $jsFiles . '); - })(jQuery); - //]]> - </script>'; - - return $html; - } -} diff --git a/app/code/core/Mage/Core/Block/Template.php b/app/code/core/Mage/Core/Block/Template.php index 63bbdfa1e0440ae4622de292da01ccfe3694647a..3d16eea73032e9f7716b49f3592720a27d57f7c7 100644 --- a/app/code/core/Mage/Core/Block/Template.php +++ b/app/code/core/Mage/Core/Block/Template.php @@ -73,6 +73,60 @@ class Mage_Core_Block_Template extends Mage_Core_Block_Abstract */ protected $_template; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Core_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem + * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Core_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, + array $data = array() + ) { + parent::__construct( + $request, + $layout, + $eventManager, + $urlBuilder, + $translator, + $cache, + $designPackage, + $session, + $storeConfig, + $frontController, + $helperFactory, + $data + ); + $this->_filesystem = $filesystem; + } + /** * Internal constructor, that is called from real constructor */ @@ -169,8 +223,9 @@ class Mage_Core_Block_Template extends Mage_Core_Block_Abstract */ public function setScriptPath($dir) { - $scriptPath = realpath($dir); - if (strpos($scriptPath, realpath(Mage::getBaseDir('design'))) === 0 || $this->_getAllowSymlinks()) { + if (Magento_Filesystem::isPathInDirectory($dir, Mage::getBaseDir('design')) + || $this->_getAllowSymlinks() + ) { $this->_viewDir = $dir; } else { Mage::log('Not valid script path:' . $dir, Zend_Log::CRIT, null, true); @@ -240,17 +295,19 @@ HTML; } try { - $templateFile = realpath($fileName); - if (strpos($templateFile, Mage::getBaseDir('app')) === 0 - || strpos($templateFile, realpath($this->_viewDir)) === 0 || $this->_getAllowSymlinks() + if ((Magento_Filesystem::isPathInDirectory($fileName, Mage::getBaseDir('app')) + || Magento_Filesystem::isPathInDirectory($fileName, $this->_viewDir) + || $this->_getAllowSymlinks()) && $this->_filesystem->isFile($fileName) ) { - include $templateFile; + include $fileName; } else { Mage::log("Invalid template file: '{$fileName}'", Zend_Log::CRIT, null, true); } } catch (Exception $e) { - ob_get_clean(); + if (!$do) { + ob_get_clean(); + } throw $e; } diff --git a/app/code/core/Mage/Core/Controller/Varien/Action.php b/app/code/core/Mage/Core/Controller/Varien/Action.php index 15ecdce39ba890249e2e8e25385e8d1e53cfb8fa..6fa69f84e8beb2152263ffcd8ce9f7859e98c984 100755 --- a/app/code/core/Mage/Core/Controller/Varien/Action.php +++ b/app/code/core/Mage/Core/Controller/Varien/Action.php @@ -1120,6 +1120,8 @@ abstract class Mage_Core_Controller_Varien_Action extends Mage_Core_Controller_V $contentType = 'application/octet-stream', $contentLength = null) { + /** @var Magento_Filesystem $filesystem */ + $filesystem = $this->_objectManager->create('Magento_Filesystem'); $isFile = false; $file = null; if (is_array($content)) { @@ -1129,7 +1131,7 @@ abstract class Mage_Core_Controller_Varien_Action extends Mage_Core_Controller_V if ($content['type'] == 'filename') { $isFile = true; $file = $content['value']; - $contentLength = filesize($file); + $contentLength = $filesystem->getFileSize($file); } } @@ -1147,18 +1149,16 @@ abstract class Mage_Core_Controller_Varien_Action extends Mage_Core_Controller_V $this->getResponse()->clearBody(); $this->getResponse()->sendHeaders(); - $ioAdapter = new Varien_Io_File(); - if (!$ioAdapter->fileExists($file)) { + if (!$filesystem->isFile($file)) { Mage::throwException(Mage::helper('Mage_Core_Helper_Data')->__('File not found')); } - $ioAdapter->open(array('path' => $ioAdapter->dirname($file))); - $ioAdapter->streamOpen($file, 'r'); - while ($buffer = $ioAdapter->streamRead()) { + $stream = $filesystem->createAndOpenStream($file, 'r'); + while ($buffer = $stream->read(1024)) { print $buffer; } - $ioAdapter->streamClose(); + $stream->close(); if (!empty($content['rm'])) { - $ioAdapter->rm($file); + $filesystem->delete($file); } exit(0); diff --git a/app/code/core/Mage/Core/Controller/Varien/Router/Base.php b/app/code/core/Mage/Core/Controller/Varien/Router/Base.php index 12fa314c175ea1659c0d251b83af3adbe7e2f733..f14298d53d5befdaf6ec47cedc901a5239cbaf55 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Router/Base.php +++ b/app/code/core/Mage/Core/Controller/Varien/Router/Base.php @@ -58,24 +58,27 @@ class Mage_Core_Controller_Varien_Router_Base extends Mage_Core_Controller_Varie /** * @var Magento_ObjectManager */ - protected $_objectManager; + protected $_app; /** * @param Mage_Core_Controller_Varien_Action_Factory $controllerFactory - * @param Magento_ObjectManager $objectManager + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Model_App $app * @param string $areaCode * @param string $baseController * @throws InvalidArgumentException */ public function __construct( Mage_Core_Controller_Varien_Action_Factory $controllerFactory, - Magento_ObjectManager $objectManager, + Magento_Filesystem $filesystem, + Mage_Core_Model_App $app, $areaCode, $baseController ) { parent::__construct($controllerFactory); - $this->_objectManager = $objectManager; + $this->_app = $app; + $this->_filesystem = $filesystem; $this->_areaCode = $areaCode; $this->_baseController = $baseController; @@ -175,7 +178,7 @@ class Mage_Core_Controller_Varien_Router_Base extends Mage_Core_Controller_Varie return null; } - $this->_objectManager->loadAreaConfiguration($this->_areaCode); + $this->_app->loadDiConfiguration($this->_areaCode); return $this->_matchController($request, $params); } @@ -483,7 +486,7 @@ class Mage_Core_Controller_Varien_Router_Base extends Mage_Core_Controller_Varie protected function _includeControllerClass($controllerFileName, $controllerClassName) { if (!class_exists($controllerClassName, false)) { - if (!file_exists($controllerFileName)) { + if (!$this->_filesystem->isFile($controllerFileName)) { return false; } include $controllerFileName; @@ -527,7 +530,7 @@ class Mage_Core_Controller_Varien_Router_Base extends Mage_Core_Controller_Varie { foreach ($modules as $module) { if ($moduleName === $module || (is_array($module) - && $this->getModuleByName($moduleName, $module))) { + && $this->getModuleByName($moduleName, $module))) { return true; } } @@ -561,7 +564,11 @@ class Mage_Core_Controller_Varien_Router_Base extends Mage_Core_Controller_Varie public function validateControllerFileName($fileName) { - if ($fileName && is_readable($fileName) && false===strpos($fileName, '//')) { + if ($fileName + && $this->_filesystem->isFile($fileName) + && $this->_filesystem->isReadable($fileName) + && false === strpos($fileName, '//') + ) { return true; } return false; diff --git a/app/code/core/Mage/Core/Helper/File/Storage.php b/app/code/core/Mage/Core/Helper/File/Storage.php index 399b1199db737243109be7b30e34bf7cbf7a2a3d..e1fdb8c53b08c70d4a20fae2893ba5f5456de312 100644 --- a/app/code/core/Mage/Core/Helper/File/Storage.php +++ b/app/code/core/Mage/Core/Helper/File/Storage.php @@ -33,14 +33,6 @@ */ class Mage_Core_Helper_File_Storage extends Mage_Core_Helper_Abstract { - /** - * Maximum file size for MAX_FILE_SIZE attribute of a form - * - * @link http://www.php.net/manual/en/features.file-upload.post-method.php - * @var integer - */ - protected static $_maxFileSize = -1; - /** * Current storage code * @@ -143,105 +135,4 @@ class Mage_Core_Helper_File_Storage extends Mage_Core_Helper_Abstract return $this->getStorageFileModel()->saveFile($file, true); } - /** - * Get post max size - * - * @return string - */ - public function getPostMaxSize() - { - return $this->_iniGet('post_max_size'); - } - - /** - * Get upload max size - * - * @return string - */ - public function getUploadMaxSize() - { - return $this->_iniGet('upload_max_filesize'); - } - - /** - * Gets the value of a configuration option - * - * @link http://php.net/manual/en/function.ini-get.php - * @param string $param The configuration option name - * @return string - */ - protected function _iniGet($param) - { - return trim(ini_get($param)); - } - - /** - * Get max file size in megabytes - * - * @param int $precision - * @param int $mode - * @return float - */ - public function getMaxFileSizeInMb($precision = 0, $mode = PHP_ROUND_HALF_DOWN) - { - return round($this->getMaxFileSize() / (1024 * 1024), $precision, $mode); - } - - /** - * Get the maximum file size of the a form in bytes - * - * @return integer - */ - public function getMaxFileSize() - { - if (self::$_maxFileSize < 0) { - $postMaxSize = $this->_convertIniToInteger($this->getPostMaxSize()); - $uploadMaxSize = $this->_convertIniToInteger($this->getUploadMaxSize()); - $min = max($postMaxSize, $uploadMaxSize); - - if ($postMaxSize > 0) { - $min = min($min, $postMaxSize); - } - - if ($uploadMaxSize > 0) { - $min = min($min, $uploadMaxSize); - } - - self::$_maxFileSize = $min; - } - - return self::$_maxFileSize; - } - - /** - * Converts a ini setting to a integer value - * - * @param string $setting - * @return integer - */ - protected function _convertIniToInteger($setting) - { - if (!is_numeric($setting)) { - $type = strtoupper(substr($setting, -1)); - $setting = (integer)$setting; - - switch ($type) { - case 'K': - $setting *= 1024; - break; - - case 'M': - $setting *= 1024 * 1024; - break; - - case 'G': - $setting *= 1024 * 1024 * 1024; - break; - - default: - break; - } - } - return (integer)$setting; - } } diff --git a/app/code/core/Mage/Core/Helper/File/Storage/Database.php b/app/code/core/Mage/Core/Helper/File/Storage/Database.php index 53425d507e9a088adb2728492940f0306745401a..dd88d7651e5bf038ca0ba6bc89e9d60d55295321 100644 --- a/app/code/core/Mage/Core/Helper/File/Storage/Database.php +++ b/app/code/core/Mage/Core/Helper/File/Storage/Database.php @@ -59,6 +59,19 @@ class Mage_Core_Helper_File_Storage_Database extends Mage_Core_Helper_Abstract */ protected $_mediaBaseDirectory; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + } + /** * Check if we use DB storage * Note: Disabled as not completed feature @@ -268,9 +281,8 @@ class Mage_Core_Helper_File_Storage_Database extends Mage_Core_Helper_Abstract $uniqueResultFile = $this->getUniqueFilename($path, $file); if ($uniqueResultFile !== $file) { - $ioFile = new Varien_Io_File(); - $ioFile->open(array('path' => $path)); - $ioFile->mv($path . $file, $path . $uniqueResultFile); + $this->_filesystem->setWorkingDirectory($path); + $this->_filesystem->rename($path . $file, $path . $uniqueResultFile); } $this->saveFile($path . $uniqueResultFile); diff --git a/app/code/core/Mage/Core/Model/Abstract.php b/app/code/core/Mage/Core/Model/Abstract.php index c8f52d2e49cbc3510a85e0d1e12ce81ae4f33924..bd635203ebd288bef4cd309c0a5bc7c48d494842 100644 --- a/app/code/core/Mage/Core/Model/Abstract.php +++ b/app/code/core/Mage/Core/Model/Abstract.php @@ -183,8 +183,8 @@ abstract class Mage_Core_Model_Abstract extends Varien_Object public function __wakeup() { if (Mage::getIsSerializable()) { - $this->_eventDispatcher = Mage::getModel('Mage_Core_Model_Event_Manager'); - $this->_cacheManager = Mage::getModel('Mage_Core_Model_Cache'); + $this->_eventDispatcher = Mage::getObjectManager()->get('Mage_Core_Model_Event_Manager'); + $this->_cacheManager = Mage::getObjectManager()->get('Mage_Core_Model_Cache'); } } @@ -216,7 +216,7 @@ abstract class Mage_Core_Model_Abstract extends Varien_Object Mage::throwException(Mage::helper('Mage_Core_Helper_Data')->__('Resource is not set.')); } - return $this->_resource ? $this->_resource : Mage::getResourceSingleton($this->_resourceName); + return $this->_resource ?: Mage::getResourceSingleton($this->_resourceName); } /** diff --git a/app/code/core/Mage/Core/Model/App.php b/app/code/core/Mage/Core/Model/App.php index 1ac2b880ccc3f6eaa94d59a153c1dc3f4b67daf4..eabc277684393a00b091b36d4cc7e54aed6f4823 100644 --- a/app/code/core/Mage/Core/Model/App.php +++ b/app/code/core/Mage/Core/Model/App.php @@ -74,6 +74,11 @@ class Mage_Core_Model_App */ const ADMIN_STORE_ID = 0; + /** + * Dependency injection configuration node name + */ + const CONFIGURATION_DI_NODE = 'di'; + /** * Application loaded areas array * @@ -283,7 +288,7 @@ class Mage_Core_Model_App $this->_initCache(); $this->_config->init($options); $this->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS); - $this->_objectManager->loadAreaConfiguration(); + $this->loadDiConfiguration(); Magento_Profiler::stop('init_config'); if (Mage::isInstalled($options)) { @@ -366,7 +371,7 @@ class Mage_Core_Model_App $logger = $this->_initLogger(); $this->_initModules(); $this->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS); - $this->_objectManager->loadAreaConfiguration(); + $this->loadDiConfiguration(); if ($this->_config->isLocalConfigLoaded()) { $scopeCode = isset($params['scope_code']) ? $params['scope_code'] : ''; @@ -448,7 +453,8 @@ class Mage_Core_Model_App $options = array(); } $options = array_merge($options, $cacheInitOptions); - $this->_cache = Mage::getModel('Mage_Core_Model_Cache', array('options' => $options)); + $this->_cache = $this->_objectManager->create('Mage_Core_Model_Cache', array('options' => $options), false); + $this->_objectManager->addSharedInstance($this->_cache, 'Mage_Core_Model_Cache'); $this->_isCacheLocked = false; return $this; } @@ -1310,8 +1316,9 @@ class Mage_Core_Model_App public function cleanAllSessions() { if (session_module_name() == 'files') { - $dir = session_save_path(); - mageDelTree($dir); + /** @var Magento_Filesystem $filesystem */ + $filesystem = $this->_objectManager->create('Magento_Filesystem'); + $filesystem->delete(session_save_path()); } return $this; } @@ -1605,4 +1612,18 @@ class Mage_Core_Model_App { return Mage::getIsDeveloperMode(); } + + /** + * Load di configuration for given area + * + * @param string $areaCode + */ + public function loadDiConfiguration($areaCode = Mage_Core_Model_App_Area::AREA_GLOBAL) + { + $configurationNode = $this->_config->getNode($areaCode . '/' . self::CONFIGURATION_DI_NODE); + if ($configurationNode) { + $configuration = $configurationNode->asArray(); + $this->_objectManager->setConfiguration($configuration); + } + } } diff --git a/app/code/core/Mage/Core/Model/Config.php b/app/code/core/Mage/Core/Model/Config.php index ee59c49807f879762b510577168b63c2a90345b4..9ca5a3418cb996c5bb17df924d29258830b9decf 100644 --- a/app/code/core/Mage/Core/Model/Config.php +++ b/app/code/core/Mage/Core/Model/Config.php @@ -777,9 +777,9 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base /** * Returns node found by the $path and scope info * - * @param string $path - * @param string $scope - * @param string|int $scopeCode + * @param string $path + * @param string $scope + * @param string|int $scopeCode * @return Mage_Core_Model_Config_Element */ public function getNode($path = null, $scope = '', $scopeCode = null) @@ -790,8 +790,8 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base * Check path cache loading */ if ($this->_useCache && ($path !== null)) { - $path = explode('/', $path); - $section= $path[0]; + $path = explode('/', $path); + $section = $path[0]; if (isset($this->_cacheSections[$section])) { $res = $this->getSectionNode($path); if ($res !== false) { @@ -799,7 +799,8 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base } } } - return parent::getNode($path); + + return parent::getNode($path); } /** @@ -1184,7 +1185,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base * Get module config node * * @param string $moduleName - * @return Varien_Simplexml_Object + * @return Varien_Simplexml_Element */ public function getModuleConfig($moduleName = '') { @@ -1201,7 +1202,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base * * Defaults to Mage_Core_Setup * - * @param string|Varien_Simplexml_Object $module + * @param string|Varien_Simplexml_Element $module * @return object */ public function getModuleSetup($module = '') @@ -1423,7 +1424,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base * * @param string $modelClass * @param array|object $constructArguments - * @return Mage_Core_Model_Abstract|false + * @return Mage_Core_Model_Abstract|bool */ public function getModelInstance($modelClass = '', $constructArguments = array()) { @@ -1454,7 +1455,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base * Get resource configuration for resource name * * @param string $name - * @return Varien_Simplexml_Object + * @return Varien_Simplexml_Element */ public function getResourceConfig($name) { @@ -1487,7 +1488,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base * Retrieve resource type configuration for resource name * * @param string $type - * @return Varien_Simplexml_Object + * @return Varien_Simplexml_Element */ public function getResourceTypeConfig($type) { @@ -1598,7 +1599,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base * @param string $value * @param string $scope * @param int $scopeId - * @return Mage_Core_Store_Config + * @return Mage_Core_Model_Store_Config */ public function saveConfig($path, $value, $scope = Mage_Core_Model_Store::DEFAULT_CODE, $scopeId = 0) { diff --git a/app/code/core/Mage/Core/Model/Design/Fallback.php b/app/code/core/Mage/Core/Model/Design/Fallback.php index bcde638634ad5eb25df5f59e438b40493063d41a..e35d351afc5afafb1fb10e243de20c299613df92 100644 --- a/app/code/core/Mage/Core/Model/Design/Fallback.php +++ b/app/code/core/Mage/Core/Model/Design/Fallback.php @@ -55,10 +55,12 @@ class Mage_Core_Model_Design_Fallback implements Mage_Core_Model_Design_Fallback * 'themeConfig' may contain application config and theme config, respectively. If these these entries are not * present or null, then they will be retrieved from global application instance. * + * @param Magento_Filesystem $filesystem * @param array $data */ - public function __construct($data) + public function __construct(Magento_Filesystem $filesystem, $data) { + $this->_filesystem = $filesystem; $this->_area = $data['area']; $this->_locale = $data['locale']; $this->_theme = $data['themeModel']; @@ -128,12 +130,17 @@ class Mage_Core_Model_Design_Fallback implements Mage_Core_Model_Design_Fallback $themeModel = $themeModel->getParentTheme(); } + $extraDirs = array( + $this->_appConfig->getOptions()->getJsDir(), + Mage::getDesign()->getCustomizationDir() + ); + return $this->_fallback( $file, $dirs, $module, array("{$moduleDir}/{$this->_area}/locale/{$this->_locale}", "{$moduleDir}/{$this->_area}"), - array($this->_appConfig->getOptions()->getJsDir()) + $extraDirs ); } @@ -164,7 +171,7 @@ class Mage_Core_Model_Design_Fallback implements Mage_Core_Model_Design_Fallback $tryFile = ''; foreach ($dirs as $dir) { $tryFile = str_replace('/', DIRECTORY_SEPARATOR, "{$dir}/{$file}"); - if (file_exists($tryFile)) { + if ($this->_filesystem->has($tryFile)) { break; } } diff --git a/app/code/core/Mage/Core/Model/Design/Fallback/CachingProxy.php b/app/code/core/Mage/Core/Model/Design/Fallback/CachingProxy.php index 2451cb42599161a99a34263cdb78d25f48063fc4..68e23926eea963e90ae368c8d3ea2685b9b305ef 100644 --- a/app/code/core/Mage/Core/Model/Design/Fallback/CachingProxy.php +++ b/app/code/core/Mage/Core/Model/Design/Fallback/CachingProxy.php @@ -94,15 +94,22 @@ class Mage_Core_Model_Design_Fallback_CachingProxy implements Mage_Core_Model_De */ protected $_basePath; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + /** * Constructor. * Following entries in $params are required: 'area', 'package', 'theme', 'locale', 'canSaveMap', * 'mapDir', 'baseDir'. * + * @param Magento_Filesystem $filesystem * @param array $data */ - public function __construct(array $data = array()) + public function __construct(Magento_Filesystem $filesystem, array $data = array()) { + $this->_filesystem = $filesystem; $this->_area = $data['area']; $this->_theme = $data['themeModel']; $this->_locale = $data['locale']; @@ -112,16 +119,18 @@ class Mage_Core_Model_Design_Fallback_CachingProxy implements Mage_Core_Model_De $this->_mapFile = "{$this->_mapDir}/{$this->_area}_{$this->_theme->getId()}_{$this->_locale}.ser"; - $this->_map = file_exists($this->_mapFile) ? unserialize(file_get_contents($this->_mapFile)) : array(); + $this->_map = $this->_filesystem->isFile($this->_mapFile) + ? unserialize($this->_filesystem->read($this->_mapFile)) + : array(); } public function __destruct() { if ($this->_isMapChanged && $this->_canSaveMap) { - if (!is_dir($this->_mapDir)) { - mkdir($this->_mapDir, 0777, true); + if (!$this->_filesystem->isDirectory($this->_mapDir)) { + $this->_filesystem->createDirectory($this->_mapDir, 0777); } - file_put_contents($this->_mapFile, serialize($this->_map), LOCK_EX); + $this->_filesystem->write($this->_mapFile, serialize($this->_map)); } } diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index f84dcabca471b79a794a618fe80f760a9c14a29a..4be237dd8639819780d115b27481aa8127b6ef57 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -37,6 +37,16 @@ class Mage_Core_Model_Design_Package */ const SCOPE_SEPARATOR = '::'; + /** + * Public directory which contain theme files + */ + const PUBLIC_BASE_THEME_DIR = 'theme'; + + /** + * Public directory which contain virtual themes files + */ + const PUBLIC_CUSTOMIZATION_THEME_DIR = 'customization'; + /**#@+ * Public directories prefix group */ @@ -151,6 +161,19 @@ class Mage_Core_Model_Design_Package */ protected $_themes = array(); + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + } + /** * Set package area * @@ -396,21 +419,43 @@ class Mage_Core_Model_Design_Package */ protected function _getFallback($params) { - $cacheKey = "{$params['area']}|{$params['themeModel']->getCacheKey()}|{$params['locale']}"; + if (!isset($params['skipProxy'])) { + $params['skipProxy'] = $this->_isDeveloperMode(); + } + + $cacheKey = join('|', array( + $params['area'], + $params['themeModel']->getCacheKey(), + $params['locale'], + $params['skipProxy'] + )); if (!isset($this->_fallback[$cacheKey])) { - $params['canSaveMap'] = (bool) (string) Mage::app()->getConfig() - ->getNode('global/dev/design_fallback/allow_map_update'); - $params['mapDir'] = Mage::getConfig()->getTempVarDir() . '/maps/fallback'; - $params['baseDir'] = Mage::getBaseDir(); - - $model = $this->_isDeveloperMode() ? - 'Mage_Core_Model_Design_Fallback' : - 'Mage_Core_Model_Design_Fallback_CachingProxy'; - $this->_fallback[$cacheKey] = Mage::getModel($model, array('data' => $params)); + $this->_fallback[$cacheKey] = $this->_createFallback($params); } return $this->_fallback[$cacheKey]; } + /** + * Create fallback model + * + * @param array $params + * @return Mage_Core_Model_Design_Fallback|Mage_Core_Model_Design_Fallback_CachingProxy + */ + protected function _createFallback($params) + { + $model = 'Mage_Core_Model_Design_Fallback_CachingProxy'; + if (isset($params['skipProxy']) && $params['skipProxy']) { + $model = 'Mage_Core_Model_Design_Fallback'; + } + + $params['canSaveMap'] = (bool) (string) Mage::app()->getConfig() + ->getNode('global/dev/design_fallback/allow_map_update'); + $params['mapDir'] = Mage::getConfig()->getTempVarDir() . '/maps/fallback'; + $params['baseDir'] = Mage::getBaseDir(); + + return Mage::getModel($model, array('data' => $params)); + } + /** * Return whether developer mode is turned on * @@ -456,9 +501,13 @@ class Mage_Core_Model_Design_Package public function cleanMergedJsCss() { $dir = $this->_buildPublicViewFilename(self::PUBLIC_MERGE_DIR); - $result = Varien_Io_File::rmdirRecursive($dir); - $result = $result && Mage::helper('Mage_Core_Helper_File_Storage_Database')->deleteFolder($dir); - return $result; + try { + $this->_filesystem->delete($dir); + $deleted = true; + } catch (Magento_Filesystem_Exception $e) { + $deleted = false; + } + return $deleted && Mage::helper('Mage_Core_Helper_File_Storage_Database')->deleteFolder($dir); } /** @@ -478,7 +527,7 @@ class Mage_Core_Model_Design_Package $publicFile = $this->_publishViewFile($file, $params); /* Build url to public file */ if (Mage::helper('Mage_Core_Helper_Data')->isStaticFilesSigned()) { - $fileMTime = filemtime($publicFile); + $fileMTime = $this->_filesystem->getMTime($publicFile); $url = $this->_getPublicFileUrl($publicFile, $isSecure); $url .= '?' . $fileMTime; } else { @@ -498,7 +547,7 @@ class Mage_Core_Model_Design_Package protected function _getPublicFileUrl($file, $isSecure = null) { $publicDirUrlTypes = array( - Mage_Core_Model_Store::URL_TYPE_THEME => Mage::getBaseDir('media') . DS . 'theme', + Mage_Core_Model_Store::URL_TYPE_THEME => $this->getPublicDir(), Mage_Core_Model_Store::URL_TYPE_JS => Mage::getBaseDir('js'), ); foreach ($publicDirUrlTypes as $publicUrlType => $publicDir) { @@ -507,7 +556,7 @@ class Mage_Core_Model_Design_Package continue; } $url = str_replace($publicDir, '', $file); - $url = str_replace(DS, '/' , $url); + $url = str_replace(DS, '/', $url); $url = Mage::getBaseUrl($publicUrlType, $isSecure) . $url; return $url; } @@ -560,7 +609,7 @@ class Mage_Core_Model_Design_Package if ($doMerge && count($files) > 1) { $file = $this->_mergeFiles($files, $type); if (Mage::helper('Mage_Core_Helper_Data')->isStaticFilesSigned()) { - $fileMTime = filemtime($file); + $fileMTime = $this->_filesystem->getMTime($file); $urls[] = $this->_getPublicFileUrl($file) . '?' . $fileMTime; } else { $urls[] = $this->_getPublicFileUrl($file); @@ -587,12 +636,12 @@ class Mage_Core_Model_Design_Package $sourcePath = $this->getViewFile($themeFile, $params); $minifiedSourcePath = $this->_minifiedPathForStaticFiles($sourcePath); - if ($minifiedSourcePath && !Mage::getIsDeveloperMode() && file_exists($minifiedSourcePath)) { + if ($minifiedSourcePath && !Mage::getIsDeveloperMode() && $this->_filesystem->has($minifiedSourcePath)) { $sourcePath = $minifiedSourcePath; $themeFile = $this->_minifiedPathForStaticFiles($themeFile); } - if (!file_exists($sourcePath)) { + if (!$this->_filesystem->has($sourcePath)) { throw new Magento_Exception("Unable to locate theme file '{$sourcePath}'."); } if (!$this->_needToProcessFile($sourcePath)) { @@ -613,21 +662,21 @@ class Mage_Core_Model_Design_Package $cssContent = $this->_getPublicCssContent($sourcePath, dirname($targetPath), $themeFile, $params); } - $fileMTime = filemtime($sourcePath); - if (!file_exists($targetPath) || $fileMTime != filemtime($targetPath)) { + $fileMTime = $this->_filesystem->getMTime($sourcePath); + if (!$this->_filesystem->has($targetPath) || $fileMTime != $this->_filesystem->getMTime($targetPath)) { $publicDir = dirname($targetPath); - if (!is_dir($publicDir)) { - mkdir($publicDir, 0777, true); + if (!$this->_filesystem->isDirectory($publicDir)) { + $this->_filesystem->createDirectory($publicDir, 0777); } if (isset($cssContent)) { - file_put_contents($targetPath, $cssContent); - touch($targetPath, $fileMTime); - } elseif (is_file($sourcePath)) { - copy($sourcePath, $targetPath); - touch($targetPath, $fileMTime); - } elseif (!is_dir($targetPath)) { - mkdir($targetPath, 0777, true); + $this->_filesystem->write($targetPath, $cssContent); + $this->_filesystem->touch($targetPath, $fileMTime); + } elseif ($this->_filesystem->isFile($sourcePath)) { + $this->_filesystem->copy($sourcePath, $targetPath); + $this->_filesystem->touch($targetPath, $fileMTime); + } elseif (!$this->_filesystem->isDirectory($targetPath)) { + $this->_filesystem->createDirectory($targetPath, 0777); } } @@ -664,6 +713,11 @@ class Mage_Core_Model_Design_Package return false; } + $customizationPath = $this->getCustomizationDir(); + if (strncmp($filePath, $customizationPath, strlen($customizationPath)) === 0) { + return false; + } + $protectedExtensions = array(self::CONTENT_TYPE_PHP, self::CONTENT_TYPE_PHTML, self::CONTENT_TYPE_XML); if (in_array($this->_getExtension($filePath), $protectedExtensions)) { return false; @@ -707,7 +761,18 @@ class Mage_Core_Model_Design_Package */ public function getPublicDir() { - return Mage::getBaseDir('media') . DS . 'theme'; + return Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . self::PUBLIC_BASE_THEME_DIR; + } + + /** + * Get customization directory + * + * @return string + */ + public function getCustomizationDir() + { + return Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . Mage_Core_Model_Design_Package::PUBLIC_BASE_THEME_DIR + . DIRECTORY_SEPARATOR . Mage_Core_Model_Design_Package::PUBLIC_CUSTOMIZATION_THEME_DIR; } /** @@ -721,7 +786,7 @@ class Mage_Core_Model_Design_Package { if ($params['themeModel']->getThemePath()) { $designPath = str_replace('/', DS, $params['themeModel']->getThemePath()); - } elseif($params['themeModel']->getId()) { + } elseif ($params['themeModel']->getId()) { $designPath = self::PUBLIC_THEME_DIR . $params['themeModel']->getId(); } else { $designPath = self::PUBLIC_VIEW_DIR; @@ -782,7 +847,7 @@ class Mage_Core_Model_Design_Package */ protected function _getPublicCssContent($filePath, $publicDir, $fileName, $params) { - $content = file_get_contents($filePath); + $content = $this->_filesystem->read($filePath); $relativeUrls = $this->_extractCssRelativeUrls($content); foreach ($relativeUrls as $urlNotation => $fileUrl) { $relatedFilePathPublic = $this->_publishRelatedViewFile($fileUrl, $filePath, $fileName, $params); @@ -892,23 +957,23 @@ class Mage_Core_Model_Design_Package $mergedMTimeFile = $mergedFile . '.dat'; $filesMTimeData = ''; foreach ($filesToMerge as $file) { - $filesMTimeData .= filemtime($file); + $filesMTimeData .= $this->_filesystem->getMTime($file); } - if (file_exists($mergedFile) && file_exists($mergedMTimeFile) - && ($filesMTimeData == file_get_contents($mergedMTimeFile)) + if ($this->_filesystem->has($mergedFile) && $this->_filesystem->has($mergedMTimeFile) + && ($filesMTimeData == $this->_filesystem->read($mergedMTimeFile)) ) { return $mergedFile; } - if (!is_dir(dirname($mergedFile))) { - mkdir(dirname($mergedFile), 0777, true); + if (!$this->_filesystem->isDirectory(dirname($mergedFile))) { + $this->_filesystem->createDirectory(dirname($mergedFile), 0777); } $result = array(); foreach ($filesToMerge as $file) { - if (!file_exists($file)) { + if (!$this->_filesystem->has($file)) { throw new Magento_Exception("Unable to locate file '{$file}' for merging."); } - $content = file_get_contents($file); + $content = $this->_filesystem->read($file); if ($contentType == self::CONTENT_TYPE_CSS) { $offset = $this->_getFilesOffset($file, dirname($mergedFile)); $content = $this->_applyCssUrlOffset($content, $offset); @@ -919,8 +984,8 @@ class Mage_Core_Model_Design_Package if ($contentType == self::CONTENT_TYPE_CSS) { $result = $this->_popCssImportsUp($result); } - file_put_contents($mergedFile, $result, LOCK_EX); - file_put_contents($mergedMTimeFile, $filesMTimeData, LOCK_EX); + $this->_filesystem->write($mergedFile, $result); + $this->_filesystem->write($mergedMTimeFile, $filesMTimeData); return $mergedFile; } @@ -1077,7 +1142,7 @@ class Mage_Core_Model_Design_Package $configFiles = Mage::getConfig()->getModuleConfigurationFiles('view.xml'); $themeConfigFile = $this->getFilename('view.xml', array()); - if (file_exists($themeConfigFile)) { + if ($this->_filesystem->has($themeConfigFile)) { $configFiles[] = $themeConfigFile; } $config = new Magento_Config_View($configFiles); diff --git a/app/code/core/Mage/Core/Model/Email.php b/app/code/core/Mage/Core/Model/Email.php index f9fcd50f632935d1b9151628e2ebe3b4ee8b6826..7edb19c0c1c8d6b7d298d7661ee99140f7efb20e 100644 --- a/app/code/core/Mage/Core/Model/Email.php +++ b/app/code/core/Mage/Core/Model/Email.php @@ -72,7 +72,7 @@ class Mage_Core_Model_Email extends Varien_Object $body = $this->getData('body'); if (empty($body) && $this->getTemplate()) { $this->_block = Mage::getModel('Mage_Core_Model_Layout')->createBlock('Mage_Core_Block_Template', 'email') - ->setArea('frontend') + ->setArea(Mage_Core_Model_App_Area::AREA_FRONTEND) ->setTemplate($this->getTemplate()); foreach ($this->getTemplateVars() as $var=>$value) { $this->_block->assign($var, $value); diff --git a/app/code/core/Mage/Core/Model/Email/Template.php b/app/code/core/Mage/Core/Model/Email/Template.php index 87dd662e00447e840d6e70340892a99b5d0268cb..8de298bc2ff65c6cdd0abfc2025158ecb532f8ff 100644 --- a/app/code/core/Mage/Core/Model/Email/Template.php +++ b/app/code/core/Mage/Core/Model/Email/Template.php @@ -89,8 +89,31 @@ class Mage_Core_Model_Email_Template extends Mage_Core_Model_Template */ protected $_sendingException = null; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + static protected $_defaultTemplates; + /** + * Initialize data + * + * @param Mage_Core_Model_Event_Manager $eventDispatcher + * @param Mage_Core_Model_Cache $cacheManager + * @param Magento_Filesystem $filesystem + * @param array $data + */ + public function __construct( + Mage_Core_Model_Event_Manager $eventDispatcher, + Mage_Core_Model_Cache $cacheManager, + Magento_Filesystem $filesystem, + array $data = array() + ) { + $this->_filesystem = $filesystem; + parent::__construct($eventDispatcher, $cacheManager); + } + /** * Initialize email template model */ @@ -113,7 +136,7 @@ class Mage_Core_Model_Email_Template extends Mage_Core_Model_Template if ($fileName) { $uploadDir = Mage_Backend_Model_Config_Backend_Email_Logo::UPLOAD_DIR; $fullFileName = Mage::getBaseDir('media') . DS . $uploadDir . DS . $fileName; - if (file_exists($fullFileName)) { + if ($this->_filesystem->isFile($fullFileName)) { return Mage::getBaseUrl('media') . $uploadDir . '/' . $fileName; } } @@ -241,7 +264,7 @@ class Mage_Core_Model_Email_Template extends Mage_Core_Model_Template public function loadBaseContents($module, $filename) { $includeFilename = Mage::getConfig()->getModuleDir('view', $module) . DIRECTORY_SEPARATOR . $filename; - $contents = file_get_contents($includeFilename); + $contents = $this->_filesystem->read($includeFilename); if (!$contents) { throw new Exception(sprintf('Failed to include file "%s".', $includeFilename)); } diff --git a/app/code/core/Mage/Core/Model/File/Uploader.php b/app/code/core/Mage/Core/Model/File/Uploader.php index 38dd63b36350869232a4a18e6152023cd5476ed3..b75d791d9400bebdd0c796f8d19ea7b37d760ab9 100644 --- a/app/code/core/Mage/Core/Model/File/Uploader.php +++ b/app/code/core/Mage/Core/Model/File/Uploader.php @@ -99,4 +99,25 @@ class Mage_Core_Model_File_Uploader extends Varien_File_Uploader return parent::checkAllowedExtension($extension); } + + /** + * Get file size + * + * @return int + */ + public function getFileSize() + { + return $this->_file['size']; + } + + /** + * Validate file + * + * @return array + */ + public function validateFile() + { + $this->_validateFile(); + return $this->_file; + } } diff --git a/app/code/core/Mage/Core/Model/Layout/Link.php b/app/code/core/Mage/Core/Model/Layout/Link.php new file mode 100644 index 0000000000000000000000000000000000000000..a50b8d2234c5a6e3660caadf563a80f83a356293 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Layout/Link.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Layout Link model class + */ +class Mage_Core_Model_Layout_Link extends Mage_Core_Model_Abstract +{ + /** + * Layout Update model initialization + */ + protected function _construct() + { + $this->_init('Mage_Core_Model_Resource_Layout_Link'); + } +} diff --git a/app/code/core/Mage/Core/Model/Layout/Merge.php b/app/code/core/Mage/Core/Model/Layout/Merge.php index 7c30d2e4af1bbee6b2280eee842573058fad89e6..5cd7ef0d454755b800b917ad6539f7a9e6d89252 100644 --- a/app/code/core/Mage/Core/Model/Layout/Merge.php +++ b/app/code/core/Mage/Core/Model/Layout/Merge.php @@ -49,7 +49,7 @@ class Mage_Core_Model_Layout_Merge /** * @var int */ - private $_themeId; + private $_theme; /** * @var int @@ -106,15 +106,15 @@ class Mage_Core_Model_Layout_Merge public function __construct(array $arguments = array()) { /* Default values */ - if (isset($arguments['area']) && isset($arguments['themeId'])) { + if (isset($arguments['area']) && isset($arguments['theme'])) { $this->_area = $arguments['area']; - $this->_themeId = $arguments['themeId']; + $this->_theme = $arguments['theme']; } elseif (isset($arguments['area'])) { $this->_area = $arguments['area']; - $this->_themeId = Mage::getDesign()->getConfigurationDesignTheme($arguments['area']); + $this->_theme = Mage::getDesign()->getConfigurationDesignTheme($arguments['area']); } else { $this->_area = Mage::getDesign()->getArea(); - $this->_themeId = Mage::getDesign()->getDesignTheme()->getId(); + $this->_theme = Mage::getDesign()->getDesignTheme()->getId(); } $this->_storeId = Mage::app()->getStore(empty($arguments['store']) ? null : $arguments['store'])->getId(); @@ -554,7 +554,7 @@ class Mage_Core_Model_Layout_Merge */ protected function _getCacheId($suffix = '') { - return "LAYOUT_{$this->_area}_STORE{$this->_storeId}_{$this->_themeId}{$suffix}"; + return "LAYOUT_{$this->_area}_STORE{$this->_storeId}_{$this->_theme}{$suffix}"; } /** @@ -595,7 +595,7 @@ class Mage_Core_Model_Layout_Merge */ protected function _loadFileLayoutUpdatesXml() { - $layoutParams = array('area' => $this->_area, 'themeId' => $this->_themeId); + $layoutParams = array('area' => $this->_area, 'themeId' => $this->_theme); /* * Allow to modify declared layout updates. diff --git a/app/code/core/Mage/Core/Model/Layout/Update.php b/app/code/core/Mage/Core/Model/Layout/Update.php index 81614038dc5b56249779d9de24978f5fd2c4129e..dcb4af675c5fe7b36422848c3fd83ee12fc9f132 100644 --- a/app/code/core/Mage/Core/Model/Layout/Update.php +++ b/app/code/core/Mage/Core/Model/Layout/Update.php @@ -26,6 +26,17 @@ /** * Layout Update model class + * + * @method int getIsTemporary() getIsTemporary() + * @method int getLayoutLinkId() getLayoutLinkId() + * @method string getUpdatedAt() getUpdatedAt() + * @method string getXml() getXml() + * @method Mage_Core_Model_Layout_Update setIsTemporary() setIsTemporary(int $isTemporary) + * @method Mage_Core_Model_Layout_Update setHandle() setHandle(string $handle) + * @method Mage_Core_Model_Layout_Update setXml() setXml(string $xml) + * @method Mage_Core_Model_Layout_Update setStoreId() setStoreId(int $storeId) + * @method Mage_Core_Model_Layout_Update setThemeId() setThemeId(int $themeId) + * @method Mage_Core_Model_Layout_Update setUpdatedAt() setUpdatedAt(string $updateDateTime) */ class Mage_Core_Model_Layout_Update extends Mage_Core_Model_Abstract { @@ -36,4 +47,15 @@ class Mage_Core_Model_Layout_Update extends Mage_Core_Model_Abstract { $this->_init('Mage_Core_Model_Resource_Layout_Update'); } + + /** + * Set current updated date + * + * @return Mage_Core_Model_Abstract + */ + protected function _beforeSave() + { + $this->setUpdatedAt($this->getResource()->formatDate(time())); + return parent::_beforeSave(); + } } diff --git a/app/code/core/Mage/Core/Model/Observer.php b/app/code/core/Mage/Core/Model/Observer.php index 3bc5e79623053e28dca80364647c0ec0ab99d9ee..c848b029c9c191446f5e726a84e8e762ad22234f 100644 --- a/app/code/core/Mage/Core/Model/Observer.php +++ b/app/code/core/Mage/Core/Model/Observer.php @@ -123,4 +123,22 @@ class Mage_Core_Model_Observer } return $this; } + + /** + * Add theme customization + * + * @param Varien_Event_Observer $observer + * @return Mage_Core_Model_Observer + */ + public function addThemeCustomization(Varien_Event_Observer $observer) + { + /** @var $layout Mage_Core_Model_Layout */ + $layout = $observer->getEvent()->getLayout(); + + /** @var $themeService Mage_Core_Model_Theme_Service */ + $themeService = Mage::getObjectManager()->get('Mage_Core_Model_Theme_Service'); + $themeService->addThemeCustomization($layout); + + return $this; + } } diff --git a/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php b/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php index 5a0d9dc2c27da55c401ae0164f0abd98bbdd1f43..46c41c4b2c9d2211573cd3466c1ff1570ef02435 100644 --- a/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php +++ b/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php @@ -402,7 +402,7 @@ abstract class Mage_Core_Model_Resource_Db_Collection_Abstract extends Varien_Da * Standard resource collection initialization * * @param string $model - * @param Mage_Core_Model_Resource_Db_Abstract $resourceModel + * @param string $resourceModel * @return Mage_Core_Model_Resource_Db_Collection_Abstract */ protected function _init($model, $resourceModel) @@ -439,7 +439,7 @@ abstract class Mage_Core_Model_Resource_Db_Collection_Abstract extends Varien_Da } /** - * Set resource model name for collection items + * Set resource model name for collection items * * @param string $model */ diff --git a/app/code/core/Mage/Core/Model/Resource/File/Storage/File.php b/app/code/core/Mage/Core/Model/Resource/File/Storage/File.php index bd9fd0073a3e0383953ab7d8ac71f7137380a430..c5533348d85d0b71dabe09b025e9df87ca3c7f88 100644 --- a/app/code/core/Mage/Core/Model/Resource/File/Storage/File.php +++ b/app/code/core/Mage/Core/Model/Resource/File/Storage/File.php @@ -41,15 +41,57 @@ class Mage_Core_Model_Resource_File_Storage_File */ protected $_mediaBaseDirectory = null; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @var Mage_Core_Helper_File_Storage_Database + */ + protected $_dbHelper; + + /** + * @var Mage_Core_Helper_Data + */ + protected $_helper; + + /** + * @var Mage_Core_Model_Logger + */ + protected $_logger; + + /** + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Helper_File_Storage_Database $dbHelper + * @param Mage_Core_Helper_Data $helper + * @param Mage_Core_Model_Logger $log + */ + public function __construct( + Magento_Filesystem $filesystem, + Mage_Core_Helper_File_Storage_Database $dbHelper, + Mage_Core_Helper_Data $helper, + Mage_Core_Model_Logger $log + ) { + $this->_dbHelper = $dbHelper; + $this->_helper = $helper; + $this->_logger = $log; + + $this->_filesystem = $filesystem; + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->ensureDirectoryExists($this->getMediaBaseDirectory()); + $this->_filesystem->setWorkingDirectory($this->getMediaBaseDirectory()); + } + /** * Files at storage * - * @var array + * @return string */ public function getMediaBaseDirectory() { if (is_null($this->_mediaBaseDirectory)) { - $this->_mediaBaseDirectory = Mage::helper('Mage_Core_Helper_File_Storage_Database')->getMediaBaseDir(); + $this->_mediaBaseDirectory = $this->_dbHelper->getMediaBaseDir(); } return $this->_mediaBaseDirectory; @@ -58,7 +100,7 @@ class Mage_Core_Model_Resource_File_Storage_File /** * Collect files and directories recursively * - * @param string$dir + * @param string $dir * @return array */ public function getStorageData($dir = '') @@ -67,30 +109,22 @@ class Mage_Core_Model_Resource_File_Storage_File $directories = array(); $currentDir = $this->getMediaBaseDirectory() . $dir; - if (is_dir($currentDir)) { - $dh = opendir($currentDir); - if ($dh) { - while (($file = readdir($dh)) !== false) { - if ($file == '.' || $file == '..' || $file == '.svn' || $file == '.htaccess') { - continue; - } - - $fullPath = $currentDir . DS . $file; - $relativePath = $dir . DS . $file; - if (is_dir($fullPath)) { - $directories[] = array( - 'name' => $file, - 'path' => str_replace(DS, '/', ltrim($dir, DS)) - ); - - $data = $this->getStorageData($relativePath); - $directories = array_merge($directories, $data['directories']); - $files = array_merge($files, $data['files']); - } else { - $files[] = $relativePath; - } + if ($this->_filesystem->isDirectory($currentDir)) { + foreach ($this->_filesystem->getNestedKeys($currentDir) as $fullPath) { + $itemName = basename($fullPath); + if ($itemName == '.svn' || $itemName == '.htaccess') { + continue; + } + + $relativePath = $this->_getRelativePath($fullPath); + if ($this->_filesystem->isDirectory($fullPath)) { + $directories[] = array( + 'name' => $itemName, + 'path' => dirname($relativePath) + ); + } else { + $files[] = $relativePath; } - closedir($dh); } } @@ -100,30 +134,18 @@ class Mage_Core_Model_Resource_File_Storage_File /** * Clear files and directories in storage * - * @param string $dir + * @param string $dir * @return Mage_Core_Model_Resource_File_Storage_File */ public function clear($dir = '') { - $currentDir = $this->getMediaBaseDirectory() . $dir; - - if (is_dir($currentDir)) { - $dh = opendir($currentDir); - if ($dh) { - while (($file = readdir($dh)) !== false) { - if ($file == '.' || $file == '..') { - continue; - } - - $fullPath = $currentDir . DS . $file; - if (is_dir($fullPath)) { - $this->clear($dir . DS . $file); - } else { - @unlink($fullPath); - } - } - closedir($dh); - @rmdir($currentDir); + if (strpos($dir, $this->getMediaBaseDirectory()) !== 0) { + $dir = $this->getMediaBaseDirectory() . $dir; + } + + if ($this->_filesystem->isDirectory($dir)) { + foreach ($this->_filesystem->getNestedKeys($dir) as $path) { + $this->_filesystem->delete($path); } } @@ -133,26 +155,25 @@ class Mage_Core_Model_Resource_File_Storage_File /** * Save directory to storage * - * @param array $dir + * @param array $dir * @return bool */ public function saveDir($dir) { - if (!isset($dir['name']) || !strlen($dir['name']) - || !isset($dir['path']) - ) { + if (!isset($dir['name']) || !strlen($dir['name']) || !isset($dir['path'])) { return false; } $path = (strlen($dir['path'])) ? $dir['path'] . DS . $dir['name'] : $dir['name']; - $path = Mage::helper('Mage_Core_Helper_File_Storage_Database')->getMediaBaseDir() . DS . str_replace('/', DS, $path); + $path = $this->getMediaBaseDirectory() . DS . $path; - if (!file_exists($path) || !is_dir($path)) { - if (!@mkdir($path, 0777, true)) { - Mage::throwException(Mage::helper('Mage_Core_Helper_Data')->__('Unable to create directory: %s', $path)); - } + try { + $this->_filesystem->ensureDirectoryExists($path); + } catch (Exception $e) { + $this->_logger->log($e->getMessage()); + Mage::throwException($this->_helper->__('Unable to create directory: %s', $path)); } return true; @@ -161,37 +182,38 @@ class Mage_Core_Model_Resource_File_Storage_File /** * Save file to storage * - * @param string $filePath - * @param string $content - * @param bool $overwrite + * @param string $filePath + * @param string $content + * @param bool $overwrite * @return bool */ public function saveFile($filePath, $content, $overwrite = false) { - $filename = basename($filePath); - $path = $this->getMediaBaseDirectory() . DS . str_replace('/', DS ,dirname($filePath)); - - if (!file_exists($path) || !is_dir($path)) { - @mkdir($path, 0777, true); + if (strpos($filePath, $this->getMediaBaseDirectory()) !== 0) { + $filePath = $this->getMediaBaseDirectory() . DS . $filePath; } - $ioFile = new Varien_Io_File(); - $ioFile->cd($path); - - if (!$ioFile->fileExists($filename) || ($overwrite && $ioFile->rm($filename))) { - $ioFile->streamOpen($filename); - $ioFile->streamLock(true); - $result = $ioFile->streamWrite($content); - $ioFile->streamUnlock(); - $ioFile->streamClose(); - - if ($result) { + try { + if (!$this->_filesystem->isFile($filePath) || ($overwrite && $this->_filesystem->delete($filePath))) { + $this->_filesystem->write($filePath, $content); return true; } - - Mage::throwException(Mage::helper('Mage_Core_Helper_Data')->__('Unable to save file: %s', $filePath)); + } catch (Magento_Filesystem_Exception $e) { + $this->_logger->log($e->getMessage()); + Mage::throwException($this->_helper->__('Unable to save file: %s', $filePath)); } return false; } + + /** + * Get path relative to media base directory + * + * @param string $path + * @return string + */ + protected function _getRelativePath($path) + { + return ltrim(str_replace($this->getMediaBaseDirectory(), '', $path), Magento_Filesystem::DIRECTORY_SEPARATOR); + } } diff --git a/app/code/core/Mage/Core/Model/Resource/Layout/Link.php b/app/code/core/Mage/Core/Model/Resource/Layout/Link.php new file mode 100644 index 0000000000000000000000000000000000000000..02fa1b3b09eee88fa0c25e09b0004dea4f1d2777 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Resource/Layout/Link.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Layout Link resource model + */ +class Mage_Core_Model_Resource_Layout_Link extends Mage_Core_Model_Resource_Db_Abstract +{ + /** + * Define main table + */ + protected function _construct() + { + $this->_init('core_layout_link', 'layout_link_id'); + } +} diff --git a/app/code/core/Mage/Core/Model/Resource/Layout/Link/Collection.php b/app/code/core/Mage/Core/Model/Resource/Layout/Link/Collection.php new file mode 100644 index 0000000000000000000000000000000000000000..ca8695c386edeba14b58b865c1d9c397b5f86d0c --- /dev/null +++ b/app/code/core/Mage/Core/Model/Resource/Layout/Link/Collection.php @@ -0,0 +1,94 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Layout update collection model + */ +class Mage_Core_Model_Resource_Layout_Link_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract +{ + /** + * Define resource model + */ + protected function _construct() + { + parent::_construct(); + $this->_init('Mage_Core_Model_Layout_Link', 'Mage_Core_Model_Resource_Layout_Link'); + } + + /** + * Join with layout update table + * + * @param array $fields + * @return Mage_Core_Model_Resource_Layout_Link_Collection + */ + protected function _joinWithUpdate($fields = array()) + { + $flagName = 'joined_with_update_table'; + if (!$this->getFlag($flagName)) { + $this->getSelect() + ->join( + array('update' => $this->getTable('core_layout_update')), + 'update.layout_update_id = main_table.layout_update_id', + array($fields) + ); + $this->setFlag($flagName, true); + } + + return $this; + } + + /** + * Filter by temporary flag + * + * @param bool $isTemporary + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + public function addTemporaryFilter($isTemporary) + { + $this->addFieldToFilter('main_table.is_temporary', $isTemporary ? 1 : 0); + return $this; + } + + /** + * Get links for layouts that are older then specified number of days + * + * @param $days + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + public function addUpdatedDaysBeforeFilter($days) + { + $datetime = new DateTime(); + $storeInterval = new DateInterval('P' . $days . 'D'); + $datetime->sub($storeInterval); + $formattedDate = $this->formatDate($datetime->getTimestamp()); + + $this->_joinWithUpdate(); + $this->addFieldToFilter('update.updated_at', array('notnull' => true)) + ->addFieldToFilter('update.updated_at', array('lt' => $formattedDate)); + + return $this; + } +} diff --git a/app/code/core/Mage/Core/Model/Resource/Layout/Update.php b/app/code/core/Mage/Core/Model/Resource/Layout/Update.php index f9875d088ed101cbbe2f285641f37a49fde1b674..804b9aac757581c3f00bdbcd871cd4ee9325738d 100644 --- a/app/code/core/Mage/Core/Model/Resource/Layout/Update.php +++ b/app/code/core/Mage/Core/Model/Resource/Layout/Update.php @@ -61,24 +61,40 @@ class Mage_Core_Model_Resource_Layout_Update extends Mage_Core_Model_Resource_Db $readAdapter = $this->_getReadAdapter(); if ($readAdapter) { - $select = $readAdapter->select() - ->from(array('layout_update' => $this->getMainTable()), array('xml')) - ->join(array('link'=>$this->getTable('core_layout_link')), - 'link.layout_update_id=layout_update.layout_update_id', '') - ->where('link.store_id IN (0, :store_id)') - ->where('link.theme_id = :theme_id') - ->where('layout_update.handle = :layout_update_handle') - ->order('layout_update.sort_order ' . Varien_Db_Select::SQL_ASC); - + $select = $this->_getFetchUpdatesByHandleSelect(); $result = join('', $readAdapter->fetchCol($select, $bind)); } return $result; } + /** + * Get select to fetch updates by handle + * + * @param bool $loadAllUpdates + * @return Varien_Db_Select + */ + protected function _getFetchUpdatesByHandleSelect($loadAllUpdates = false) + { + $select = $this->_getReadAdapter()->select() + ->from(array('layout_update' => $this->getMainTable()), array('xml')) + ->join(array('link' => $this->getTable('core_layout_link')), + 'link.layout_update_id=layout_update.layout_update_id', '') + ->where('link.store_id IN (0, :store_id)') + ->where('link.theme_id = :theme_id') + ->where('layout_update.handle = :layout_update_handle') + ->order('layout_update.sort_order ' . Varien_Db_Select::SQL_ASC); + + if (!$loadAllUpdates) { + $select->where('link.is_temporary = 0'); + } + + return $select; + } + /** * Update a "layout update link" if relevant data is provided * - * @param Mage_Core_Model_Abstract $object + * @param Mage_Core_Model_Layout_Update|Mage_Core_Model_Abstract $object * @return Mage_Core_Model_Resource_Layout_Update */ protected function _afterSave(Mage_Core_Model_Abstract $object) @@ -89,6 +105,7 @@ class Mage_Core_Model_Resource_Layout_Update extends Mage_Core_Model_Resource_Db 'store_id' => $data['store_id'], 'theme_id' => $data['theme_id'], 'layout_update_id' => $object->getId(), + 'is_temporary' => (int)$object->getIsTemporary(), )); } Mage::app()->cleanCache(array('layout', Mage_Core_Model_Layout_Merge::LAYOUT_GENERAL_CACHE_TAG)); diff --git a/app/code/core/Mage/Core/Model/Resource/Layout/Update/Collection.php b/app/code/core/Mage/Core/Model/Resource/Layout/Update/Collection.php index e491c3303804fa39719924c4da5c01a86c459ffa..5465ed2981cef5204904b29240e66ec6024bd5e5 100644 --- a/app/code/core/Mage/Core/Model/Resource/Layout/Update/Collection.php +++ b/app/code/core/Mage/Core/Model/Resource/Layout/Update/Collection.php @@ -51,4 +51,110 @@ class Mage_Core_Model_Resource_Layout_Update_Collection extends Mage_Core_Model_ parent::_construct(); $this->_init('Mage_Core_Model_Layout_Update', 'Mage_Core_Model_Resource_Layout_Update'); } + + /** + * Add filter by theme id + * + * @param int $themeId + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + public function addThemeFilter($themeId) + { + $this->_joinWithLink(); + $this->getSelect() + ->where('link.theme_id = ?', $themeId); + + return $this; + } + + /** + * Add filter by store id + * + * @param int $storeId + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + public function addStoreFilter($storeId) + { + $this->_joinWithLink(); + $this->getSelect() + ->where('link.store_id = ?', $storeId); + + return $this; + } + + /** + * Join with layout link table + * + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + protected function _joinWithLink() + { + $flagName = 'joined_with_link_table'; + if (!$this->getFlag($flagName)) { + $this->getSelect() + ->join( + array('link' => $this->getTable('core_layout_link')), + 'link.layout_update_id = main_table.layout_update_id', + array('store_id', 'theme_id') + ); + + $this->setFlag($flagName, true); + } + + return $this; + } + + /** + * Left Join with layout link table + * + * @param array $fields + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + protected function _joinLeftWithLink($fields = array()) + { + $flagName = 'joined_left_with_link_table'; + if (!$this->getFlag($flagName)) { + $this->getSelect() + ->joinLeft( + array('link' => $this->getTable('core_layout_link')), + 'link.layout_update_id = main_table.layout_update_id', + array($fields) + ); + $this->setFlag($flagName, true); + } + + return $this; + } + + /** + * Get layouts that are older then specified number of days + * + * @param $days + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + public function addUpdatedDaysBeforeFilter($days) + { + $datetime = new DateTime(); + $storeInterval = new DateInterval('P' . $days . 'D'); + $datetime->sub($storeInterval); + $formattedDate = $this->formatDate($datetime->getTimestamp()); + + $this->addFieldToFilter('main_table.updated_at', array('notnull' => true)) + ->addFieldToFilter('main_table.updated_at', array('lt' => $formattedDate)); + + return $this; + } + + /** + * Get layouts without links + * + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + public function addNoLinksFilter() + { + $this->_joinLeftWithLink(); + $this->addFieldToFilter('link.layout_update_id', array('null' => true)); + + return $this; + } } diff --git a/app/code/core/Mage/Core/Model/Resource/Setup/Migration.php b/app/code/core/Mage/Core/Model/Resource/Setup/Migration.php index 89c8646c323b9a7ffd8c39c3cad39ba5a283a1d4..5631e6ff627125b40cf7a02861fd2dab1684fe0e 100644 --- a/app/code/core/Mage/Core/Model/Resource/Setup/Migration.php +++ b/app/code/core/Mage/Core/Model/Resource/Setup/Migration.php @@ -138,14 +138,21 @@ class Mage_Core_Model_Resource_Setup_Migration extends Mage_Core_Model_Resource_ */ protected $_compositeModules; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + /** * Constructor * * @param string $resourceName + * @param Magento_Filesystem $filesystem * @param array $data */ - public function __construct($resourceName, array $data = array()) + public function __construct($resourceName, Magento_Filesystem $filesystem, array $data = array()) { + $this->_filesystem = $filesystem; if (!isset($data['resource_config']) || !isset($data['connection_config']) || !isset($data['module_config']) @@ -680,8 +687,8 @@ class Mage_Core_Model_Resource_Setup_Migration extends Mage_Core_Model_Resource_ protected function _loadMap($pathToMapFile) { $pathToMapFile = $this->_baseDir . DS . $pathToMapFile; - if (file_exists($pathToMapFile)) { - return file_get_contents($pathToMapFile); + if ($this->_filesystem->isFile($pathToMapFile)) { + return $this->_filesystem->read($pathToMapFile); } return ''; diff --git a/app/code/core/Mage/Core/Model/Resource/Theme/Files.php b/app/code/core/Mage/Core/Model/Resource/Theme/Files.php new file mode 100644 index 0000000000000000000000000000000000000000..465d341af3e452f0c123b4bd18dfe73808092018 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Resource/Theme/Files.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Theme files resource model + */ +class Mage_Core_Model_Resource_Theme_Files extends Mage_Core_Model_Resource_Db_Abstract +{ + /** + * Resource initialization + */ + protected function _construct() + { + $this->_init('core_theme_files', 'theme_files_id'); + } +} diff --git a/app/code/core/Mage/Core/Model/Resource/Theme/Files/Collection.php b/app/code/core/Mage/Core/Model/Resource/Theme/Files/Collection.php new file mode 100644 index 0000000000000000000000000000000000000000..ad40a166c582e08fa5a54d4471184798bfd2ba35 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Resource/Theme/Files/Collection.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Theme files collection + */ +class Mage_Core_Model_Resource_Theme_Files_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract +{ + /** + * Collection initialization + */ + protected function _construct() + { + $this->_init('Mage_Core_Model_Theme_Files', 'Mage_Core_Model_Resource_Theme_Files'); + } +} diff --git a/app/code/core/Mage/Core/Model/ShellAbstract.php b/app/code/core/Mage/Core/Model/ShellAbstract.php index a24fe3826b3fa14a0fda1b025fed4c4cfa5c31fc..f949652ebcb3f27c89f4ca16ed56fc5ab01d9857 100644 --- a/app/code/core/Mage/Core/Model/ShellAbstract.php +++ b/app/code/core/Mage/Core/Model/ShellAbstract.php @@ -54,17 +54,25 @@ abstract class Mage_Core_Model_ShellAbstract */ protected $_entryPoint = null; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + /** * Initializes application and parses input parameters * - * @var string $entryPoint + * @param Magento_Filesystem $filesystem + * @param string $entryPoint + * @throws Exception */ - public function __construct($entryPoint) + public function __construct(Magento_Filesystem $filesystem, $entryPoint) { if (isset($_SERVER['REQUEST_METHOD'])) { throw new Exception('This script cannot be run from Browser. This is the shell script.'); } + $this->_filesystem = $filesystem; $this->_entryPoint = $entryPoint; $this->_rawArgs = $_SERVER['argv']; $this->_applyPhpVariables(); @@ -92,7 +100,7 @@ abstract class Mage_Core_Model_ShellAbstract */ protected function _getRootPath() { - return Mage::getBaseDir() . '/../'; + return Mage::getBaseDir(); } /** @@ -103,9 +111,9 @@ abstract class Mage_Core_Model_ShellAbstract protected function _applyPhpVariables() { $htaccess = $this->_getRootPath() . '.htaccess'; - if (file_exists($htaccess)) { + if ($this->_filesystem->isFile($htaccess)) { // parse htaccess file - $data = file_get_contents($htaccess); + $data = $this->_filesystem->read($htaccess); $matches = array(); preg_match_all('#^\s+?php_value\s+([a-z_]+)\s+(.+)$#siUm', $data, $matches, PREG_SET_ORDER); if ($matches) { diff --git a/app/code/core/Mage/Core/Model/Store.php b/app/code/core/Mage/Core/Model/Store.php index cf27b851a9a1d183e58ac10a57c2e50498399456..a5fade2330f8c209b348b898b410289c81186938 100644 --- a/app/code/core/Mage/Core/Model/Store.php +++ b/app/code/core/Mage/Core/Model/Store.php @@ -1088,6 +1088,10 @@ class Mage_Core_Model_Store extends Mage_Core_Model_Abstract ? $this->getUrl('', array('_secure' => true)) : $this->getUrl(''); + if (!filter_var($storeUrl, FILTER_VALIDATE_URL)) { + return $storeUrl; + } + $storeParsedUrl = parse_url($storeUrl); $storeParsedQuery = array(); diff --git a/app/code/core/Mage/Core/Model/Theme.php b/app/code/core/Mage/Core/Model/Theme.php index 58d18249ee98e398d85aa5b0a516f18e6a18bd01..2bf939db1ee9e4eece8fadb7abfed55984c6806b 100644 --- a/app/code/core/Mage/Core/Model/Theme.php +++ b/app/code/core/Mage/Core/Model/Theme.php @@ -28,13 +28,16 @@ * Theme model class * * @method Mage_Core_Model_Theme save() - * @method string getThemeCode() * @method string getPackageCode() * @method string getThemePath() + * @method string getThemeTitle() getThemeTitle() * @method string getParentThemePath() * @method string getPreviewImage() * @method string getThemeDirectory() * @method string getParentId() + * @method string getArea() + * @method string getThemeTitle() + * @method string getThemeId() * @method Mage_Core_Model_Theme setAssignedStores(array $stores) * @method array getAssignedStores() * @method Mage_Core_Model_Theme addData(array $data) @@ -43,6 +46,12 @@ * @method Mage_Core_Model_Theme setPackageCode(string $packageCode) * @method Mage_Core_Model_Theme setThemeCode(string $themeCode) * @method Mage_Core_Model_Theme setPreviewImage(string $previewImage) + * @method Mage_Core_Model_Theme setThemePath(string $themePath) + * @method Mage_Core_Model_Theme setThemeVersion(string $themeVersion) + * @method Mage_Core_Model_Theme setArea(string $area) + * @method Mage_Core_Model_Theme setThemeTitle(string $themeTitle) + * @method Mage_Core_Model_Theme setMagentoVersionFrom(string $versionFrom) + * @method Mage_Core_Model_Theme setMagentoVersionTo(string $versionTo) * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ @@ -58,11 +67,6 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract */ const PATH_SEPARATOR = '/'; - /** - * Theme directory - */ - const THEME_DIR = 'theme'; - /** * Preview image directory */ @@ -90,11 +94,6 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract */ protected $_labelsCollection; - /** - * @var Varien_Io_File - */ - protected $_ioFile; - /** * @var Magento_ObjectManager */ @@ -110,6 +109,11 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract */ protected $_helper; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + /** * Initialize dependencies * @@ -118,6 +122,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract * @param Magento_ObjectManager $objectManager * @param Mage_Core_Model_Theme_Factory $themeFactory * @param Mage_Core_Helper_Data $helper + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_Resource_Theme $resource * @param Mage_Core_Model_Resource_Theme_Collection $resourceCollection * @param array $data @@ -130,6 +135,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract Magento_ObjectManager $objectManager, Mage_Core_Model_Theme_Factory $themeFactory, Mage_Core_Helper_Data $helper, + Magento_Filesystem $filesystem, Mage_Core_Model_Resource_Theme $resource, Mage_Core_Model_Resource_Theme_Collection $resourceCollection = null, array $data = array() @@ -138,6 +144,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract $this->_objectManager = $objectManager; $this->_themeFactory = $themeFactory; $this->_helper = $helper; + $this->_filesystem = $filesystem; } /** @@ -149,16 +156,15 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract } /** - * Filesystem client + * Return custom css file * - * @return Varien_Io_File + * @return Mage_Core_Model_Theme_Files */ - protected function _getIoFile() + public function getCustomCssFile() { - if (!$this->_ioFile) { - $this->_ioFile = new Varien_Io_File(); - } - return $this->_ioFile; + /** @var $cssFile Mage_Core_Model_Theme_Files_Css */ + $cssFile = $this->_objectManager->get('Mage_Core_Model_Theme_Files_Css'); + return $cssFile->getFileByTheme($this); } /** @@ -189,7 +195,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract } /** - * Check is theme deletable + * Check if theme is deletable * * @return bool */ @@ -198,6 +204,16 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract return $this->isVirtual(); } + /** + * Check if theme is editable + * + * @return bool + */ + public function isEditable() + { + return $this->isVirtual(); + } + /** * Check theme is existing in filesystem * @@ -260,7 +276,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract protected function _beforeDelete() { if (!$this->isDeletable()) { - Mage::throwException($this->_helper->__('Current theme isn\'t deletable.')); + Mage::throwException($this->_helper->__('Theme isn\'t deletable.')); } $this->removePreviewImage(); return parent::_beforeDelete(); @@ -328,8 +344,12 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract */ protected function _getPreviewImagePublishedRootDir() { - $dirPath = Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . self::THEME_DIR; - $this->_getIoFile()->checkAndCreateFolder($dirPath); + /** @var $design Mage_Core_Model_Design_Package */ + $design = $this->_objectManager->get('Mage_Core_Model_Design_Package'); + $dirPath = $design->getPublicDir(); + $this->_filesystem->setIsAllowCreateDirectories(true); + $this->_filesystem->ensureDirectoryExists($dirPath); + $this->_filesystem->setWorkingDirectory($dirPath); return $dirPath; } @@ -360,7 +380,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract */ public static function getPreviewImageDirectoryUrl() { - return Mage::getBaseUrl('media') . self::THEME_DIR . '/' . self::IMAGE_DIR_PREVIEW . '/'; + return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_THEME) . self::IMAGE_DIR_PREVIEW . '/'; } /** @@ -373,6 +393,9 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract { if (isset($themeData['theme_id'])) { $this->load($themeData['theme_id']); + if ($this->getId() && !$this->isEditable()) { + Mage::throwException($this->_helper->__('Theme isn\'t editable.')); + } } $previewImageData = array(); if (isset($themeData['preview_image'])) { @@ -418,7 +441,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract $fileName = $this->getImagePathOrigin() . DS . $upload->getUploadedFileName(); $this->removePreviewImage()->createPreviewImage($fileName); - $this->_getIoFile()->rm($fileName); + $this->_filesystem->delete($fileName); return true; } @@ -456,7 +479,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract { $filePath = $this->_getImagePathPreview() . DIRECTORY_SEPARATOR . $this->getPreviewImage(); $destinationFileName = Varien_File_Uploader::getNewFileName($filePath); - $this->_getIoFile()->cp( + $this->_filesystem->copy( $this->_getImagePathPreview() . DIRECTORY_SEPARATOR . $this->getPreviewImage(), $this->_getImagePathPreview() . DIRECTORY_SEPARATOR . $destinationFileName ); @@ -474,7 +497,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract $previewImage = $this->getPreviewImage(); $this->setPreviewImage(''); if ($previewImage) { - $this->_getIoFile()->rm($this->_getImagePathPreview() . DIRECTORY_SEPARATOR . $previewImage); + $this->_filesystem->delete($this->_getImagePathPreview() . DIRECTORY_SEPARATOR . $previewImage); } return $this; } diff --git a/app/code/core/Mage/Core/Model/Theme/Collection.php b/app/code/core/Mage/Core/Model/Theme/Collection.php index b7bc7b862aeea3d58db3a4a7a197afcab0f237d5..56e8382bc96b9ba8ce4ef515b7c8f8e508358d5c 100644 --- a/app/code/core/Mage/Core/Model/Theme/Collection.php +++ b/app/code/core/Mage/Core/Model/Theme/Collection.php @@ -50,6 +50,20 @@ class Mage_Core_Model_Theme_Collection extends Varien_Data_Collection */ protected $_targetDirs = array(); + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + parent::__construct(); + } + /** * Retrieve collection empty item * @@ -158,7 +172,9 @@ class Mage_Core_Model_Theme_Collection extends Varien_Data_Collection foreach ($this->getTargetPatterns() as $directoryPath) { $pathsToThemeConfig = array_merge( $pathsToThemeConfig, - glob($this->getBaseDir() . DIRECTORY_SEPARATOR . $directoryPath, GLOB_NOSORT) + str_replace('/', DIRECTORY_SEPARATOR, + $this->_filesystem->searchKeys($this->getBaseDir(), $directoryPath) + ) ); } diff --git a/app/code/core/Mage/Core/Model/Theme/Files.php b/app/code/core/Mage/Core/Model/Theme/Files.php new file mode 100644 index 0000000000000000000000000000000000000000..5c0095bce31ac7b8ad5abe9592d2028eea70dd15 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Theme/Files.php @@ -0,0 +1,156 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Theme files model class + */ +class Mage_Core_Model_Theme_Files extends Mage_Core_Model_Abstract +{ + /** + * css file type + */ + const TYPE_CSS = 'css'; + + /** + * @var Varien_Io_File + */ + protected $_ioFile; + + /** + * @var Mage_Core_Model_Design_Package + */ + protected $_design; + + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * @param Mage_Core_Model_Event_Manager $eventDispatcher + * @param Mage_Core_Model_Cache $cacheManager + * @param Mage_Core_Model_Resource_Abstract $resource + * @param Varien_Data_Collection_Db $resourceCollection + * @param Varien_Io_File $ioFile + * @param Magento_ObjectManager $objectManager + * @param array $data + */ + public function __construct( + Mage_Core_Model_Event_Manager $eventDispatcher, + Mage_Core_Model_Cache $cacheManager, + Varien_Io_File $ioFile, + Magento_ObjectManager $objectManager, + Mage_Core_Model_Resource_Abstract $resource = null, + Varien_Data_Collection_Db $resourceCollection = null, + array $data = array() + ) { + parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data); + + $this->_ioFile = $ioFile; + $this->_objectManager = $objectManager; + $this->_design = $this->_objectManager->get('Mage_Core_Model_Design_Package'); + } + + /** + * Theme files model initialization + */ + protected function _construct() + { + $this->_init('Mage_Core_Model_Resource_Theme_Files'); + } + + /** + * Create/update/delete file after save + * Delete file if only file is empty + * + * @return Mage_Core_Model_Theme_Files + */ + protected function _afterSave() + { + if ($this->getContent()) { + $this->_saveFile(); + } else { + $this->_deleteFile(); + } + return parent::_afterSave(); + } + + /** + * Delete file form file system after delete form db + * + * @return Mage_Core_Model_Theme_Files + */ + protected function _afterDelete() + { + $this->_deleteFile(); + + return parent::_afterDelete(); + } + + /** + * Create/update file in file system + * + * @return bool|int + */ + protected function _saveFile() + { + $filePath = $this->getFilePath(true); + $this->_ioFile->checkAndCreateFolder(dirname($filePath)); + $result = $this->_ioFile->write($filePath, $this->getContent()); + $this->_design->cleanMergedJsCss(); + return $result; + } + + /** + * Delete file form file system + * + * @return bool + */ + protected function _deleteFile() + { + $result = $this->_ioFile->rm($this->getFilePath(true)); + $this->_design->cleanMergedJsCss(); + return $result; + } + + /** + * Return file path in file system + * + * @param bool $fullPath + * @return string|bool + */ + public function getFilePath($fullPath = false) + { + if (!$this->getId()) { + return false; + } + $filePath = $this->getThemeId() . DIRECTORY_SEPARATOR . $this->getFileName(); + if ($fullPath) { + $filePath = $this->_design->getCustomizationDir() . DIRECTORY_SEPARATOR . $filePath; + } + return $filePath; + } +} diff --git a/app/code/core/Mage/Core/Model/Theme/Files/Css.php b/app/code/core/Mage/Core/Model/Theme/Files/Css.php new file mode 100644 index 0000000000000000000000000000000000000000..76e28f20be8d60d40c8ccb47637fd457d8767271 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Theme/Files/Css.php @@ -0,0 +1,86 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Theme css file model class + */ +class Mage_Core_Model_Theme_Files_Css +{ + /** + * Css file name + */ + const FILE_NAME = 'custom.css'; + + /** + * @var Mage_Core_Model_Theme_Files + */ + protected $_themeFiles; + + /** + * @param Mage_Core_Model_Theme_Files $themeFiles + */ + public function __construct(Mage_Core_Model_Theme_Files $themeFiles) + { + $this->_themeFiles = $themeFiles; + } + + /** + * Save data from form + * + * @param $theme Mage_Core_Model_Theme + * @param string $themeCssData + * @return Mage_Core_Model_Theme_Files + */ + public function saveFormData($theme, $themeCssData) + { + /** @var $cssModel Mage_Core_Model_Theme_Files */ + $cssFile = $this->getFileByTheme($theme); + $cssFile->addData(array( + 'theme_id' => $theme->getId(), + 'file_name' => self::FILE_NAME, + 'file_type' => Mage_Core_Model_Theme_Files::TYPE_CSS, + 'content' => $themeCssData + ))->save(); + return $cssFile; + } + + /** + * Return theme css file by theme + * + * @param $theme Mage_Core_Model_Theme + * @return Mage_Core_Model_Theme_Files + */ + public function getFileByTheme($theme) + { + /** @var $cssModel Mage_Core_Model_Theme_Files */ + $cssFile = $this->_themeFiles->getCollection() + ->addFilter('theme_id', $theme->getId()) + ->addFilter('file_type', Mage_Core_Model_Theme_Files::TYPE_CSS) + ->getFirstItem(); + + return $cssFile; + } +} diff --git a/app/code/core/Mage/Core/Model/Theme/Service.php b/app/code/core/Mage/Core/Model/Theme/Service.php index 09dc25e9adaa6fb72370020757da8ec414547ab5..9d77b139ace88b8e4ff6eb4ffa30b7a21e03161a 100644 --- a/app/code/core/Mage/Core/Model/Theme/Service.php +++ b/app/code/core/Mage/Core/Model/Theme/Service.php @@ -72,6 +72,16 @@ class Mage_Core_Model_Theme_Service */ protected $_helper; + /** + * @var Mage_DesignEditor_Model_Resource_Layout_Update + */ + protected $_layoutUpdate; + + /** + * @var Mage_Core_Model_Event_Manager + */ + protected $_eventManager; + /** * Initialize service model * @@ -79,30 +89,39 @@ class Mage_Core_Model_Theme_Service * @param Mage_Core_Model_Design_Package $design * @param Mage_Core_Model_App $app * @param Mage_Core_Helper_Data $helper + * @param Mage_DesignEditor_Model_Resource_Layout_Update $layoutUpdate + * @param Mage_Core_Model_Event_Manager $eventManager */ public function __construct( Mage_Core_Model_Theme_Factory $themeFactory, Mage_Core_Model_Design_Package $design, Mage_Core_Model_App $app, - Mage_Core_Helper_Data $helper + Mage_Core_Helper_Data $helper, + Mage_DesignEditor_Model_Resource_Layout_Update $layoutUpdate, + Mage_Core_Model_Event_Manager $eventManager ) { $this->_themeFactory = $themeFactory; - $this->_design = $design; - $this->_app = $app; - $this->_helper = $helper; + $this->_design = $design; + $this->_app = $app; + $this->_helper = $helper; + $this->_layoutUpdate = $layoutUpdate; + $this->_eventManager = $eventManager; } /** * Assign theme to the stores * * @param int $themeId - * @param array|null $stores + * @param array $stores * @param string $scope * @param string $area - * @return Mage_Core_Model_Theme_Service + * @return Mage_Core_Model_Theme * @throws UnexpectedValueException */ - public function assignThemeToStores($themeId, $stores, $scope = Mage_Core_Model_Config::SCOPE_STORES, + public function assignThemeToStores( + $themeId, + array $stores = array(), + $scope = Mage_Core_Model_Config::SCOPE_STORES, $area = Mage_Core_Model_App_Area::AREA_FRONTEND ) { /** @var $theme Mage_Core_Model_Theme */ @@ -111,25 +130,41 @@ class Mage_Core_Model_Theme_Service throw new UnexpectedValueException('Theme is not recognized. Requested id: ' . $themeId); } - $themeCustomization = $theme->isVirtual() ? $theme : $this->_createThemeCustomization($theme); + $themeCustomization = $theme->isVirtual() ? $theme : $this->createThemeCustomization($theme); $configPath = $this->_design->getConfigPathByArea($area); + // Unassign given theme from stores that were unchecked + /** @var $config Mage_Core_Model_Config_Data */ foreach ($this->_getAssignedScopesCollection($scope, $configPath) as $config) { if ($config->getValue() == $themeId && !in_array($config->getScopeId(), $stores)) { $this->_app->getConfig()->deleteConfig($configPath, $scope, $config->getScopeId()); } } - foreach ($stores as $storeId) { - $this->_app->getConfig()->saveConfig($configPath, $themeCustomization->getId(), $scope, $storeId); - } + if (count($stores) > 0) { + foreach ($stores as $storeId) { + $this->_app->getConfig()->saveConfig($configPath, $themeCustomization->getId(), $scope, $storeId); + } - if ($stores === null || count($stores) > 0) { $this->_app->cleanCache(Mage_Core_Model_Config::CACHE_TAG); } + $this->_makeTemporaryLayoutUpdatesPermanent($themeId, $stores); + $this->_app->cleanCache(array('layout', Mage_Core_Model_Layout_Merge::LAYOUT_GENERAL_CACHE_TAG)); - return $this; + $this->_eventManager->dispatch('assign_theme_to_stores_after', + array( + 'themeService' => $this, + 'themeId' => $themeId, + 'stores' => $stores, + 'scope' => $scope, + 'area' => $area, + 'theme' => $theme, + 'themeCustomization' => $themeCustomization, + ) + ); + + return $themeCustomization; } /** @@ -138,7 +173,7 @@ class Mage_Core_Model_Theme_Service * @param Mage_Core_Model_Theme $theme * @return Mage_Core_Model_Theme */ - protected function _createThemeCustomization($theme) + public function createThemeCustomization($theme) { $themeCopyCount = $this->_getThemeCustomizations()->addFilter('parent_id', $theme->getId())->count(); @@ -169,6 +204,20 @@ class Mage_Core_Model_Theme_Service ->addFieldToFilter('path', $configPath); } + /** + * Make temporary updates for given theme and given stores permanent + * + * @param int $themeId + * @param array $storeIds + */ + protected function _makeTemporaryLayoutUpdatesPermanent($themeId, array $storeIds) + { + // currently all layout updates are related to theme only + $storeIds = array_merge($storeIds, array(Mage_Core_Model_App::ADMIN_STORE_ID)); + + $this->_layoutUpdate->makeTemporaryLayoutUpdatesPermanent($themeId, $storeIds); + } + /** * Check whether theme customizations exist in Magento * @@ -300,4 +349,32 @@ class Mage_Core_Model_Theme_Service return $storesByThemes; } + + /** + * Add theme customization + * + * @param Mage_Core_Model_Layout $layout + * @return Mage_Core_Model_Theme_Service + */ + public function addThemeCustomization($layout) + { + $this->_addCssCustomization($layout); + return $this; + } + + /** + * Add css customization + * + * @param Mage_Core_Model_Layout $layout + * @return Mage_Core_Model_Theme_Service + */ + protected function _addCssCustomization($layout) + { + /** @var $theme Mage_Core_Model_Theme_Files */ + $customCssFile = $this->_design->getDesignTheme()->getCustomCssFile(); + if ($customCssFile->getContent()) { + $layout->getBlock('head')->addCss($customCssFile->getFilePath()); + } + return $this; + } } diff --git a/app/code/core/Mage/Core/Model/Url.php b/app/code/core/Mage/Core/Model/Url.php index 66b957e810b18f1f1e31e2b0d3bfebd1c11d67e6..4872b6baaabadb7f4ba93d9890ac542c8c1d03a8 100644 --- a/app/code/core/Mage/Core/Model/Url.php +++ b/app/code/core/Mage/Core/Model/Url.php @@ -400,6 +400,7 @@ class Mage_Core_Model_Url extends Varien_Object return $this; } + $this->unsetData('route_path'); $a = explode('/', $data); $route = array_shift($a); @@ -407,34 +408,31 @@ class Mage_Core_Model_Url extends Varien_Object $route = $this->getRequest()->getRequestedRouteName(); } $this->setRouteName($route); - $routePath = $route . '/'; + $controller = ''; if (!empty($a)) { $controller = array_shift($a); if ('*' === $controller) { $controller = $this->getRequest()->getRequestedControllerName(); } - $this->setControllerName($controller); - $routePath .= $controller . '/'; } + $this->setControllerName($controller); + $action = ''; if (!empty($a)) { $action = array_shift($a); if ('*' === $action) { $action = $this->getRequest()->getRequestedActionName(); } - $this->setActionName($action); - $routePath .= $action . '/'; } + $this->setActionName($action); if (!empty($a)) { - $this->unsetData('route_params'); while (!empty($a)) { $key = array_shift($a); if (!empty($a)) { $value = array_shift($a); $this->setRouteParam($key, $value); - $routePath .= $key . '/' . $value . '/'; } } } @@ -745,9 +743,7 @@ class Mage_Core_Model_Url extends Varien_Object return $this->getBaseUrl() . $routeParams['_direct']; } - if (!is_null($routePath)) { - $this->setRoutePath($routePath); - } + $this->setRoutePath($routePath); if (is_array($routeParams)) { $this->setRouteParams($routeParams, false); } @@ -965,8 +961,9 @@ class Mage_Core_Model_Url extends Varien_Object * this method has condition for adding default controller and action names * in case when we have params */ + $fragment = null; if (isset($routeParams['_fragment'])) { - $this->setFragment($routeParams['_fragment']); + $fragment = $routeParams['_fragment']; unset($routeParams['_fragment']); } @@ -1014,8 +1011,8 @@ class Mage_Core_Model_Url extends Varien_Object $this->unsetData('query_params'); } - if ($this->getFragment()) { - $url .= '#' . $this->getFragment(); + if (!is_null($fragment)) { + $url .= '#' . $fragment; } return $this->escape($url); @@ -1112,7 +1109,8 @@ class Mage_Core_Model_Url extends Varien_Object * @param array $params * @return string */ - public function getDirectUrl($url, $params = array()) { + public function getDirectUrl($url, $params = array()) + { $params['_direct'] = $url; return $this->getUrl('', $params); } @@ -1140,7 +1138,7 @@ class Mage_Core_Model_Url extends Varien_Object $key = 'use_session_id_for_url_' . (int) $secure; if (is_null($this->getData($key))) { $httpHost = Mage::app()->getFrontController()->getRequest()->getHttpHost(); - $urlHost = parse_url(Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, $secure), + $urlHost = parse_url($this->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, $secure), PHP_URL_HOST); if ($httpHost != $urlHost) { diff --git a/app/code/core/Mage/Core/etc/config.xml b/app/code/core/Mage/Core/etc/config.xml index 5479ba8f01c63fe1acdec386048845ece197618e..7cfcd73d5cee12773255f506d976be6edac7f7d0 100644 --- a/app/code/core/Mage/Core/etc/config.xml +++ b/app/code/core/Mage/Core/etc/config.xml @@ -28,7 +28,7 @@ <config> <modules> <Mage_Core> - <version>1.6.0.6</version> + <version>1.6.0.9</version> <active>true</active> <codePool>core</codePool> </Mage_Core> @@ -108,14 +108,24 @@ <shared>0</shared> </Magento_Data_Structure> <Magento_Filesystem> - <shared>0</shared> <parameters> <adapter>Magento_Filesystem_Adapter_Local</adapter> </parameters> + <shared>0</shared> </Magento_Filesystem> </di> </global> <frontend> + <events> + <controller_action_layout_generate_blocks_after> + <observers> + <add_theme_customization> + <class>Mage_Core_Model_Observer</class> + <method>addThemeCustomization</method> + </add_theme_customization> + </observers> + </controller_action_layout_generate_blocks_after> + </events> <routers> <core> <use>standard</use> diff --git a/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.6-1.6.0.7.php b/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.6-1.6.0.7.php new file mode 100644 index 0000000000000000000000000000000000000000..69f3a70c08660a8705a573d77e5145b1c60184b3 --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.6-1.6.0.7.php @@ -0,0 +1,93 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/* @var $installer Mage_Core_Model_Resource_Setup */ +$installer = $this; + +$installer->startSetup(); +$connection = $installer->getConnection(); + +/** + * Modifying 'core_layout_link' table. Adding 'is_temporary' column + */ +$tableCoreLayoutLink = $installer->getTable('core_layout_link'); + +$connection->addColumn($tableCoreLayoutLink, 'is_temporary', + array( + 'type' => Varien_Db_Ddl_Table::TYPE_BOOLEAN, + 'nullable' => false, + 'default' => '0', + 'comment' => 'Defines whether Layout Update is Temporary' + ) +); + +// we must drop next 2 foreign keys to have an ability to drop index +$connection->dropForeignKey( + $tableCoreLayoutLink, + $installer->getFkName($tableCoreLayoutLink, 'store_id', 'core_store', 'store_id') +); +$connection->dropForeignKey( + $tableCoreLayoutLink, + $installer->getFkName($tableCoreLayoutLink, 'theme_id', 'core_theme', 'theme_id') +); + +$connection->dropIndex($tableCoreLayoutLink, $installer->getIdxName( + $tableCoreLayoutLink, + array('store_id', 'theme_id', 'layout_update_id'), + Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE +)); + +$connection->addIndex($tableCoreLayoutLink, + $installer->getIdxName( + $tableCoreLayoutLink, + array('store_id', 'theme_id', 'layout_update_id', 'is_temporary'), + Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE + ), + array('store_id', 'theme_id', 'layout_update_id', 'is_temporary'), + Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE +); + +// recreate 2 dropped foreign keys to have an ability to drop index +$connection->addForeignKey( + $installer->getFkName($tableCoreLayoutLink, 'store_id', 'core_store', 'store_id'), + $tableCoreLayoutLink, + 'store_id', + $installer->getTable('core_store'), + 'store_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, + Varien_Db_Ddl_Table::ACTION_CASCADE +); +$connection->addForeignKey( + $installer->getFkName($tableCoreLayoutLink, 'theme_id', 'core_theme', 'theme_id'), + $tableCoreLayoutLink, + 'theme_id', + $installer->getTable('core_theme'), + 'theme_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, + Varien_Db_Ddl_Table::ACTION_CASCADE +); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.7-1.6.0.8.php b/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.7-1.6.0.8.php new file mode 100644 index 0000000000000000000000000000000000000000..bf148d78fd3495fec77764a720f6e1a72f732c6e --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.7-1.6.0.8.php @@ -0,0 +1,42 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/* @var $installer Mage_Core_Model_Resource_Setup */ +$installer = $this; + +$installer->startSetup(); +$connection = $installer->getConnection(); + +/** + * Add column 'updated_at' to 'core_layout_update' + */ +$connection->addColumn($installer->getTable('core_layout_update'), 'updated_at', array( + 'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP, + 'nullable' => true, + 'comment' => 'Last Update Timestamp' +)); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.8-1.6.0.9.php b/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.8-1.6.0.9.php new file mode 100644 index 0000000000000000000000000000000000000000..8b79ccc0c2c27a2f77e0b75d9480a953944caafc --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.8-1.6.0.9.php @@ -0,0 +1,66 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/* @var $installer Mage_Core_Model_Resource_Setup */ +$installer = $this; + +$installer->startSetup(); +$connection = $installer->getConnection(); + +/** + * Create table 'core_theme_files' + */ +$table = $installer->getConnection() + ->newTable($installer->getTable('core_theme_files')) + ->addColumn('theme_files_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'identity' => true, + 'unsigned' => true, + 'nullable' => false, + 'primary' => true, + ), 'Theme files identifier') + ->addColumn('theme_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'nullable' => false, + 'unsigned' => true + ), 'Theme Id') + ->addColumn('file_name', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array('nullable' => false), 'File Name') + ->addColumn('file_type', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array('nullable' => false), 'File Type') + ->addColumn('content', Varien_Db_Ddl_Table::TYPE_TEXT, Varien_Db_Ddl_Table::MAX_TEXT_SIZE, array( + 'nullable' => false + ), 'File Content') + ->addColumn('order', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array('nullable' => false, 'default' => 0), 'Order') + ->addForeignKey( + $installer->getFkName('core_theme_files', 'theme_id', 'core_theme', 'theme_id'), + 'theme_id', + $installer->getTable('core_theme'), + 'theme_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, + Varien_Db_Ddl_Table::ACTION_CASCADE + ) + ->setComment('Core theme files'); + +$installer->getConnection()->createTable($table); + +$installer->endSetup(); diff --git a/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php b/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php index 44e07099fea99d043d61fe1cfda3f1041f93cf97..edfa358d790de28da711233ca1963bc0314e1117 100644 --- a/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php +++ b/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php @@ -82,9 +82,11 @@ class Mage_CurrencySymbol_Block_Adminhtml_System_Currencysymbol extends Mage_Adm $block->setData(array( 'label' => Mage::helper('Mage_CurrencySymbol_Helper_Data')->__('Save Currency Symbols'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#currency-symbols-form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#currency-symbols-form'), + ), + ), )); return $block->toHtml(); diff --git a/app/code/core/Mage/CurrencySymbol/view/adminhtml/grid.phtml b/app/code/core/Mage/CurrencySymbol/view/adminhtml/grid.phtml index 9d3d42be146719158db305669ff29b12ae5a72a7..3682c609bb4b6261cd5f13f66278850edf87a5de 100644 --- a/app/code/core/Mage/CurrencySymbol/view/adminhtml/grid.phtml +++ b/app/code/core/Mage/CurrencySymbol/view/adminhtml/grid.phtml @@ -83,7 +83,7 @@ </div> </form> <script type="text/javascript"> - jQuery('#currency-symbols-form').form().validation(); + jQuery('#currency-symbols-form').mage('form').mage('validation'); function toggleUseDefault(code, value) { diff --git a/app/code/core/Mage/Customer/Block/Widget/Dob.php b/app/code/core/Mage/Customer/Block/Widget/Dob.php index 35fe4ae6d3deeb57977d995c188e6b2e55797922..b5d2f504ecec3c7f5805886b8f3016cf849adb35 100644 --- a/app/code/core/Mage/Customer/Block/Widget/Dob.php +++ b/app/code/core/Mage/Customer/Block/Widget/Dob.php @@ -101,19 +101,21 @@ class Mage_Customer_Block_Widget_Dob extends Mage_Customer_Block_Widget_Abstract */ public function getSortedDateInputs() { - $strtr = array( - '%b' => '%1$s', - '%B' => '%1$s', - '%m' => '%1$s', - '%d' => '%2$s', - '%e' => '%2$s', - '%Y' => '%3$s', - '%y' => '%3$s' + $mapping = array( + '/[^medy]/i' => '\\1', + '/m{1,5}/i' => '%1$s', + '/e{1,5}/i' => '%2$s', + '/d{1,5}/i' => '%2$s', + '/y{1,5}/i' => '%3$s', ); - $dateFormat = preg_replace('/[^\%\w]/', '\\1', $this->getDateFormat()); + $dateFormat = preg_replace( + array_keys($mapping), + array_values($mapping), + $this->getDateFormat() + ); - return sprintf(strtr($dateFormat, $strtr), + return sprintf($dateFormat, $this->_dateInputs['m'], $this->_dateInputs['d'], $this->_dateInputs['y']); } } diff --git a/app/code/core/Mage/Customer/view/frontend/address/edit.phtml b/app/code/core/Mage/Customer/view/frontend/address/edit.phtml index b63f0293bc61ca7d2b507b7404a3ac3a2013e033..ed33aa56ccddd6cddf81398fd32dcf09d9101608 100644 --- a/app/code/core/Mage/Customer/view/frontend/address/edit.phtml +++ b/app/code/core/Mage/Customer/view/frontend/address/edit.phtml @@ -108,11 +108,6 @@ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;"> <option value=""><?php echo $this->__('Please select region, state or province') ?></option> </select> - <script type="text/javascript"> - //<![CDATA[ - $('region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>"); - //]]> - </script> <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('Mage_Customer_Helper_Address')->getAttributeValidationClass('region') ?>" /> </div> </div> @@ -158,8 +153,23 @@ </div> </form> <script type="text/javascript"> -//<![CDATA[ - var dataForm = new VarienForm('form-validate', true); - new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('Mage_Directory_Helper_Data')->getRegionJson() ?>, undefined, 'zip'); -//]]> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Checkout::js/region-updater.js') ?>", + function() { + $('#country').regionUpdater({ + regionListId: '#region_id', + regionInputId: '#region', + postcodeId: '#zip', + form: $('#form-validate').validation(), + regionJson: <?php echo $this->helper('Mage_Directory_Helper_Data')->getRegionJson() ?>, + defaultRegion: "<?php echo $this->getAddress()->getRegionId() ?>", + countriesWithOptionalZip: <?php echo $this->helper('Mage_Directory_Helper_Data')->getCountriesWithOptionalZip(true) ?> + }); + }); + })(jQuery); </script> diff --git a/app/code/core/Mage/Customer/view/frontend/form/address.phtml b/app/code/core/Mage/Customer/view/frontend/form/address.phtml index ae4ae49c9f6350041acbf38cad5ec5926d8d4fbb..fe71e2b50eb0b445656f6522cd3980c6ff003466 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/address.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/address.phtml @@ -24,7 +24,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<script type="text/javascript">countryRegions = <?php echo $this->helper('Mage_Directory_Helper_Data')->getRegionJson() ?></script> <div class="page-title"> <h1><?php if($data->getAddressId()): ?><?php echo $this->__('Edit Address Entry') ?><?php else: ?><?php echo $this->__('New Address Entry') ?><?php endif ?></h1> @@ -78,11 +77,6 @@ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;"> <option value=""><?php echo $this->__('Please select region, state or province') ?></option> </select> - <script type="text/javascript"> - //<![CDATA[ - $('region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>"); - //]]> - </script> <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('Mage_Customer_Helper_Address')->getAttributeValidationClass('region') ?>" style="display:none;" /> </div> </div> @@ -107,7 +101,7 @@ <div class="field"> <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label> <div class="input-box"> - <input type="text" name="telephone" value="<?php echo $this->escapeHtml($data->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('Mage_Customer_Helper_Address')->getAttributeValidationClass('telephone') ?>" id="telephone" /> + <input type="text" name="telephone" value="<?php echo $this->escapeHtml($data->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('Mage_Customer_Helper_Address')->getAttributeValidationClass('telephone') ?>" id="telephone" > </div> </div> <div class="field"> @@ -136,8 +130,24 @@ </form> <script type="text/javascript"> //<![CDATA[ - var dataForm = new VarienForm('form-validate', true); - //dataForm.setElementsRelation('country', 'state', '<?php echo $this->getUrl('directory/json/childRegion') ?>'); - new RegionUpdater('country', 'region', 'region_id', countryRegions, undefined, 'zip'); +(function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Checkout::js/region-updater.js') ?>", + function() { + $('#country').regionUpdater({ + regionListId: '#region_id', + regionInputId: '#region', + postcodeId: '#zip', + form: $('#form-validate').validation(), + regionJson: <?php echo $this->helper('Mage_Directory_Helper_Data')->getRegionJson() ?>, + defaultRegion: "<?php echo $this->getAddress()->getRegionId() ?>", + countriesWithOptionalZip: <?php echo $this->helper('Mage_Directory_Helper_Data')->getCountriesWithOptionalZip(true) ?> + }); + }); +})(jQuery); //]]> </script> diff --git a/app/code/core/Mage/Customer/view/frontend/form/changepassword.phtml b/app/code/core/Mage/Customer/view/frontend/form/changepassword.phtml index d8ba78a03ea98b97da059759a6849dd79e5a98e4..93ce2a32afb6e891ca9c4416ba8b610d25fcbb84 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/changepassword.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/changepassword.phtml @@ -35,20 +35,20 @@ <li> <label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label> <div class="input-box"> - <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text required-entry" name="current_password" id="current_password" /> + <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" /> </div> </li> <li class="fields"> <div class="field"> <label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label> <div class="input-box"> - <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text required-entry validate-password" name="password" id="password" /> + <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text" name="password" id="password" /> </div> </div> <div class="field"> <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label> <div class="input-box"> - <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" /> + <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text" name="confirmation" id="confirmation" /> </div> </div> </li> @@ -62,6 +62,42 @@ </form> <script type="text/javascript"> //<![CDATA[ - var dataForm = new VarienForm('form-validate'); +(function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Customer::set-password.js') ?>", + <?php if ($_dob->isEnabled()): ?> + "<?php echo $this->getViewFileUrl('mage/validation/dob-rule.js') ?>", + <?php endif ?> + function() { + $('#change-password').setPassword({ + currentPasswordId: '#current-password', + passwordId: '#password', + confirmationId: '#confirmation', + passwordContainer: 'div.fieldset', + showOnDefault: <?php echo $this->getCustomer()->getChangePassword() ? 'true' : 'false' ?> + }); + $('#form-validate').validation({ + <?php if ($_dob->isEnabled()): ?> + errorPlacement: function(error, element) { + if (element.prop('id') === 'dob') { + var dobElement = $('.customer-dob'), + errorClass = error.prop('class'); + error.insertAfter(element.parent()); + dobElement.find('.validate-custom').addClass(errorClass) + .after('<div class="' + errorClass + '"></div>'); + } + else { + error.insertAfter(element); + } + }, + ignore: ':hidden:not(#dob)' + <?php endif ?> + }); + }); +})(jQuery); //]]> </script> diff --git a/app/code/core/Mage/Customer/view/frontend/form/confirmation.phtml b/app/code/core/Mage/Customer/view/frontend/form/confirmation.phtml index ea6e8d314dbf4539a907959b038ab8b2a62f036e..3635bf4f397f0553e5d8975e25b9b8b314d8f5df 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/confirmation.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/confirmation.phtml @@ -36,7 +36,7 @@ <li> <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label> <div class="input-box"> - <input type="text" name="email" id="email_address" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" value="<?php echo $this->escapeHtml($this->getEmail()) ?>" /> + <input type="text" name="email" id="email_address" title="<?php echo $this->__('Email Address') ?>" class="input-text" value="<?php echo $this->escapeHtml($this->getEmail()) ?>" data-validate="{required:true, 'validate-email':true}"/> </div> </li> </ul> @@ -48,7 +48,14 @@ </div> </form> <script type="text/javascript"> -//<![CDATA[ - var dataForm = new VarienForm('form-validate', true); -//]]> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#form-validate').validation(); + }); + })(jQuery); </script> diff --git a/app/code/core/Mage/Customer/view/frontend/form/edit.phtml b/app/code/core/Mage/Customer/view/frontend/form/edit.phtml index f7ec011f51cf9a3b3eda4767ba8b8f1dfe2c9d81..e9c28c59393d45807348e54cee7d1b8707efac72 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/edit.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/edit.phtml @@ -39,7 +39,7 @@ <li> <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label> <div class="input-box"> - <input type="text" name="email" id="email" value="<?php echo $this->escapeHtml($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" /> + <input type="text" name="email" id="email" value="<?php echo $this->escapeHtml($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}"/> </div> </li> <?php $_dob = $this->getLayout()->createBlock('Mage_Customer_Block_Widget_Dob') ?> @@ -55,7 +55,7 @@ <li><?php echo $_gender->setGender($this->getCustomer()->getGender())->toHtml() ?></li> <?php endif ?> <li class="control"> - <input type="checkbox" name="change_password" id="change_password" value="1" onclick="setPasswordForm(this.checked)" title="<?php echo $this->__('Change Password') ?>"<?php if($this->getCustomer()->getChangePassword()==1): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="change_password"><?php echo $this->__('Change Password') ?></label> + <input type="checkbox" name="change_password" id="change-password" value="1" title="<?php echo $this->__('Change Password') ?>"<?php if($this->getCustomer()->getChangePassword()==1): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="change-password"><?php echo $this->__('Change Password') ?></label> </li> </ul> </div> @@ -63,22 +63,22 @@ <h2 class="legend"><?php echo $this->__('Change Password') ?></h2> <ul class="form-list"> <li> - <label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label> + <label for="current-password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label> <div class="input-box"> - <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" /> + <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current-password" /> </div> </li> <li class="fields"> <div class="field"> <label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label> <div class="input-box"> - <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text validate-password" name="password" id="password" /> + <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text" name="password" id="password" /> </div> </div> <div class="field"> <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label> <div class="input-box"> - <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text validate-cpassword" name="confirmation" id="confirmation" /> + <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text" name="confirmation" id="confirmation" /> </div> </div> </li> @@ -91,24 +91,41 @@ </div> </form> <script type="text/javascript"> -//<![CDATA[ - var dataForm = new VarienForm('form-validate', true); - function setPasswordForm(arg){ - if(arg){ - $('current_password').up(3).show(); - $('current_password').addClassName('required-entry'); - $('password').addClassName('required-entry'); - $('confirmation').addClassName('required-entry'); - - }else{ - $('current_password').up(3).hide(); - $('current_password').removeClassName('required-entry'); - $('password').removeClassName('required-entry'); - $('confirmation').removeClassName('required-entry'); - } - } - <?php if($this->getCustomer()->getChangePassword()): ?> - setPasswordForm(true); - <?php endif; ?> -//]]> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Customer::set-password.js') ?>", + <?php if ($_dob->isEnabled()): ?> + "<?php echo $this->getViewFileUrl('mage/validation/dob-rule.js') ?>", + <?php endif ?> + function() { + $('#change-password').setPassword({ + currentPasswordId: '#current-password', + passwordId: '#password', + confirmationId: '#confirmation', + passwordContainer: 'div.fieldset', + showOnDefault: <?php echo $this->getCustomer()->getChangePassword() ? 'true' : 'false' ?> + }); + $('#form-validate').validation({ + <?php if ($_dob->isEnabled()): ?> + errorPlacement: function(error, element) { + if (element.prop('id') === 'dob') { + var dobElement = $('.customer-dob'), + errorClass = error.prop('class'); + error.insertAfter(element.parent()); + dobElement.find('.validate-custom').addClass(errorClass) + .after('<div class="' + errorClass + '"></div>'); + } + else { + error.insertAfter(element); + } + }, + ignore: ':hidden:not(#dob)' + <?php endif ?> + }); + }); + })(jQuery); </script> diff --git a/app/code/core/Mage/Customer/view/frontend/form/forgotpassword.phtml b/app/code/core/Mage/Customer/view/frontend/form/forgotpassword.phtml index 79c971947c8e1356edcc5b778fb298b857fa2911..f77a9d9490c190b521e069a629e3e5cacffce6ba 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/forgotpassword.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/forgotpassword.phtml @@ -36,7 +36,7 @@ <li> <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label> <div class="input-box"> - <input type="text" name="email" alt="email" id="email_address" class="input-text required-entry validate-email" value="<?php echo $this->escapeHtml($this->getEmailValue()) ?>" /> + <input type="text" name="email" alt="email" id="email_address" class="input-text" value="<?php echo $this->escapeHtml($this->getEmailValue()) ?>" data-validate="{required:true, 'validate-email':true}" /> </div> </li> <?php echo $this->getChildHtml('form.additional.info'); ?> @@ -49,7 +49,14 @@ </div> </form> <script type="text/javascript"> -//<![CDATA[ - var dataForm = new VarienForm('form-validate', true); -//]]> -</script> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#form-validate').validation(); + }); + })(jQuery); +</script> \ No newline at end of file diff --git a/app/code/core/Mage/Customer/view/frontend/form/login.phtml b/app/code/core/Mage/Customer/view/frontend/form/login.phtml index ceca186bc930e690b39ddd7e729ccff4b211fbdb..8230668833508ccc74bc06622f0255a0340e7052 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/login.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/login.phtml @@ -54,13 +54,13 @@ <li> <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label> <div class="input-box"> - <input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" /> + <input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text" title="<?php echo $this->__('Email Address') ?>" data-validate="{required:true, 'validate-email':true}" /> </div> </li> <li> <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label> <div class="input-box"> - <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" /> + <input type="password" name="login[password]" class="input-text" id="pass" title="<?php echo $this->__('Password') ?>" data-validate="{required:true, 'validate-password':true}" /> </div> </li> <?php echo $this->getChildHtml('form.additional.info'); ?> @@ -72,7 +72,7 @@ <div class="col2-set"> <div class="col-1 new-users"> <div class="buttons-set"> - <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button> + <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button"><span><span><?php echo $this->__('Create an Account') ?></span></span></button> </div> </div> <div class="col-2 registered-users"> @@ -84,8 +84,16 @@ </div> </form> <script type="text/javascript"> - //<![CDATA[ - var dataForm = new VarienForm('login-form', true); - //]]> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#login-form .new-users button').on('click', function() {window.location='<?php echo $this->getCreateAccountUrl() ?>';}); + $('#login-form').validation(); + }); + })(jQuery); </script> </div> diff --git a/app/code/core/Mage/Customer/view/frontend/form/newsletter.phtml b/app/code/core/Mage/Customer/view/frontend/form/newsletter.phtml index a911146defe0b4350a74222b44361e5e250bb7d5..6aa12c6c8f87ed0fd196a1ab5d7cedfa35ab5307 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/newsletter.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/newsletter.phtml @@ -45,9 +45,4 @@ </div> </form> <?php /* Extensions placeholder */ ?> -<?php echo $this->getChildHtml('customer.form.newsletter.extra2')?> -<script type="text/javascript"> -//<![CDATA[ - var dataForm = new VarienForm('form-validate', true); -//]]> -</script> +<?php echo $this->getChildHtml('customer.form.newsletter.extra2')?> \ No newline at end of file diff --git a/app/code/core/Mage/Customer/view/frontend/form/register.phtml b/app/code/core/Mage/Customer/view/frontend/form/register.phtml index 6763824fcf6ef592b0ce1bc6f3f30cf819a05f1b..f40325b7615f8c508b7f893d2d09abdc94b1a753 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/register.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/register.phtml @@ -51,7 +51,7 @@ <li> <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label> <div class="input-box"> - <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" /> + <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}" /> </div> </li> <?php if ($this->isNewsletterEnabled()): ?> @@ -125,11 +125,7 @@ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;"> <option value=""><?php echo $this->__('Please select region, state or province') ?></option> </select> - <script type="text/javascript"> - //<![CDATA[ - $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>"); - //]]> - </script> + <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('Mage_Customer_Helper_Address')->getAttributeValidationClass('region') ?>" style="display:none;" /> </div> </div> @@ -160,13 +156,13 @@ <div class="field"> <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label> <div class="input-box"> - <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" /> + <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text" data-validate="{required:true, 'validate-password':true}" /> </div> </div> <div class="field"> <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label> <div class="input-box"> - <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" /> + <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text" data-validate="{required:true, equalTo:'#password'}" /> </div> </div> </li> @@ -180,11 +176,46 @@ </div> </form> <script type="text/javascript"> - //<![CDATA[ - var dataForm = new VarienForm('form-validate', true); - <?php if($this->getShowAddressFields()): ?> - new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('Mage_Directory_Helper_Data')->getRegionJson() ?>, undefined, 'zip'); - <?php endif; ?> - //]]> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Checkout::js/region-updater.js') ?>", + <?php if ($_dob->isEnabled()): ?> + "<?php echo $this->getViewFileUrl('mage/validation/dob-rule.js') ?>", + <?php endif ?> + function() { + var dataForm = $('#form-validate').validation({ + <?php if ($_dob->isEnabled()): ?> + errorPlacement: function(error, element) { + if (element.prop('id') === 'dob') { + var dobElement = $('.customer-dob'), + errorClass = error.prop('class'); + error.insertAfter(element.parent()); + dobElement.find('.validate-custom').addClass(errorClass) + .after('<div class="' + errorClass + '"></div>'); + } + else { + error.insertAfter(element); + } + }, + ignore: ':hidden:not(#dob)' + <?php endif ?> + }); + <?php if($this->getShowAddressFields()): ?> + $('#country').regionUpdater({ + regionListId: '#region_id', + regionInputId: '#region', + postcodeId: '#zip', + form: dataForm, + regionJson: <?php echo $this->helper('Mage_Directory_Helper_Data')->getRegionJson() ?>, + defaultRegion: "<?php echo $this->getAddress()->getRegionId() ?>", + countriesWithOptionalZip: <?php echo $this->helper('Mage_Directory_Helper_Data')->getCountriesWithOptionalZip(true) ?> + }); + <?php endif; ?> + }); + })(jQuery); </script> </div> diff --git a/app/code/core/Mage/Customer/view/frontend/form/resetforgottenpassword.phtml b/app/code/core/Mage/Customer/view/frontend/form/resetforgottenpassword.phtml index 00c555c1d6a59cf14e17a313e51bde76994f76e4..8003e05561a8807b97db0a59bd252d4e4287905b 100644 --- a/app/code/core/Mage/Customer/view/frontend/form/resetforgottenpassword.phtml +++ b/app/code/core/Mage/Customer/view/frontend/form/resetforgottenpassword.phtml @@ -35,13 +35,13 @@ <div class="field"> <label for="password" class="required"><em>*</em><?php echo $this->__('New Password'); ?></label> <div class="input-box"> - <input type="password" class="input-text required-entry validate-password" name="password" id="password" /> + <input type="password" class="input-text" name="password" id="password" data-validate="{required:true, 'validate-password':true}"/> </div> </div> <div class="field"> <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password'); ?></label> <div class="input-box"> - <input type="password" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" /> + <input type="password" class="input-text" name="confirmation" id="confirmation" data-validate="{required:true,equalTo:'#password'}"/> </div> </div> </li> @@ -53,7 +53,14 @@ </div> </form> <script type="text/javascript"> -/*<![CDATA[*/ - var dataForm = new VarienForm('form-validate', true); -/*]]>*/ + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#form-validate').validation(); + }); + })(jQuery); </script> diff --git a/app/code/core/Mage/Customer/view/frontend/register.js b/app/code/core/Mage/Customer/view/frontend/register.js deleted file mode 100644 index 7fda1b71fb32e258ca465bd844afeb1265b33131..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Customer/view/frontend/register.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category customer frontend register - * @package mage - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -/*jshint browser:true jquery:true*/ -(function ($) { - var registerInit = {}; - $.mage.event.trigger("mage.register.initialize", registerInit); - - if (registerInit.autocomplete === 'off') { - $(registerInit.formSelector).find('input:text').attr('autocomplete', 'off'); - } - // Custom validation for DOB field - $.mage.event.observe('mage.form.afterValidation', function(evernt, oldForm) { - var dobElement = $(registerInit.dobSelector), - passRequired = true, - day = parseInt(dobElement.find(registerInit.dobDaySelector).first().val(), 10) || 0, - month = parseInt(dobElement.find(registerInit.dobMonthSelector).first().val(), 10) || 0, - year = parseInt(dobElement.find(registerInit.dobYearSelector).first().val(), 10) || 0, - curYear = (new Date()).getFullYear(); - if (dobElement.length === 0) { - return; - } - function showError(msg) { - dobElement.children('.validation-advice').html($.mage.__(msg)).show(); - dobElement.find('.validate-custom').addClass('mage-error').after(function (){ - return '<div id="advice-validate-custom-%s" class="validation-advice"></div>'.replace('%s', $(this).attr('id')); - }); - return false; - } - dobElement.find('.validation-advice').hide(); - dobElement.find('.mage-error').removeClass('mage-error'); - // Check if DOB field is required - if (dobElement.siblings('.required').length > 0) { - dobElement.find('input.validate-custom').each(function() { - var $this = $(this); - passRequired = $this.val().length !== 0; - }); - if (!passRequired) { - oldForm.status = showError('This is a required field.'); - return; - } - } - if (!day || !month || !year) { - oldForm.status = showError('Please enter a valid full date.'); - return; - } - if (month < 1 || month > 12) { - oldForm.status = showError('Please enter a valid month (1-12).'); - return; - } - if (year < 1900 || year > curYear) { - oldForm.status = showError('Please enter a valid year (1900-%d).'.replace('%d', curYear)); - return; - } - if ($.inArray(month, [1, 3, 5, 7, 8, 10, 12]) >= 0 && (day < 1 || day > 31)) { - oldForm.status = showError('Please enter a valid day (1-31).'); - return; - } - if ($.inArray(month, [4, 6, 9, 11]) >= 0 && (day < 1 || day > 30)) { - oldForm.status = showError('Please enter a valid day (1-30).'); - return; - } - if (month === 2 && year % 4 === 0 && (day < 1 || day > 29)){ - oldForm.status = showError('Please enter a valid day (1-29).'); - return; - } - if (month === 2 && year % 4 !== 0 && (day < 1 || day > 28)){ - oldForm.status = showError('Please enter a valid day (1-28).'); - return; - } - // Format validate day for form submit - day = day % 10 === day ? '0' + day : day; - month = month % 10 === month ? '0' + month : month; - $(registerInit.dobInputSelector).val(month + '/' + day + '/' + year); - }); - $(registerInit.formSelector).mage().validate(); -})(jQuery); diff --git a/app/code/core/Mage/Customer/view/frontend/set-password.js b/app/code/core/Mage/Customer/view/frontend/set-password.js new file mode 100644 index 0000000000000000000000000000000000000000..dbca1266c9293c2b0f16c0fefddf4c73c06216d8 --- /dev/null +++ b/app/code/core/Mage/Customer/view/frontend/set-password.js @@ -0,0 +1,58 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage customer view + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true expr:true*/ +(function ($) { + $.widget('mage.setPassword', { + _create: function() { + this.element.on('change', $.proxy(function(event) { + $(event.target).is(':checked') ? this._showPassword() : this._hidePassword(); + }, this)); + this.options.showOnDefault && this._showPassword(); + }, + + /** + * Hide password input fields + * @private + */ + _hidePassword: function() { + $(this.options.currentPasswordId).removeAttr('data-validate') + .parents(this.options.passwordContainer).hide(); + $(this.options.passwordId).removeAttr('data-validate'); + $(this.options.confirmationId).removeAttr('data-validate'); + }, + + /** + * Show password input fields + * @private + */ + _showPassword: function() { + $(this.options.currentPasswordId).attr('data-validate', '{required:true}') + .parents(this.options.passwordContainer).show(); + $(this.options.passwordId).attr('data-validate', "{required:true, 'validate-password':true}"); + $(this.options.confirmationId).attr('data-validate', + '{required:true, equalTo:"' + this.options.passwordId + '"}'); + } + }); +})(jQuery); \ No newline at end of file diff --git a/app/code/core/Mage/Customer/view/frontend/widget/dob.phtml b/app/code/core/Mage/Customer/view/frontend/widget/dob.phtml index c2bf355b00db6151593781adaf25c1b12a119107..a20933c02a15dea81a7a71c493f0e66c24d3d95d 100644 --- a/app/code/core/Mage/Customer/view/frontend/widget/dob.phtml +++ b/app/code/core/Mage/Customer/view/frontend/widget/dob.phtml @@ -75,7 +75,7 @@ NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css ?> <?php echo $this->getSortedDateInputs() ?> <div class="dob-full" style="display:none;"> - <input type="hidden" id="<?php echo $this->getFieldId('dob')?>" name="<?php echo $this->getFieldName('dob')?>" /> + <input type="hidden" id="<?php echo $this->getFieldId('dob')?>" name="<?php echo $this->getFieldName('dob')?>" data-validate="{'validate-dob': ['.dob-day', '.dob-month', '.dob-year', <?php echo $this->isRequired() ? 'true' : 'false' ?>]}"/> </div> <div class="validation-advice" style="display:none;"></div> diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons.php index 10e82de881fd27fbeb0f19e7049a3a11e3e27641..8fc41e724f3fb2d69b470ea99892b48a893ff58f 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons.php @@ -71,13 +71,13 @@ class Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_Buttons } /** - * Get "Back" button URL + * Get "Quit" button URL * * @return string */ - public function getBackUrl() + public function getQuitUrl() { - return $this->getUrl('*/*/'); + return $this->getUrl('*/*/quit'); } /** @@ -88,8 +88,8 @@ class Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_Buttons public function getNavigationModeUrl() { return $this->getUrl('*/*/launch', array( - 'mode' => Mage_DesignEditor_Model_State::MODE_NAVIGATION, - 'theme_id' => $this->getThemeId() + 'theme_id' => $this->getThemeId(), + 'mode' => Mage_DesignEditor_Model_State::MODE_NAVIGATION )); } @@ -101,8 +101,8 @@ class Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_Buttons public function getDesignModeUrl() { return $this->getUrl('*/*/launch', array( - 'mode' => Mage_DesignEditor_Model_State::MODE_DESIGN, - 'theme_id' => $this->getThemeId() + 'theme_id' => $this->getThemeId(), + 'mode' => Mage_DesignEditor_Model_State::MODE_DESIGN )); } @@ -116,20 +116,71 @@ class Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_Buttons /** @var $assignButton Mage_Backend_Block_Widget_Button */ $assignButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button'); $assignButton->setData(array( - 'label' => $this->__('Assign this Theme'), - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'assign', - 'related' => 'body', - 'eventData' => array( - 'theme_id' => $this->getThemeId() - ) + 'label' => $this->__('Assign this Theme'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'assign', + 'target' => 'body', + 'eventData' => array( + 'theme_id' => $this->getThemeId() + ) + ), ), ), - 'class' => 'save action-theme-assign', - 'target' => '_blank' + 'class' => 'save action-theme-assign', + 'target' => '_blank' )); return $assignButton->toHtml(); } + + /** + * Get switch mode button + * + * @return string + */ + public function getSwitchModeButtonHtml() + { + $eventData = array( + 'theme_id' => $this->getThemeId(), + ); + + if ($this->isNavigationMode()) { + $label = $this->__('Design Mode'); + $eventData['mode_url'] = $this->getDesignModeUrl(); + } else { + $label = $this->__('Navigation Mode'); + $eventData['mode_url'] = $this->getNavigationModeUrl(); + $eventData['save_changes_url'] = $this->getSaveTemporaryLayoutUpdateUrl(); + } + + /** @var $switchButton Mage_Backend_Block_Widget_Button */ + $switchButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button'); + $switchButton->setData(array( + 'label' => $label, + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'switchMode', + 'target' => 'body', + 'eventData' => $eventData + ), + ), + ), + 'class' => 'action-switch-mode', + )); + + return $switchButton->toHtml(); + } + + /** + * Get save temporary layout changes url + * + * @return string + */ + public function getSaveTemporaryLayoutUpdateUrl() + { + return $this->getUrl('*/*/saveTemporaryLayoutUpdate'); + } } diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/HandlesHierarchy.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/HandlesHierarchy.php index eca6836b80a64a8586ba384c172da55722edf9ec..6bc9731cdb0d179cd78af50698ed2a9a63264f9e 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/HandlesHierarchy.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/HandlesHierarchy.php @@ -61,6 +61,7 @@ class Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_HandlesHierarchy * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_DesignEditor_Model_Url_Handle $vdeUrlBuilder * @param array $data * @@ -78,14 +79,14 @@ class Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_HandlesHierarchy Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_DesignEditor_Model_Url_Handle $vdeUrlBuilder, array $data = array() ) { $this->_vdeUrlBuilder = $vdeUrlBuilder; parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data - ); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); } /** diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme.php index 48ea4bcbda3c6294b705e874c84cac64ed375858..f523e3d8034bd3d9f1fff761eab0d64ff4005caa 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme.php @@ -35,7 +35,7 @@ class Mage_DesignEditor_Block_Adminhtml_Theme extends Mage_Backend_Block_Templat /** * Buttons array * - * @var array() + * @var array */ protected $_buttons = array(); @@ -91,4 +91,38 @@ class Mage_DesignEditor_Block_Adminhtml_Theme extends Mage_Backend_Block_Templat } return $storesTitles; } + + /** + * Get options for JS widget vde.themeControl + * + * @return string + */ + public function getOptionsJson() + { + $theme = $this->getTheme(); + $options = array( + 'theme_id' => $theme->getId(), + 'theme_title' => $theme->getThemeTitle() + ); + + /** @var $helper Mage_Core_Helper_Data */ + $helper = $this->helper('Mage_Core_Helper_Data'); + return $helper->jsonEncode($options); + } + + /** + * Get quick save button + * + * @return Mage_Backend_Block_Widget_Button + */ + public function getQuickSaveButton() + { + /** @var $saveButton Mage_Backend_Block_Widget_Button */ + $saveButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button'); + $saveButton->setData(array( + 'label' => $this->__('Save'), + 'class' => 'save', + )); + return $saveButton; + } } diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Abstract.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Abstract.php index 1d550539e005abedb644e610fda695e2b28b0104..3d50b570c6ffeaba2ab142ff36f7673ac0891f3a 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Abstract.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Abstract.php @@ -29,10 +29,59 @@ * * @method Mage_Core_Model_Resource_Theme_Collection getCollection() * @method Mage_Backend_Block_Abstract setCollection(Mage_Core_Model_Resource_Theme_Collection $collection) + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract extends Mage_Backend_Block_Abstract { + /** + * Application model + * + * @var Mage_Core_Model_App + */ + protected $_app; + + /** + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Model_App $app + * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, + Mage_Core_Model_App $app, + array $data = array() + ) { + $this->_app = $app; + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data + ); + } + /** * Get tab title * @@ -79,7 +128,7 @@ abstract class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract * Get assign to storeview button * * @param Mage_DesignEditor_Block_Adminhtml_Theme $themeBlock - * @return string + * @return Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract */ protected function _addAssignButtonHtml($themeBlock) { @@ -88,13 +137,15 @@ abstract class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract $assignButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button'); $assignButton->setData(array( 'label' => $this->__('Assign to a Storeview'), - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'assign', - 'related' => 'body', - 'eventData' => array( - 'theme_id' => $themeId - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'assign', + 'target' => 'body', + 'eventData' => array( + 'theme_id' => $themeId + ) + ), ), ), 'class' => 'save action-theme-assign', @@ -109,7 +160,7 @@ abstract class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract * Get preview button * * @param Mage_DesignEditor_Block_Adminhtml_Theme $themeBlock - * @return string + * @return Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract */ protected function _addPreviewButtonHtml($themeBlock) { @@ -118,13 +169,15 @@ abstract class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract $previewButton->setData(array( 'label' => $this->__('Preview Theme'), 'class' => 'preview-default', - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'preview', - 'related' => 'body', - 'eventData' => array( - 'preview_url' => $this->_getPreviewUrl($themeBlock->getTheme()->getId()) - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'preview', + 'target' => 'body', + 'eventData' => array( + 'preview_url' => $this->_getPreviewUrl($themeBlock->getTheme()->getId()) + ) + ), ), ) )); @@ -137,27 +190,29 @@ abstract class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract * Get edit button * * @param Mage_DesignEditor_Block_Adminhtml_Theme $themeBlock - * @return string + * @return Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Abstract */ protected function _addEditButtonHtml($themeBlock) { - /** @var $previewButton Mage_Backend_Block_Widget_Button */ - $previewButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button'); - $previewButton->setData(array( + /** @var $editButton Mage_Backend_Block_Widget_Button */ + $editButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button'); + $editButton->setData(array( 'label' => $this->__('Edit Theme'), 'class' => 'add edit-theme', - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'preview', - 'related' => 'body', - 'eventData' => array( - 'preview_url' => $this->_getEditUrl($themeBlock->getTheme()->getId()) - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'preview', + 'target' => 'body', + 'eventData' => array( + 'preview_url' => $this->_getEditUrl($themeBlock->getTheme()->getId()) + ) + ), ), ) )); - $themeBlock->addButton($previewButton); + $themeBlock->addButton($editButton); return $this; } diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Available.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Available.php index 54ee5c12a8851376f69519285da106c69cff8154..aba1c01d1d68e9a9deb18b8c61d147a7ad4bfa13 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Available.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Available.php @@ -52,6 +52,8 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Available * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Model_App $app * @param Mage_Core_Model_Theme_Service $serviceModel * @param array $data * @@ -69,13 +71,15 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Available Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, + Mage_Core_Model_App $app, Mage_Core_Model_Theme_Service $serviceModel, array $data = array() ) { $this->_serviceModel = $serviceModel; parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $app, $data ); } @@ -124,13 +128,15 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Available $demoButton->setData(array( 'label' => $this->__('Theme Demo'), 'class' => 'preview-demo', - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'preview', - 'related' => 'body', - 'eventData' => array( - 'preview_url' => $this->_getPreviewUrl($themeBlock->getTheme()->getId()) - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'preview', + 'target' => 'body', + 'eventData' => array( + 'preview_url' => $this->_getPreviewUrl($themeBlock->getTheme()->getId()) + ) + ), ), ) )); diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Unassigned.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Unassigned.php index 696c04dde47f1e6ba8f8fa518b3dda7bc41b3cf1..da38b88520d5d953552b6a2e4f9519f6e3113da7 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Unassigned.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/List/Unassigned.php @@ -54,13 +54,18 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Unassigned $removeButton->setData(array( 'label' => $this->__('Remove Button'), - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'delete', - 'related' => 'body', - 'eventData' => array( - 'url' => $this->getUrl('*/system_design_theme/delete/', array('id' => $themeId, 'back' => true)) - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'delete', + 'target' => 'body', + 'eventData' => array( + 'url' => $this->getUrl( + '*/system_design_theme/delete/', + array('id' => $themeId, 'back' => true) + ) + ) + ), ), ), 'class' => 'save delete-theme', diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php index 9683dbb7977c789fadf41cdbec9222fb6a098ec3..a7de4a69673090633850cdbe5420cabc2f9429e8 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php @@ -55,6 +55,7 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_StoreView extends Mage_Ba * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_Resource_Website_Collection $websiteCollection * @param Mage_Core_Model_Theme_Service $serviceModel * @param array $data @@ -73,6 +74,7 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_StoreView extends Mage_Ba Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_Resource_Website_Collection $websiteCollection, Mage_Core_Model_Theme_Service $serviceModel, array $data = array() @@ -81,8 +83,7 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_StoreView extends Mage_Ba $this->_serviceModel = $serviceModel; parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data - ); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); } /** @@ -135,11 +136,13 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Selector_StoreView extends Mage_Ba $assignSaveButton->setData(array( 'label' => $this->__('Done'), 'class' => 'store-assign-done save', - 'data_attr' => array( - 'widget-button' => array( - 'event' => 'assign-save', - 'related' => 'body', - 'eventData' => array() + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'assign-save', + 'target' => 'body', + 'eventData' => array() + ), ), ) )); diff --git a/app/code/core/Mage/DesignEditor/Block/Template.php b/app/code/core/Mage/DesignEditor/Block/Template.php index 28d3d1737990d1d1f13b7f8b2cedbb770bcc23f5..5a6588dda467748d5463d1cf919f6e0a47d5fd9f 100644 --- a/app/code/core/Mage/DesignEditor/Block/Template.php +++ b/app/code/core/Mage/DesignEditor/Block/Template.php @@ -29,7 +29,6 @@ * * @method string getElementName() * @method string getElementId() - * @method string getElementHtml() * @method string getElementTitle() * @method bool getIsManipulationAllowed() * @method bool getIsContainer() @@ -52,10 +51,14 @@ class Mage_DesignEditor_Block_Template extends Mage_Core_Block_Template public function getRemoveButton($elementId) { /** @var $block Mage_DesignEditor_Block_Wrapper_Remove */ - $block = Mage::getModel('Mage_DesignEditor_Block_Wrapper_Remove', array('data' => array( - 'template' => 'wrapper/remove.phtml', - 'wrapped_element_id' => $elementId - ))); + $block = $this->getLayout()->createBlock('Mage_DesignEditor_Block_Wrapper_Remove', '', + array( + 'data' => array( + 'template' => 'wrapper/remove.phtml', + 'wrapped_element_id' => $elementId + ) + ) + ); return $block->toHtml(); } } diff --git a/app/code/core/Mage/DesignEditor/Controller/Varien/Router/Standard.php b/app/code/core/Mage/DesignEditor/Controller/Varien/Router/Standard.php index 2e50df56052e17d67fef5d4d0e8dfec4b17dd743..af2bacc37bb564e7b4bf02576c38e82e14fca609 100644 --- a/app/code/core/Mage/DesignEditor/Controller/Varien/Router/Standard.php +++ b/app/code/core/Mage/DesignEditor/Controller/Varien/Router/Standard.php @@ -59,7 +59,8 @@ class Mage_DesignEditor_Controller_Varien_Router_Standard extends Mage_Core_Cont /** * @param Mage_Core_Controller_Varien_Action_Factory $controllerFactory - * @param Magento_ObjectManager $objectManager + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Model_App $app * @param string $areaCode * @param string $baseController * @param Mage_Backend_Model_Auth_Session $backendSession @@ -69,7 +70,8 @@ class Mage_DesignEditor_Controller_Varien_Router_Standard extends Mage_Core_Cont */ public function __construct( Mage_Core_Controller_Varien_Action_Factory $controllerFactory, - Magento_ObjectManager $objectManager, + Magento_Filesystem $filesystem, + Mage_Core_Model_App $app, $areaCode, $baseController, Mage_Backend_Model_Auth_Session $backendSession, @@ -77,7 +79,7 @@ class Mage_DesignEditor_Controller_Varien_Router_Standard extends Mage_Core_Cont Mage_DesignEditor_Model_State $editorState, Mage_Core_Model_Config $configuration ) { - parent::__construct($controllerFactory, $objectManager, $areaCode, $baseController); + parent::__construct($controllerFactory, $filesystem, $app, $areaCode, $baseController); $this->_backendSession = $backendSession; $this->_helper = $helper; diff --git a/app/code/core/Mage/DesignEditor/Helper/Data.php b/app/code/core/Mage/DesignEditor/Helper/Data.php index c93212a57402e13a87078db2dd0262ed24558fba..75472cd587e0626ebeb8cc1d5c35526695cf4bde 100644 --- a/app/code/core/Mage/DesignEditor/Helper/Data.php +++ b/app/code/core/Mage/DesignEditor/Helper/Data.php @@ -33,10 +33,12 @@ class Mage_DesignEditor_Helper_Data extends Mage_Core_Helper_Abstract * XML paths to VDE settings */ const XML_PATH_FRONT_NAME = 'vde/design_editor/frontName'; + const XML_PATH_DEFAULT_HANDLE = 'vde/design_editor/defaultHandle'; const XML_PATH_DISABLED_CACHE_TYPES = 'vde/design_editor/disabledCacheTypes'; const XML_PATH_BLOCK_WHITE_LIST = 'vde/design_editor/block/white_list'; const XML_PATH_BLOCK_BLACK_LIST = 'vde/design_editor/block/black_list'; const XML_PATH_CONTAINER_WHITE_LIST = 'vde/design_editor/container/white_list'; + const XML_PATH_DAYS_TO_EXPIRE = 'vde/design_editor/layout_update/days_to_expire'; /**#@-*/ /** @@ -62,6 +64,16 @@ class Mage_DesignEditor_Helper_Data extends Mage_Core_Helper_Abstract return (string)$this->_configuration->getNode(self::XML_PATH_FRONT_NAME); } + /** + * Get VDE default handle name + * + * @return string + */ + public function getDefaultHandle() + { + return (string)$this->_configuration->getNode(self::XML_PATH_DEFAULT_HANDLE); + } + /** * Get disabled cache types in VDE mode * @@ -69,13 +81,8 @@ class Mage_DesignEditor_Helper_Data extends Mage_Core_Helper_Abstract */ public function getDisabledCacheTypes() { - $cacheTypes = explode(',', $this->_configuration->getNode(self::XML_PATH_DISABLED_CACHE_TYPES)); - $resultCacheTypes = array(); - foreach ($cacheTypes as $cacheType) { - $resultCacheTypes[] = trim($cacheType); - } - - return $resultCacheTypes; + $cacheTypes = $this->_configuration->getNode(self::XML_PATH_DISABLED_CACHE_TYPES)->asArray(); + return array_keys($cacheTypes); } /** @@ -127,4 +134,13 @@ class Mage_DesignEditor_Helper_Data extends Mage_Core_Helper_Abstract return $this->_getElementsList(self::XML_PATH_CONTAINER_WHITE_LIST); } + /** + * Get expiration days count + * + * @return string + */ + public function getDaysToExpire() + { + return (int)$this->_configuration->getNode(self::XML_PATH_DAYS_TO_EXPIRE); + } } diff --git a/app/code/core/Mage/DesignEditor/Model/Change/Factory.php b/app/code/core/Mage/DesignEditor/Model/Change/Factory.php index 954c786118f5ab1cb7ebe09a64be8fd40603dcf9..fc27523a41f3f70558d741e3743c8a95faaa75dc 100644 --- a/app/code/core/Mage/DesignEditor/Model/Change/Factory.php +++ b/app/code/core/Mage/DesignEditor/Model/Change/Factory.php @@ -29,6 +29,11 @@ */ class Mage_DesignEditor_Model_Change_Factory { + /** + * Default + */ + const DEFAULT_TYPE = 'layout'; + /** * Create instance of change by given type * @@ -51,11 +56,15 @@ class Mage_DesignEditor_Model_Change_Factory * Build change class using given type * * @static - * @param Varien_Object|array $change + * @param Varien_Object|Varien_Simplexml_Element|array $change * @return string */ public static function getClass($change) { + if ($change instanceof Varien_Simplexml_Element) { + $change = self::_getAttributes($change); + } + $type = self::_getChangeType($change); if ($type == Mage_DesignEditor_Model_Change_LayoutAbstract::CHANGE_TYPE) { $directive = self::_getChangeLayoutDirective($change); @@ -112,4 +121,20 @@ class Mage_DesignEditor_Model_Change_Factory return $directive; } + + /** + * Load layout update attributes + * + * @param Varien_Simplexml_Element $layoutUpdate + * @return array + */ + protected static function _getAttributes(Varien_Simplexml_Element $layoutUpdate) + { + $attributes = array( + 'type' => $layoutUpdate->getAttribute('type') ?: self::DEFAULT_TYPE, + 'action_name' => $layoutUpdate->getName() + ); + + return $attributes; + } } diff --git a/app/code/core/Mage/DesignEditor/Model/Change/Layout/Move.php b/app/code/core/Mage/DesignEditor/Model/Change/Layout/Move.php index 49b3e1127277400fe22bffad5817b3b65b4d4950..fdf1eda5e350ac4bc2372c83e2e806d25351bedb 100644 --- a/app/code/core/Mage/DesignEditor/Model/Change/Layout/Move.php +++ b/app/code/core/Mage/DesignEditor/Model/Change/Layout/Move.php @@ -34,6 +34,20 @@ class Mage_DesignEditor_Model_Change_Layout_Move extends Mage_DesignEditor_Model */ const LAYOUT_DIRECTIVE_MOVE = 'move'; + /** + * Class constructor + * + * @param Varien_Simplexml_Element|array $data + */ + public function __construct($data = array()) + { + if ($data instanceof Varien_Simplexml_Element) { + $data = $this->_getAttributes($data); + } + + parent::__construct($data); + } + /** * Get required data fields for move layout change * @@ -58,9 +72,9 @@ class Mage_DesignEditor_Model_Change_Layout_Move extends Mage_DesignEditor_Model public function getLayoutUpdateData() { return array( - 'element' => $this->getData('element_name'), - 'after' => $this->getData('destination_order'), - 'destination' => $this->getData('destination_container') + 'element' => $this->getData('element') ?: $this->getData('element_name'), + 'after' => $this->getData('after') ?: $this->getData('destination_order'), + 'destination' => $this->getData('destination') ?: $this->getData('destination_container') ); } @@ -73,4 +87,28 @@ class Mage_DesignEditor_Model_Change_Layout_Move extends Mage_DesignEditor_Model { return self::LAYOUT_DIRECTIVE_MOVE; } + + /** + * Get attributes from XML layout update + * + * @param Varien_Simplexml_Element $layoutUpdate + * @return array + */ + protected function _getAttributes(Varien_Simplexml_Element $layoutUpdate) + { + $attributes = array(); + if ($layoutUpdate->getAttribute('element') !== null) { + $attributes['element_name'] = $layoutUpdate->getAttribute('element'); + } + if ($layoutUpdate->getAttribute('after') !== null) { + $attributes['origin_order'] = $attributes['destination_order'] = $layoutUpdate->getAttribute('after'); + } + if ($layoutUpdate->getAttribute('destination') !== null) { + $attributes['origin_container'] = $attributes['destination_container'] + = $layoutUpdate->getAttribute('destination'); + } + $attributes = array_merge($attributes, parent::_getAttributes($layoutUpdate)); + + return $attributes; + } } diff --git a/app/code/core/Mage/DesignEditor/Model/Change/Layout/Remove.php b/app/code/core/Mage/DesignEditor/Model/Change/Layout/Remove.php index 2306488abbb8d3ae133e050875acd8bf582fa650..09464eebc0ea274145bf0cf772be95475ce2ee13 100644 --- a/app/code/core/Mage/DesignEditor/Model/Change/Layout/Remove.php +++ b/app/code/core/Mage/DesignEditor/Model/Change/Layout/Remove.php @@ -34,6 +34,20 @@ class Mage_DesignEditor_Model_Change_Layout_Remove extends Mage_DesignEditor_Mod */ const LAYOUT_DIRECTIVE_REMOVE = 'remove'; + /** + * Class constructor + * + * @param Varien_Simplexml_Element|array $data + */ + public function __construct($data = array()) + { + if ($data instanceof Varien_Simplexml_Element) { + $data = $this->_getAttributes($data); + } + + parent::__construct($data); + } + /** * Get data to render layout update directive * @@ -53,4 +67,21 @@ class Mage_DesignEditor_Model_Change_Layout_Remove extends Mage_DesignEditor_Mod { return self::LAYOUT_DIRECTIVE_REMOVE; } + + /** + * Get attributes from XML layout update + * + * @param Varien_Simplexml_Element $layoutUpdate + * @return array + */ + protected function _getAttributes(Varien_Simplexml_Element $layoutUpdate) + { + $attributes = array(); + if ($layoutUpdate->getAttribute('name') !== null) { + $attributes['element_name'] = $layoutUpdate->getAttribute('name'); + } + $attributes = array_merge($attributes, parent::_getAttributes($layoutUpdate)); + + return $attributes; + } } diff --git a/app/code/core/Mage/DesignEditor/Model/Change/LayoutAbstract.php b/app/code/core/Mage/DesignEditor/Model/Change/LayoutAbstract.php index 34db25cfca066fbd2c985f6eb06620a388f2bd85..5523a0e0098f328343fd5095aced38851089c2b3 100644 --- a/app/code/core/Mage/DesignEditor/Model/Change/LayoutAbstract.php +++ b/app/code/core/Mage/DesignEditor/Model/Change/LayoutAbstract.php @@ -70,7 +70,7 @@ abstract class Mage_DesignEditor_Model_Change_LayoutAbstract extends Mage_Design */ protected function _getRequiredFields() { - return array('type', 'handle', 'element_name', 'action_name'); + return array('type', 'element_name', 'action_name'); } /** @@ -79,4 +79,22 @@ abstract class Mage_DesignEditor_Model_Change_LayoutAbstract extends Mage_Design * @return string */ abstract public function getLayoutDirective(); + + /** + * Get attributes from XML layout update + * + * @param Varien_Simplexml_Element $layoutUpdate + * @return array + */ + protected function _getAttributes(Varien_Simplexml_Element $layoutUpdate) + { + $attributes = array(); + $attributes['type'] = $layoutUpdate->getAttribute('type') ?: 'layout'; + $attributes['action_name'] = $layoutUpdate->getName(); + foreach ($layoutUpdate->attributes() as $attributeName => $attributeValue) { + $attributes[$attributeName] = (string) $attributeValue; + } + + return $attributes; + } } diff --git a/app/code/core/Mage/DesignEditor/Model/History.php b/app/code/core/Mage/DesignEditor/Model/History.php index 270bcd51b4bc9803939e4a9328ef1a2f2960e077..b0c0c0241dcc6c923d8d387ba519c2b3abaf3264 100644 --- a/app/code/core/Mage/DesignEditor/Model/History.php +++ b/app/code/core/Mage/DesignEditor/Model/History.php @@ -29,6 +29,11 @@ */ class Mage_DesignEditor_Model_History { + /** + * Name of flag that shows where exists layout update + */ + const SYSTEM_LAYOUT_UPDATE_FLAG = 'system'; + /** * Base class for all change instances */ @@ -77,12 +82,30 @@ class Mage_DesignEditor_Model_History } /** - * Load changes from DB. To be able to effectively compact changes they should be all loaded first. + * Add xml layout updates directives * + * @param string $xmlLayoutUpdates * @return Mage_DesignEditor_Model_History */ - public function loadChanges() + public function addXmlChanges($xmlLayoutUpdates) { + /** @var $xml Varien_Simplexml_Element */ + $xml = simplexml_load_string( + '<?xml version="1.0" encoding="UTF-8"?><layout>' . $xmlLayoutUpdates . '</layout>', + 'Varien_Simplexml_Element' + ); + /** @var $node Varien_Simplexml_Element */ + foreach ($xml->children() as $node) { + $item = $this->_getChangeItem($node); + $itemId = $item->getData('element_name'); + if ($this->_collection->getItemById($itemId) !== null) { + $this->_collection->removeItemByKey($itemId); + } + $item->setId($itemId) + ->setData(self::SYSTEM_LAYOUT_UPDATE_FLAG, true); + $this->_collection->addItem($item); + } + return $this; } @@ -151,10 +174,11 @@ class Mage_DesignEditor_Model_History * Render all types of output * * @param Mage_DesignEditor_Model_History_RendererInterface $renderer + * @param string $handle * @return Mage_DesignEditor_Model_History_RendererInterface */ - public function output(Mage_DesignEditor_Model_History_RendererInterface $renderer) + public function output(Mage_DesignEditor_Model_History_RendererInterface $renderer, $handle = null) { - return $renderer->render($this->_collection); + return $renderer->render($this->_collection, $handle); } } diff --git a/app/code/core/Mage/DesignEditor/Model/History/Compact/Layout.php b/app/code/core/Mage/DesignEditor/Model/History/Compact/Layout.php index a899dadf64bca8031e872595f42fdf6c7e439411..6f5dd76816531095b4ecb5437103d1c12485a720 100644 --- a/app/code/core/Mage/DesignEditor/Model/History/Compact/Layout.php +++ b/app/code/core/Mage/DesignEditor/Model/History/Compact/Layout.php @@ -129,9 +129,10 @@ class Mage_DesignEditor_Model_History_Compact_Layout extends Mage_DesignEditor_M $lastMove = array_pop($moveItem); $lastMoveElement = $lastMove['change']; - $firstMove = $moveItem[0]['change']; - $originContainer = $firstMove->getData('origin_container'); - $originOrder = $firstMove->getData('origin_order'); + $firstMove = array_shift($moveItem); + $firstMoveElement = $firstMove['change']; + $originContainer = $firstMoveElement->getData('origin_container'); + $originOrder = $firstMoveElement->getData('origin_order'); $hasContainerChanged = $lastMoveElement->getData('destination_container') != $originContainer; if (!$hasContainerChanged) { $hasOrderChanged = $lastMoveElement->getData('destination_order') != $originOrder; @@ -140,6 +141,11 @@ class Mage_DesignEditor_Model_History_Compact_Layout extends Mage_DesignEditor_M } } + if (empty($arrayToRemove) + || $firstMoveElement->getData(Mage_DesignEditor_Model_History::SYSTEM_LAYOUT_UPDATE_FLAG) != true) { + array_unshift($moveItem, $firstMove); + } + $this->_removeElements(array_merge($arrayToRemove, $moveItem)); } return $this; diff --git a/app/code/core/Mage/DesignEditor/Model/History/Renderer/LayoutUpdate.php b/app/code/core/Mage/DesignEditor/Model/History/Renderer/LayoutUpdate.php index 54b7a8fdc0d98bf7118158335fe76200f6c5d82b..e88747139a1025a0a2289c8b89e19d74616add4c 100644 --- a/app/code/core/Mage/DesignEditor/Model/History/Renderer/LayoutUpdate.php +++ b/app/code/core/Mage/DesignEditor/Model/History/Renderer/LayoutUpdate.php @@ -29,25 +29,38 @@ */ class Mage_DesignEditor_Model_History_Renderer_LayoutUpdate implements Mage_DesignEditor_Model_History_RendererInterface { + /** + * Name of default handle + */ + const DEFAULT_HANDLE = 'current_handle'; + /** * Get Layout update out of collection of changes * * @param Mage_DesignEditor_Model_Change_Collection $collection + * @param string|null $handle * @return string */ - public function render(Mage_DesignEditor_Model_Change_Collection $collection) + public function render(Mage_DesignEditor_Model_Change_Collection $collection, $handle = null) { - $dom = new DOMDocument(); - $dom->formatOutput = true; - $dom->loadXML($this->_getInitialXml()); + $element = new Varien_Simplexml_Element($this->_getInitialXml()); foreach ($collection as $item) { if ($item instanceof Mage_DesignEditor_Model_Change_LayoutAbstract) { - $this->_render($dom, $item); + $this->_render($element, $item); } } - $layoutUpdate = $dom->saveXML(); + if ($handle && $collection->count() > 0) { + $layoutUpdate = ''; + $element = $element->$handle; + /** @var $node Varien_Simplexml_Element */ + foreach ($element->children() as $node) { + $layoutUpdate .= $node->asNiceXml(); + } + } else { + $layoutUpdate = $element->asNiceXml(); + } return $layoutUpdate; } @@ -65,19 +78,18 @@ class Mage_DesignEditor_Model_History_Renderer_LayoutUpdate implements Mage_Desi /** * Render layout update for single layout change * - * @param DOMDocument $dom + * @param SimpleXMLElement $element * @param Mage_DesignEditor_Model_Change_LayoutAbstract $item * @return DOMElement */ - protected function _render(DOMDocument $dom, $item) + protected function _render(SimpleXMLElement $element, $item) { - $handle = $this->_getHandleNode($dom, $item->getData('handle')); - - $directive = $dom->createElement($item->getLayoutDirective()); - $handle->appendChild($directive); + $handleName = $item->getData('handle') ?: self::DEFAULT_HANDLE; + $handle = $this->_getHandleNode($element, $handleName); + $directive = $handle->addChild($item->getLayoutDirective()); foreach ($item->getLayoutUpdateData() as $attribute => $value) { - $directive->setAttribute($attribute, $value); + $directive->addAttribute($attribute, $value); } return $handle; } @@ -85,16 +97,15 @@ class Mage_DesignEditor_Model_History_Renderer_LayoutUpdate implements Mage_Desi /** * Create or get existing handle node * - * @param DOMDocument $dom + * @param SimpleXMLElement $element * @param string $handle - * @return DOMElement + * @return SimpleXMLElement */ - protected function _getHandleNode($dom, $handle) + protected function _getHandleNode(SimpleXMLElement $element, $handle) { - $node = $dom->getElementsByTagName($handle)->item(0); + $node = $element->$handle; if (!$node) { - $node = $dom->createElement($handle); - $dom->documentElement->appendChild($node); + $node = $element->addChild($handle); } return $node; diff --git a/app/code/core/Mage/DesignEditor/Model/History/RendererInterface.php b/app/code/core/Mage/DesignEditor/Model/History/RendererInterface.php index 224005201a9e1e8fb0fb4a00b1e963c2e14cabfd..86d4c04ccace4072b39709be2ccf183d5a09cd51 100644 --- a/app/code/core/Mage/DesignEditor/Model/History/RendererInterface.php +++ b/app/code/core/Mage/DesignEditor/Model/History/RendererInterface.php @@ -34,7 +34,8 @@ interface Mage_DesignEditor_Model_History_RendererInterface * * @abstract * @param Mage_DesignEditor_Model_Change_Collection $collection + * @param null $handle * @return string */ - public function render(Mage_DesignEditor_Model_Change_Collection $collection); + public function render(Mage_DesignEditor_Model_Change_Collection $collection, $handle = null); } diff --git a/app/code/core/Mage/DesignEditor/Model/Layout/Update.php b/app/code/core/Mage/DesignEditor/Model/Layout/Update.php new file mode 100644 index 0000000000000000000000000000000000000000..4a7f5744d693c1d46d8d07bd92592836ee43c0ac --- /dev/null +++ b/app/code/core/Mage/DesignEditor/Model/Layout/Update.php @@ -0,0 +1,53 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_DesignEditor + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * VDE Layout Update model class + * + * @method string getIsVde() getIsVde() + * @method Mage_DesignEditor_Model_Layout_Update setIsVde() setIsVde(string $flag) + */ +class Mage_DesignEditor_Model_Layout_Update extends Mage_Core_Model_Layout_Update +{ + /** + * Layout Update model initialization + */ + protected function _construct() + { + $this->_init('Mage_DesignEditor_Model_Resource_Layout_Update'); + } + + /** + * Set true for flag is_vde + * + * @return Mage_DesignEditor_Model_Layout_Update + */ + protected function _beforeSave() + { + $this->setIsVde(true); + return parent::_beforeSave(); + } +} diff --git a/app/code/core/Mage/DesignEditor/Model/Observer.php b/app/code/core/Mage/DesignEditor/Model/Observer.php index 43c07842c359839c51e1d8aa1a495a85b5ec9104..37daf7487bcf34cf64e6bd32b5b841460b10a9aa 100644 --- a/app/code/core/Mage/DesignEditor/Model/Observer.php +++ b/app/code/core/Mage/DesignEditor/Model/Observer.php @@ -30,35 +30,54 @@ class Mage_DesignEditor_Model_Observer { /** - * @var Mage_Backend_Model_Session + * @var Magento_ObjectManager */ - protected $_backendSession; + protected $_objectManager; /** - * @var Mage_Core_Model_Design_Package + * @var Mage_DesignEditor_Helper_Data */ - protected $_design; + protected $_helper; /** - * @param Mage_Backend_Model_Session $backendSession - * @param Mage_Core_Model_Design_Package $design + * @param Magento_ObjectManager $objectManager + * @param Mage_DesignEditor_Helper_Data $helper */ public function __construct( - Mage_Backend_Model_Session $backendSession, - Mage_Core_Model_Design_Package $design + Magento_ObjectManager $objectManager, + Mage_DesignEditor_Helper_Data $helper ) { - $this->_backendSession = $backendSession; - $this->_design = $design; + $this->_objectManager = $objectManager; + $this->_helper = $helper; } /** - * Set specified design theme + * Clear temporary layout updates and layout links */ - public function setTheme() + public function clearLayoutUpdates() { - $themeId = $this->_backendSession->getData('theme_id'); - if ($themeId !== null) { - $this->_design->setDesignTheme($themeId); + $daysToExpire = $this->_helper->getDaysToExpire(); + + // remove expired links + /** @var $linkCollection Mage_Core_Model_Resource_Layout_Link_Collection */ + $linkCollection = $this->_objectManager->create('Mage_Core_Model_Resource_Layout_Link_Collection'); + $linkCollection->addTemporaryFilter(true) + ->addUpdatedDaysBeforeFilter($daysToExpire); + + /** @var $layoutLink Mage_Core_Model_Layout_Link */ + foreach ($linkCollection as $layoutLink) { + $layoutLink->delete(); + } + + // remove expired updates without links + /** @var $layoutCollection Mage_Core_Model_Resource_Layout_Update_Collection */ + $layoutCollection = $this->_objectManager->create('Mage_Core_Model_Resource_Layout_Update_Collection'); + $layoutCollection->addNoLinksFilter() + ->addUpdatedDaysBeforeFilter($daysToExpire); + + /** @var $layoutUpdate Mage_Core_Model_Layout_Update */ + foreach ($layoutCollection as $layoutUpdate) { + $layoutUpdate->delete(); } } } diff --git a/app/code/core/Mage/DesignEditor/Model/Resource/Layout/Update.php b/app/code/core/Mage/DesignEditor/Model/Resource/Layout/Update.php new file mode 100644 index 0000000000000000000000000000000000000000..8574bafce8c3f65ed99907828ebb30a79da39bf2 --- /dev/null +++ b/app/code/core/Mage/DesignEditor/Model/Resource/Layout/Update.php @@ -0,0 +1,61 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_DesignEditor + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * VDE area layout update resource model + */ +class Mage_DesignEditor_Model_Resource_Layout_Update extends Mage_Core_Model_Resource_Layout_Update +{ + /** + * Get select to fetch updates by handle + * + * @param bool $loadAllUpdates + * @return Varien_Db_Select + */ + protected function _getFetchUpdatesByHandleSelect($loadAllUpdates = false) + { + // always load all layout updates in vde mode + $loadAllUpdates = true; + return parent::_getFetchUpdatesByHandleSelect($loadAllUpdates); + } + + /** + * Make temporary updates for given theme and given stores permanent + * + * @param int $themeId + * @param array $storeIds + */ + public function makeTemporaryLayoutUpdatesPermanent($themeId, array $storeIds) + { + $this->_getWriteAdapter()->update($this->getTable('core_layout_link'), + array('is_temporary' => 0), + array( + 'theme_id = ?' => $themeId, + 'store_id IN(?)' => $storeIds, + ) + ); + } +} diff --git a/app/code/core/Mage/DesignEditor/Model/Resource/Layout/Update/Collection.php b/app/code/core/Mage/DesignEditor/Model/Resource/Layout/Update/Collection.php new file mode 100644 index 0000000000000000000000000000000000000000..26134af5310af91cee02fc1e20473306cfacaca2 --- /dev/null +++ b/app/code/core/Mage/DesignEditor/Model/Resource/Layout/Update/Collection.php @@ -0,0 +1,41 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_DesignEditor + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * VDE Layout update collection model + */ +class Mage_DesignEditor_Model_Resource_Layout_Update_Collection + extends Mage_Core_Model_Resource_Layout_Update_Collection +{ + /** + * Define resource model + */ + protected function _construct() + { + parent::_construct(); + $this->_init('Mage_DesignEditor_Model_Layout_Update', 'Mage_DesignEditor_Model_Resource_Layout_Update'); + } +} diff --git a/app/code/core/Mage/DesignEditor/Model/State.php b/app/code/core/Mage/DesignEditor/Model/State.php index b7caad860dda50a561b013ec2b061530b3f94f8b..1a5807cfc3d4d038d8b8efad400d2ec7616dc01c 100644 --- a/app/code/core/Mage/DesignEditor/Model/State.php +++ b/app/code/core/Mage/DesignEditor/Model/State.php @@ -32,7 +32,7 @@ class Mage_DesignEditor_Model_State /**#@+ * Name of layout classes that will be used as main layout */ - const LAYOUT_DESIGN_CLASS_NAME = 'Mage_DesignEditor_Model_Layout'; + const LAYOUT_DESIGN_CLASS_NAME = 'Mage_DesignEditor_Model_Layout'; const LAYOUT_NAVIGATION_CLASS_NAME = 'Mage_Core_Model_Layout'; /**#@-*/ @@ -43,6 +43,13 @@ class Mage_DesignEditor_Model_State const URL_MODEL_DESIGN_MODE_CLASS_NAME = 'Mage_DesignEditor_Model_Url_DesignMode'; /**#@-*/ + /**#@+ + * Layout update resource models + */ + const LAYOUT_UPDATE_RESOURCE_MODEL_CORE_CLASS_NAME = 'Mage_Core_Model_Resource_Layout_Update'; + const LAYOUT_UPDATE_RESOURCE_MODEL_VDE_CLASS_NAME = 'Mage_DesignEditor_Model_Resource_Layout_Update'; + /**#@-*/ + /**#@+ * Import behaviors */ @@ -50,6 +57,14 @@ class Mage_DesignEditor_Model_State const MODE_NAVIGATION = 'navigation'; /**#@-*/ + /**#@+ + * Session keys + */ + const CURRENT_HANDLE_SESSION_KEY = 'vde_current_handle'; + const CURRENT_URL_SESSION_KEY = 'vde_current_url'; + const CURRENT_MODE_SESSION_KEY = 'vde_current_mode'; + /**#@-*/ + /** * @var Mage_Backend_Model_Session */ @@ -77,27 +92,58 @@ class Mage_DesignEditor_Model_State */ protected $_dataHelper; + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * @var Mage_Core_Model_Design_Package + */ + protected $_designPackage; + + /** + * @var Mage_Core_Model_App + */ + protected $_application; + /** * @param Mage_Backend_Model_Session $backendSession * @param Mage_Core_Model_Layout_Factory $layoutFactory * @param Mage_DesignEditor_Model_Url_Factory $urlModelFactory * @param Mage_Core_Model_Cache $cacheManager * @param Mage_DesignEditor_Helper_Data $dataHelper + * @param Magento_ObjectManager $objectManager + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_App $application */ public function __construct( Mage_Backend_Model_Session $backendSession, Mage_Core_Model_Layout_Factory $layoutFactory, Mage_DesignEditor_Model_Url_Factory $urlModelFactory, Mage_Core_Model_Cache $cacheManager, - Mage_DesignEditor_Helper_Data $dataHelper + Mage_DesignEditor_Helper_Data $dataHelper, + Magento_ObjectManager $objectManager, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_App $application ) { $this->_backendSession = $backendSession; $this->_layoutFactory = $layoutFactory; $this->_urlModelFactory = $urlModelFactory; $this->_cacheManager = $cacheManager; $this->_dataHelper = $dataHelper; + $this->_objectManager = $objectManager; + $this->_designPackage = $designPackage; + $this->_application = $application; } + /** + * Update system data for current VDE environment + * + * @param string $areaCode + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Controller_Varien_ActionAbstract $controller + */ public function update( $areaCode, Mage_Core_Controller_Request_Http $request, @@ -108,19 +154,35 @@ class Mage_DesignEditor_Model_State $mode = self::MODE_NAVIGATION; if (!$request->isAjax()) { - $this->_backendSession->setData('vde_current_handle', $controller->getFullActionName()); - $this->_backendSession->setData('vde_current_url', $request->getPathInfo()); + $this->_backendSession->setData(self::CURRENT_HANDLE_SESSION_KEY, $controller->getFullActionName()); + $this->_backendSession->setData(self::CURRENT_URL_SESSION_KEY, $request->getPathInfo()); } } else { $mode = self::MODE_DESIGN; } - $this->_backendSession->setData('vde_current_mode', $mode); + $this->_backendSession->setData(self::CURRENT_MODE_SESSION_KEY, $mode); $this->_injectUrlModel($mode); $this->_injectLayout($mode, $areaCode); + $this->_injectLayoutUpdateResourceModel(); + $this->_setTheme(); $this->_disableCache(); } + /** + * Reset VDE state data + * + * @return Mage_DesignEditor_Model_State + */ + public function reset() + { + $this->_backendSession->unsetData(self::CURRENT_HANDLE_SESSION_KEY) + ->unsetData(self::CURRENT_URL_SESSION_KEY) + ->unsetData(self::CURRENT_MODE_SESSION_KEY); + + return $this; + } + /** * Create layout instance that will be used as main layout for whole system * @@ -156,14 +218,37 @@ class Mage_DesignEditor_Model_State } } + /** + * Replace layout update resource model with custom vde one + */ + protected function _injectLayoutUpdateResourceModel() + { + $this->_objectManager->addAlias(self::LAYOUT_UPDATE_RESOURCE_MODEL_CORE_CLASS_NAME, + self::LAYOUT_UPDATE_RESOURCE_MODEL_VDE_CLASS_NAME + ); + } + + /** + * Set current VDE theme + */ + protected function _setTheme() + { + $themeId = $this->_backendSession->getData('theme_id'); + if ($themeId !== null) { + $path = $this->_designPackage->getConfigPathByArea(Mage_Core_Model_App_Area::AREA_FRONTEND); + $this->_application->getStore()->setConfig($path, $themeId); + } + } + /** * Disable some cache types in VDE mode */ protected function _disableCache() { foreach ($this->_dataHelper->getDisabledCacheTypes() as $cacheCode) { - $this->_cacheManager->banUse($cacheCode); - $this->_cacheManager->cleanType($cacheCode); + if ($this->_cacheManager->canUse($cacheCode)) { + $this->_cacheManager->banUse($cacheCode); + } } } } diff --git a/app/code/core/Mage/DesignEditor/Model/Url/DesignMode.php b/app/code/core/Mage/DesignEditor/Model/Url/DesignMode.php index e992cdc3c5730a03067fe2bf56a6853e954176cf..792ce27c2496b559e38705d65bb528f4dc1d24ff 100644 --- a/app/code/core/Mage/DesignEditor/Model/Url/DesignMode.php +++ b/app/code/core/Mage/DesignEditor/Model/Url/DesignMode.php @@ -29,31 +29,6 @@ */ class Mage_DesignEditor_Model_Url_DesignMode extends Mage_Core_Model_Url { - /** - * Retrieve route path - * - * @param array $routeParams - * @return string - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getRoutePath($routeParams = array()) - { - return '#'; - } - - /** - * Retrieve route URL - * - * @param string $routePath - * @param array $routeParams - * @return string - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getRouteUrl($routePath = null, $routeParams = null) - { - return '#'; - } - /** * Build url by requested path and parameters * diff --git a/app/code/core/Mage/DesignEditor/Model/Url/NavigationMode.php b/app/code/core/Mage/DesignEditor/Model/Url/NavigationMode.php index 0fb28f955173a269178c6a820aa4a8e63c1c8c3a..c8186947746d89d5c4322013f9559e3f7013a54e 100644 --- a/app/code/core/Mage/DesignEditor/Model/Url/NavigationMode.php +++ b/app/code/core/Mage/DesignEditor/Model/Url/NavigationMode.php @@ -49,13 +49,20 @@ class Mage_DesignEditor_Model_Url_NavigationMode extends Mage_Core_Model_Url } /** - * Retrieve route path + * Retrieve route URL * + * @param string $routePath * @param array $routeParams * @return string */ - public function getRoutePath($routeParams = array()) + public function getRouteUrl($routePath = null, $routeParams = null) { - return $this->_helper->getFrontName() . '/' . parent::getRoutePath($routeParams); + $url = parent::getRouteUrl($routePath, $routeParams); + $baseUrl = trim($this->getBaseUrl(), '/'); + $vdeBaseUrl = $baseUrl . '/' . $this->_helper->getFrontName(); + if (strpos($url, $baseUrl) === 0 && strpos($url, $vdeBaseUrl) === false) { + $url = str_replace($baseUrl, $vdeBaseUrl, $url); + } + return $url; } } diff --git a/app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php b/app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php index 9fe148da4e4d46ab9514a5dfaff697c16749c49c..01c0dfb6cad606b04788626c9a66e93686b59d40 100644 --- a/app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php +++ b/app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php @@ -96,6 +96,9 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad */ public function loadThemeListAction() { + /** @var $coreHelper Mage_Core_Helper_Data */ + $coreHelper = $this->_objectManager->get('Mage_Core_Helper_Data'); + $page = $this->getRequest()->getParam('page', 1); $pageSize = $this->getRequest() ->getParam('page_size', Mage_Core_Model_Resource_Theme_Collection::DEFAULT_PAGE_SIZE); @@ -108,13 +111,13 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad /** @var $collection Mage_Core_Model_Resource_Theme_Collection */ $collection = $service->getThemes($page, $pageSize); $this->getLayout()->getBlock('available.theme.list')->setCollection($collection)->setNextPage(++$page); - $this->getResponse()->setBody($this->_objectManager->get('Mage_Core_Helper_Data')->jsonEncode( + $this->getResponse()->setBody($coreHelper->jsonEncode( array('content' => $this->getLayout()->getOutput()) )); } catch (Exception $e) { $this->_objectManager->get('Mage_Core_Model_Logger')->logException($e); - $this->getResponse()->setBody($this->_objectManager->get('Mage_Core_Helper_Data')->jsonEncode( - array('error' => $this->_helper->__('Theme list can not be loaded'))) + $this->getResponse()->setBody($coreHelper->jsonEncode( + array('error' => $this->_helper->__('Theme list can not be loaded'))) ); } } @@ -135,6 +138,15 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad throw new InvalidArgumentException($this->__('The theme was not found.')); } + if (!$theme->isVirtual()) { + $themeCustomization = $this->_getThemeCustomization($theme); + $this->_redirect('*/*/*/', array( + 'theme_id' => $themeCustomization->getId(), + 'mode' => $mode + )); + return; + } + $this->_getSession()->setData('theme_id', $theme->getId()); /** @var $eventDispatcher Mage_Core_Model_Event_Manager */ @@ -191,6 +203,22 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad } } + /** + * VDE quit action + */ + public function quitAction() + { + /** @var $state Mage_DesignEditor_Model_State */ + $state = $this->_objectManager->get('Mage_DesignEditor_Model_State'); + $state->reset(); + + /** @var $eventDispatcher Mage_Core_Model_Event_Manager */ + $eventDispatcher = $this->_objectManager->get('Mage_Core_Model_Event_Manager'); + $eventDispatcher->dispatch('design_editor_deactivate'); + + $this->_redirect('*/*/'); + } + /** * Get current handle * @@ -200,7 +228,7 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad { /** @var $vdeUrlModel Mage_DesignEditor_Model_Url_Handle */ $vdeUrlModel = $this->_objectManager->get('Mage_DesignEditor_Model_Url_Handle'); - $handle = $this->_getSession()->getData('vde_current_handle'); + $handle = $this->_getSession()->getData(Mage_DesignEditor_Model_State::CURRENT_HANDLE_SESSION_KEY); if (empty($handle)) { $handle = 'default'; } @@ -217,7 +245,7 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad { /** @var $vdeUrlModel Mage_DesignEditor_Model_Url_NavigationMode */ $vdeUrlModel = $this->_objectManager->get('Mage_DesignEditor_Model_Url_NavigationMode'); - $url = $this->_getSession()->getData('vde_current_url'); + $url = $this->_getSession()->getData(Mage_DesignEditor_Model_State::CURRENT_URL_SESSION_KEY); if (empty($url)) { $url = ''; } @@ -230,7 +258,7 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad */ public function assignThemeToStoreAction() { - $themeId = (int)$this->_getSession()->getData('theme_id'); + $themeId = (int)$this->getRequest()->getParam('theme_id', $this->_getSession()->getData('theme_id')); $stores = $this->getRequest()->getParam('stores'); /** @var $coreHelper Mage_Core_Helper_Data */ @@ -255,15 +283,67 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad throw new InvalidArgumentException('Param "stores" is not valid'); } + $this->_saveLayoutUpdate( + $this->getRequest()->getParam('layoutUpdate', array()), + $this->getRequest()->getParam('handle'), + $themeId + ); /** @var $themeService Mage_Core_Model_Theme_Service */ $themeService = $this->_objectManager->get('Mage_Core_Model_Theme_Service'); - $themeService->assignThemeToStores($themeId, $stores); + /** @var $themeCustomization Mage_Core_Model_Theme */ + $themeCustomization = $themeService->assignThemeToStores($themeId, $stores); + $message = $coreHelper->__('Theme successfully assigned'); + $response = array( + 'success' => $message, + 'themeId' => $themeCustomization->getId() + ); $this->getResponse()->setBody($coreHelper->jsonEncode(array('success' => $message))); } catch (Exception $e) { $this->_objectManager->get('Mage_Core_Model_Logger')->logException($e); $this->getResponse()->setBody($coreHelper->jsonEncode( - array('error' => $this->_helper->__('Theme is not assigned'))) + array('error' => $this->_helper->__('Theme is not assigned'))) + ); + $response = array( + 'error' => true, + 'message' => $this->_helper->__('Theme is not assigned') + ); + } + $this->getResponse()->setBody($coreHelper->jsonEncode($response)); + } + + /** + * Rename title action + */ + public function quickEditAction() + { + $themeId = (int)$this->getRequest()->getParam('theme_id'); + $themeTitle = (string)$this->getRequest()->getParam('theme_title'); + + /** @var $coreHelper Mage_Core_Helper_Data */ + $coreHelper = $this->_objectManager->get('Mage_Core_Helper_Data'); + + try { + /** @var $theme Mage_Core_Model_Theme */ + $theme = $this->_objectManager->get('Mage_Core_Model_Theme'); + if (!($themeId && $theme->load($themeId)->getId())) { + throw new Mage_Core_Exception($this->__('The theme was not found.')); + } + if (!$theme->isVirtual()) { + throw new Mage_Core_Exception($this->__('This theme is not editable.')); + } + $theme->setThemeTitle($themeTitle); + $theme->save(); + $this->getResponse()->setBody($coreHelper->jsonEncode(array('success' => true))); + } catch (Mage_Core_Exception $e) { + $this->getResponse()->setBody($coreHelper->jsonEncode(array( + 'error' => true, + 'message' => $e->getMessage() + ))); + } catch (Exception $e) { + $this->_objectManager->get('Mage_Core_Model_Logger')->logException($e); + $this->getResponse()->setBody($coreHelper->jsonEncode( + array('error' => true, 'message' => $this->__('Theme is not saved'))) ); } } @@ -281,19 +361,89 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad /** * Compact history * - * @param array $historyData - * @return Mage_DesignEditor_Model_History + * @param array $layoutUpdate + * @param string|null $xml + * @return string */ - protected function _compactHistory($historyData) + protected function _compactHistory($layoutUpdate, $xml = null) { /** @var $historyModel Mage_DesignEditor_Model_History */ - $historyModel = Mage::getModel('Mage_DesignEditor_Model_History'); + $historyModel = $this->_objectManager->create('Mage_DesignEditor_Model_History'); /** @var $historyCompactModel Mage_DesignEditor_Model_History_Compact */ - $historyCompactModel = Mage::getModel('Mage_DesignEditor_Model_History_Compact'); + $historyCompactModel = $this->_objectManager->create('Mage_DesignEditor_Model_History_Compact'); + /** @var $layoutRenderer Mage_DesignEditor_Model_History_Renderer_LayoutUpdate */ + $layoutRenderer = $this->_objectManager->create('Mage_DesignEditor_Model_History_Renderer_LayoutUpdate'); /** @var $collection Mage_DesignEditor_Model_Change_Collection */ - $collection = $historyModel->setChanges($historyData)->getChanges(); + $collection = $historyModel->addXmlChanges($xml) + ->addChanges($layoutUpdate) + ->getChanges(); $historyCompactModel->compact($collection); - return $historyModel; + $layoutUpdate = $historyModel->output($layoutRenderer, + Mage_DesignEditor_Model_History_Renderer_LayoutUpdate::DEFAULT_HANDLE + ); + + return $layoutUpdate; + } + + /** + * Save layout update + * + * @param array $layoutUpdate + * @param string $handle + * @param int $themeId + * @param bool $isTemporary + */ + protected function _saveLayoutUpdate($layoutUpdate, $handle, $themeId, $isTemporary = false) + { + /** @var $layoutCollection Mage_DesignEditor_Model_Resource_Layout_Update_Collection */ + $layoutCollection = $this->_objectManager + ->create('Mage_DesignEditor_Model_Resource_Layout_Update_Collection'); + $layoutCollection->addStoreFilter(Mage_Core_Model_App::ADMIN_STORE_ID) + ->addThemeFilter($themeId) + ->addFieldToFilter('handle', $handle) + ->addFieldToFilter('is_vde', true) + ->setOrder('sort_order', Varien_Data_Collection_Db::SORT_ORDER_ASC); + + $xml = ''; + if (!$isTemporary) { + /** @var $item Mage_DesignEditor_Model_Layout_Update */ + foreach ($layoutCollection as $item) { + $xml .= $item->getXml(); + } + } + + if ($xml || $layoutUpdate) { + $layoutUpdateData = array( + 'store_id' => Mage_Core_Model_App::ADMIN_STORE_ID, + 'theme_id' => $themeId, + 'handle' => $handle, + 'xml' => $this->_compactHistory($layoutUpdate, $xml), + 'is_temporary' => $isTemporary + ); + + if ($isTemporary) { + /** @var $layoutUpdateModel Mage_DesignEditor_Model_Layout_Update */ + $layoutUpdateModel = $layoutCollection->getLastItem(); + $sortOrder = 0; + if ($layoutUpdateModel->getId()) { + $sortOrder = $layoutUpdateModel->getSortOrder() + 1; + } + $layoutUpdateData['sort_order'] = $sortOrder; + $layoutUpdateModel->setData($layoutUpdateData); + } else { + /** @var $layoutUpdateModel Mage_DesignEditor_Model_Layout_Update */ + $layoutUpdateModel = $layoutCollection->getFirstItem(); + $layoutUpdateModel->addData($layoutUpdateData); + + /** @var @item Mage_DesignEditor_Model_Layout_Update */ + foreach ($layoutCollection as $item) { + if ($item->getId() != $layoutUpdateModel->getId()) { + $item->delete(); + } + } + } + $layoutUpdateModel->save(); + } } /** @@ -310,10 +460,7 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad } try { - $historyModel = $this->_compactHistory($historyData); - /** @var $layoutRenderer Mage_DesignEditor_Model_History_Renderer_LayoutUpdate */ - $layoutRenderer = Mage::getModel('Mage_DesignEditor_Model_History_Renderer_LayoutUpdate'); - $layoutUpdate = $historyModel->output($layoutRenderer); + $layoutUpdate = $this->_compactHistory($historyData); $this->getResponse()->setBody(Mage::helper('Mage_Core_Helper_Data')->jsonEncode(array( Mage_Core_Model_Message::SUCCESS => array($layoutUpdate) ))); @@ -323,4 +470,51 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad )); } } + + /** + * Save temporary layout update + * @throws InvalidArgumentException + */ + public function saveTemporaryLayoutUpdateAction() + { + $themeId = (int)$this->_getSession()->getData('theme_id'); + /** @var $coreHelper Mage_Core_Helper_Data */ + $coreHelper = $this->_objectManager->get('Mage_Core_Helper_Data'); + + try { + if (!is_numeric($themeId)) { + throw new InvalidArgumentException('Theme id is not valid'); + } + + if ($this->getRequest()->has('layoutUpdate')) { + $this->_saveLayoutUpdate( + $this->getRequest()->getParam('layoutUpdate'), + $this->getRequest()->getParam('handle'), + $themeId, + true + ); + } + $this->getResponse()->setBody($coreHelper->jsonEncode( + array('success' => $this->__('Temporary layout update saved')) + )); + } catch (Exception $e) { + $this->_objectManager->get('Mage_Core_Model_Logger')->logException($e); + $this->getResponse()->setBody($coreHelper->jsonEncode( + array('error' => $this->__('Temporary layout update not saved')) + )); + } + } + + /** + * Get theme customization + * + * @param Mage_Core_Model_Theme $theme + * @return Mage_Core_Model_Theme + */ + protected function _getThemeCustomization($theme) + { + /** @var $service Mage_Core_Model_Theme_Service */ + $service = $this->_objectManager->get('Mage_Core_Model_Theme_Service'); + return $service->createThemeCustomization($theme); + } } diff --git a/app/code/core/Mage/DesignEditor/controllers/PageController.php b/app/code/core/Mage/DesignEditor/controllers/PageController.php index 0ec26ef071eb20df63c5b3dcdf0aa050f4fca6c1..883ccae48b5cdf6f415e0178b677bd8787119548 100644 --- a/app/code/core/Mage/DesignEditor/controllers/PageController.php +++ b/app/code/core/Mage/DesignEditor/controllers/PageController.php @@ -61,13 +61,6 @@ class Mage_DesignEditor_PageController extends Mage_Core_Controller_Front_Action public function typeAction() { try { - $handle = $this->getRequest()->getParam('handle'); - - // check page type format - if (!$handle || !preg_match('/^[a-z][a-z\d]*(_[a-z][a-z\d]*)*$/i', $handle)) { - throw new InvalidArgumentException($this->__('Invalid page handle specified.')); - } - /** @var $layout Mage_DesignEditor_Model_Layout */ $layout = $this->getLayout(); $layoutClassName = Mage_DesignEditor_Model_State::LAYOUT_DESIGN_CLASS_NAME; @@ -75,11 +68,19 @@ class Mage_DesignEditor_PageController extends Mage_Core_Controller_Front_Action throw new InvalidArgumentException($this->__('Incorrect Design Editor layout.')); } - // whether such page type exists - if (!$this->getLayout()->getUpdate()->pageHandleExists($handle)) { - throw new InvalidArgumentException( - $this->__('Specified page type or page fragment type doesn\'t exist: "%s".', $handle) - ); + $handle = $this->getRequest()->getParam('handle'); + + if (!$handle || !preg_match('/^[a-z][_a-z\d]*$/i', $handle) + || !$this->getLayout()->getUpdate()->pageHandleExists($handle) + ) { + /** @var $helper Mage_DesignEditor_Helper_Data */ + $helper = $this->_objectManager->get('Mage_DesignEditor_Helper_Data'); + $handle = $helper->getDefaultHandle(); + + /** @var $backendSession Mage_Backend_Model_Session */ + $backendSession = $this->_objectManager->get('Mage_Backend_Model_Session'); + $backendSession->unsetData('vde_current_handle'); + $backendSession->unsetData('vde_current_url'); } // required layout handle diff --git a/app/code/core/Mage/DesignEditor/etc/config.xml b/app/code/core/Mage/DesignEditor/etc/config.xml index 208b6ab8a34b0361df2b41ddbe8307497b27753d..43497d7ffef16f5b6e31acc8faf6524a3713a398 100644 --- a/app/code/core/Mage/DesignEditor/etc/config.xml +++ b/app/code/core/Mage/DesignEditor/etc/config.xml @@ -28,7 +28,7 @@ <config> <modules> <Mage_DesignEditor> - <version>1.0.0.0</version> + <version>1.0.0.1</version> <active>true</active> <codePool>core</codePool> <depends> @@ -37,6 +37,16 @@ </depends> </Mage_DesignEditor> </modules> + <global> + <resources> + <designeditor_setup> + <setup> + <module>Mage_DesignEditor</module> + <class>Mage_Core_Model_Resource_Setup</class> + </setup> + </designeditor_setup> + </resources> + </global> <default> <web> <routers> @@ -78,7 +88,15 @@ <vde> <design_editor> <frontName>vde</frontName> - <disabledCacheTypes>BLOCK_HTML,LAYOUT_GENERAL_CACHE_TAG,FPC</disabledCacheTypes> + <defaultHandle>default</defaultHandle> + <disabledCacheTypes> + <block_html /> + <layout /> + <config /> + </disabledCacheTypes> + <layout_update> + <days_to_expire>5</days_to_expire> + </layout_update> <block> <white_list> <mage_core_block_template>Mage_Core_Block_Template</mage_core_block_template> @@ -100,6 +118,7 @@ </white_list> <black_list> <mage_page_block_html_pager>Mage_Page_Block_Html_Pager</mage_page_block_html_pager> + <mage_page_block_switch>Mage_Page_Block_Switch</mage_page_block_switch> </black_list> </block> <container> @@ -115,16 +134,6 @@ </white_list> </container> </design_editor> - <events> - <controller_action_predispatch> - <observers> - <design_editor_theme> - <class>Mage_DesignEditor_Model_Observer</class> - <method>setTheme</method> - </design_editor_theme> - </observers> - </controller_action_predispatch> - </events> </vde> <admin> <routers> @@ -137,4 +146,16 @@ </adminhtml> </routers> </admin> + <crontab> + <jobs> + <design_editor_clear_layout_updates> + <schedule> + <cron_expr>0 0 * * *</cron_expr> + </schedule> + <run> + <model>Mage_DesignEditor_Model_Observer::clearLayoutUpdates</model> + </run> + </design_editor_clear_layout_updates> + </jobs> + </crontab> </config> diff --git a/app/code/core/Mage/DesignEditor/sql/designeditor_setup/install-1.0.0.1.php b/app/code/core/Mage/DesignEditor/sql/designeditor_setup/install-1.0.0.1.php new file mode 100644 index 0000000000000000000000000000000000000000..b3bd0c666f0ce9a40b62288f79b7bbbd8ffbd0a1 --- /dev/null +++ b/app/code/core/Mage/DesignEditor/sql/designeditor_setup/install-1.0.0.1.php @@ -0,0 +1,46 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_DesignEditor + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/* @var $installer Mage_Core_Model_Resource_Setup */ +$installer = $this; + +$installer->startSetup(); +$connection = $installer->getConnection(); +/** + * Modifying 'core_layout_update' table. Adding 'is_vde' column + */ +$tableCoreLayoutLink = $installer->getTable('core_layout_update'); + +$connection->addColumn($tableCoreLayoutLink, 'is_vde', + array( + 'type' => Varien_Db_Ddl_Table::TYPE_BOOLEAN, + 'nullable' => false, + 'default' => '0', + 'comment' => 'Defines whether layout update created via design editor' + ) +); + +$installer->endSetup(); diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/css/styles.css b/app/code/core/Mage/DesignEditor/view/adminhtml/css/styles.css index 0a3f533512f940a794724763733c40a7cd471e59..cc28641a64e45987cbe26c6f88f6676344336d7d 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/css/styles.css +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/css/styles.css @@ -49,6 +49,35 @@ .theme-title { color: white; font-size: 20px; + line-height: 24px; +} +.theme-title input { + font-size: 20px; + line-height: 24px; +} +.theme-control-title { + position: relative; + margin: 0; + min-height: 40px; +} +.theme-title.text-field { + padding: 5px 0 5px 10px; +} +.theme-title.input-field { + position: absolute; + top: 0; + left: 0; + display: none; +} +.theme-title.input-field input { + padding: 5px 0 5px 10px; + width: 250px; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} +.theme-title.input-field .control { + float: left; } .theme-back:hover { @@ -189,79 +218,6 @@ span.back-to-selected-theme { border-color: red; color: red; } - -.vde_element_wrapper { - margin-bottom: 3px; - padding: 0px 2px 2px 2px; - border: 2px solid #69a8cf; - border-radius: 4px; -} -.vde_element_title { - font-family:Arial, Helvetica, sans-serif; - margin: -2px 0 0 -4px; - padding: 0; - border-width: 2px 5px 6px 7px; - border-image: url(../images/block.png) 2 5 6 7 stretch stretch; - border-image-outset: fill; - -webkit-border-image: url(../images/block.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/block.png) 2 5 6 7 stretch stretch; - color: black; - font-size: 8pt; - font-weight: bold; - max-width: 150px; - height: 18px; - overflow: hidden; - text-align: left; - line-height: 17px; - cursor: default; -} -.vde_element_remove { - margin: -26px -6px 0px -4px; - padding: 0px; - border-width: 2px 5px 6px 7px; - border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - border-image-outset: fill; - -webkit-border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - max-width: 20px; - height: 18px; - overflow: hidden; - text-align: right; - line-height: 17px; - cursor: default; - float: right; -} -.vde_element_wrapper.vde_container { - border: 2px solid #7bc361; -} -.vde_container > .vde_element_title { - border-image: url(../images/container.png) 2 5 6 7 stretch stretch; - -webkit-border-image: url(../images/container.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/container.png) 2 5 6 7 stretch stretch; -} -.vde_element_wrapper.vde_stub { - border: 2px solid #92978d; -} -.vde_stub > .vde_element_title { - border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - -webkit-border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; -} -.vde_container.vde_container_hover { - border-color: #006400; -} -.vde_container.vde_container_hover > .vde_element_title { - border-image: url(../images/container_hover.png) 2 5 6 7 stretch stretch; - -webkit-border-image: url(../images/container_hover.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/container_hover.png) 2 5 6 7 stretch stretch; -} -.vde_placeholder { - background-color: #F5F5DC; -} -.vde_wrapper_hidden, .vde_wrapper_hidden .vde_element_title { - display: none; -} - .vde_toolbar_cell_title { font-weight: bold; cursor: pointer; @@ -320,23 +276,16 @@ span.back-to-selected-theme { text-decoration: none; color: #2483c7; } - .vde_breadcrumbs a:hover { text-decoration: underline; } - .vde_breadcrumbs .vde_breadcrumbs_separator { margin:0 0.3em; } - #visual_design_editor_theme a { display:block; text-decoration:none; } -.ui-sortable-helper { - opacity: 0.9; -} - #vde_handles_hierarchy .vde_toolbar_cell_content { padding: 1em .5em 1em 0; } @@ -367,26 +316,6 @@ span.back-to-selected-theme { #vde_handles_tree .vde_option_fragment a { color: #eea243; } - -.vde_history_toolbar { - position: fixed; - left:0; top:150px; - width:220px; - background: #f0efe9; - border-bottom: 1pt solid #dddcd8; - box-shadow: 0 0 4pt 1pt #cbcbcb; - padding: 0 3pt; - line-height: 13pt; -} -.vde_history_toolbar ul {} -.vde_history_toolbar ul li { - white-space: nowrap; - overflow: hidden; -} - -.vde_element_remove { - display: none; -} .vde_container_frame { border: none; margin-top: 0px; diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/editor/container.phtml b/app/code/core/Mage/DesignEditor/view/adminhtml/editor/container.phtml index 9676de5c2a8ac70248a3d5c2fe952815bc166f22..287d07b95146e54dfef04646ea109f8246d9cf95 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/editor/container.phtml +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/editor/container.phtml @@ -29,10 +29,3 @@ <?php echo $this->getChildHtml('design_editor_toolbar'); ?> <?php echo $this->getChildHtml('theme.selector.storeview'); ?> <iframe name="vde_container_frame" id="vde_container_frame" class="vde_container_frame" src="<?php echo $this->getFrameUrl(); ?>"></iframe> -<script type="text/javascript"> -(function ($) { - $( document ).ready(function( ){ - $('iframe.vde_container_frame').iframeAutoHeight({minHeight: 240}); - }); -})(jQuery); -</script> diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/editor/toolbar/buttons.phtml b/app/code/core/Mage/DesignEditor/view/adminhtml/editor/toolbar/buttons.phtml index 026854a652902d10eeb80f2807308806a6160626..71f5bd883de1fd978636f4b3bca32c1de11036f1 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/editor/toolbar/buttons.phtml +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/editor/toolbar/buttons.phtml @@ -25,25 +25,16 @@ */ ?> <?php /** @var $this Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_Buttons */ ?> -<?php if ($this->isNavigationMode()) : - $modeName = $this->__('Design Mode'); - $modeUrl = $this->getDesignModeUrl(); -else: - $modeName = $this->__('Navigation Mode'); - $modeUrl = $this->getNavigationModeUrl(); -endif; ?> <div id="vde_toolbar_buttons" <?php echo $this->getUiId()?>> + <?php echo $this->getSwitchModeButtonHtml(); ?> <?php echo $this->getAssignButtonHtml(); ?> - <a href="<?php echo $modeUrl; ?>" title="<?php echo $modeName; ?>" class="vde_button switch-mode"> - <?php echo $modeName; ?> - </a> <?php if ($this->isDesignMode()) : ?> <a href="<?php echo $this->getViewLayoutUrl(); ?>" title="<?php echo $this->__('View Layout'); ?>" class="vde_button view-layout"> <?php echo $this->__('View Layout'); ?> </a> <?php endif; ?> - <a href="<?php echo $this->getBackUrl(); ?>" title="<?php echo $this->__('Back'); ?>" class="vde_button"> - <?php echo $this->__('Back'); ?> + <a href="<?php echo $this->getQuitUrl(); ?>" title="<?php echo $this->__('Quit'); ?>" class="vde_button"> + <?php echo $this->__('Quit'); ?> </a> </div> diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/js/design_editor.js b/app/code/core/Mage/DesignEditor/view/adminhtml/js/design_editor.js index bde2616d0606458e6209e7bb067197f8f3cf5bb9..d05c77cae94bb1b74e0971baa714b3c7fce869d0 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/js/design_editor.js +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/js/design_editor.js @@ -35,17 +35,37 @@ */ $.widget('vde.vde_panel', { options: { + switchModeEvent: 'switchMode', + loadEvent: 'loaded', cellSelector: '.vde_toolbar_cell', handlesHierarchySelector: '#vde_handles_hierarchy', treeSelector: '#vde_handles_tree', viewLayoutButtonSelector: '.view-layout', + navigationModeButtonSelector: '.switch-to-navigation', viewLayoutUrl: null, + navigationModeUrl: null, editorFrameSelector: null }, + _create: function() { this._initCells(); this._initViewLayoutButton(); + this._bind(); + }, + + /** + * Bind handlers + * @protected + */ + _bind: function() { + var $body = $('body'); + $body.on(this.options.switchModeEvent, $.proxy(this._onSwitchMode, this)); + + $body.on(this.options.loadEvent, function() { + $body.trigger('contentUpdated'); + }); }, + _initCells : function() { var self = this; this.element.find( this.options.cellSelector ).each( function(){ @@ -55,6 +75,7 @@ }); this.element.find( this.options.cellSelector ).vde_menu(); }, + _initViewLayoutButton: function() { var button = $(this.options.viewLayoutButtonSelector); this.options.viewLayoutUrl = button.attr('href'); @@ -62,6 +83,19 @@ 'click', $.proxy(this._onViewLayoutButtonClick, this) ); }, + + /** + * Switch mode event handler + * @protected + */ + _onSwitchMode: function(event, data) { + if ('save_changes_url' in data) { + this.saveTemporaryLayoutChanges(data.theme_id, data.save_changes_url, data.mode_url) + } else { + document.location = data.mode_url; + } + }, + _onViewLayoutButtonClick: function(e) { try { var historyObject = $(this.options.editorFrameSelector).get(0).contentWindow.vdeHistoryObject; @@ -78,8 +112,29 @@ } finally { return false; } + }, + saveTemporaryLayoutChanges: function(themeId, saveChangesUrl, modeUrl) { + try { + var historyObject = $(this.options.editorFrameSelector).get(0).contentWindow.vdeHistoryObject; + if (historyObject.getItems().length != 0) { + var frameUrl = $(this.options.editorFrameSelector).attr('src'); + var data = { + theme_id: themeId, + layoutUpdate: this._preparePostItems(historyObject.getItems()), + handle: frameUrl.split('/handle/')[1].replace(/\//g, '') + }; + $.post(saveChangesUrl, data, function() { + document.location = modeUrl; + }); + } else { + document.location = modeUrl; + } + } catch (e) { + alert(e.message); + } }, + _preparePostItems: function(items) { var postData = {}; $.each(items, function(index, item){ @@ -139,9 +194,22 @@ self.editorFrame = $(this).contents(); self._initPanel(); }); + this._bind(); + this._initFrame(); }, _initPanel: function () { $(this.options.panelSelector).vde_panel({editorFrameSelector: this.options.frameSelector}) + }, + _bind: function() { + $(window).on('resize', $.proxy(this._resizeFrame, this)); + }, + _resizeFrame: function() { + var height = $(window).innerHeight(); + var offset = $(this.options.frameSelector).offset(); + $(this.options.frameSelector).height(height - parseInt(offset.top) - 5); + }, + _initFrame: function() { + this._resizeFrame(); } }); @@ -158,6 +226,7 @@ } }, _bind: function () { + pageBasePrototype._bind.apply(this, arguments); var self = this; this.element .on('checked.vde_checkbox', function () { diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/js/theme-selector.js b/app/code/core/Mage/DesignEditor/view/adminhtml/js/theme-selector.js index 4ec06127ce2352a1ea461ec85d2a34f7d26d2ef6..7cc136e50cd92933aa9bbd97b38114e89d2dea00 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/js/theme-selector.js +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/js/theme-selector.js @@ -24,11 +24,12 @@ */ /*jshint jquery:true*/ (function($) { - $.widget("vde.themeSelector", { + $.widget('vde.themeSelector', { options: { assignEvent: 'assign', assignSaveEvent: 'assign-save', previewEvent: 'preview', + editEvent: 'edit', deleteEvent: 'delete', loadEvent: 'loaded', storeView: { @@ -37,7 +38,8 @@ assignSaveUrl: null, afterAssignSaveUrl: null, storesByThemes: {}, - isMultipleStoreViewMode: null + isMultipleStoreViewMode: null, + frameSelector: 'iframe#vde_container_frame' }, /** @@ -64,19 +66,19 @@ this.element.on(this.options.assignEvent, $.proxy(this._onAssign, this)); this.element.on(this.options.assignSaveEvent, $.proxy(this._onAssignSave, this)); this.element.on(this.options.previewEvent, $.proxy(this._onPreview, this)); + this.element.on(this.options.editEvent, $.proxy(this._onEdit, this)); this.element.on(this.options.deleteEvent, $.proxy(this._onDelete, this)); this.element.on('keyup', $.proxy(function(e) { //ESC button - if (e.keyCode == 27) { + if (e.keyCode === 27) { var popUp = $(this.options.storeView.windowSelector); popUp.hide(); this.themeId = null; } }, this)); - - $('body').on(this.options.loadEvent, function() { - $('*[data-widget-button]').button(); - }); + this.element.on(this.options.loadEvent, $.proxy(function() { + this.element.trigger('contentUpdated'); + }, this)); }, /** @@ -87,12 +89,20 @@ document.location = data.preview_url; }, + /** + * Edit action + * @protected + */ + _onEdit: function(event, data) { + document.location = data.edit_url; + }, + /** * Delete action * @protected */ _onDelete: function(event, data) { - deleteConfirm($.mage.__('Are you sure you want to do this?'), data['url']); + deleteConfirm($.mage.__('Are you sure you want to do this?'), data.url); }, /** @@ -114,12 +124,12 @@ * "Assign Save" button click handler * @protected */ - _onAssignSave: function(event, data) { + _onAssignSave: function() { var stores = []; var checkedValue = 1; $(this.options.storeView.windowSelector).find('form').serializeArray().each(function(object, index) { - if (object.value == checkedValue) { - stores.push(object.name.match('storeviews\\[(\\d)\\]')[1] * 1); + if (parseInt(object.value, 10) === checkedValue) { + stores.push(parseInt(object.name.match('storeviews\\[(\\d+)\\]')[1], 10)); } }); @@ -141,12 +151,8 @@ */ _isStoreChanged: function(themeId, storesToAssign) { var assignedStores = this.options.storesByThemes[themeId] || [] ; - var isChanged = !( - storesToAssign.length == assignedStores.length - && $(storesToAssign).not(assignedStores).length == 0 - ); - - return isChanged; + return !(storesToAssign.length === assignedStores.length && + $(storesToAssign).not(assignedStores).length === 0); }, /** @@ -166,12 +172,11 @@ var storesByThemes = this.options.storesByThemes; popUp.find('input[type=checkbox]').each(function(index, element) { element = $(element); - var storeViewId = element.attr('id').replace('storeview_', '') * 1; - var checked = true; - if (!storesByThemes[themeId] || storesByThemes[themeId].indexOf(storeViewId) == -1) { - checked = false; - } - element.attr('checked', checked); + + var storeViewId = parseInt(element.attr('id').replace('storeview_', ''), 10); + element.attr('checked', + !(!storesByThemes[themeId] || storesByThemes[themeId].indexOf(storeViewId) === -1)); + }); this.themeId = themeId; popUp.show(); @@ -195,28 +200,187 @@ var EMPTY_STORES = '-2'; if (data.stores === null) { data.stores = DEFAULT_STORE; - } else if (data.stores.length == 0) { + } else if (data.stores.length === 0) { data.stores = EMPTY_STORES; } - $.post(this.options.assignSaveUrl, data, $.proxy(function(response) { - if (response.error) { - alert($.mage.__('Error') + ': "' + response.error + '".'); - } else { - var defaultStore = 0; - var url = [ - this.options.afterAssignSaveUrl + 'store_id', - stores ? stores[0] : defaultStore, - 'theme_id', - themeId - ].join('/'); - this.options.storesByThemes[themeId] = stores; - - setTimeout(function() {$('body').loader('show');}, 500); - document.location = url; + + if ($(this.options.frameSelector).get(0)) { + var historyObject = $(this.options.frameSelector).get(0).contentWindow.vdeHistoryObject; + if (historyObject && historyObject.getItems().length != 0) { + data.layoutUpdate = this._preparePostItems(historyObject.getItems()); + } + var frameUrl = $(this.options.frameSelector).attr('src'); + var urlParts = frameUrl.split('handle'); + if (urlParts.length > 1) { + data.handle = frameUrl.split('handle')[1].replace(/\//g, ''); + } + } + + $('#messages').html(''); + $.ajax({ + type: 'POST', + url: this.options.assignSaveUrl, + data: data, + dataType: 'json', + success: $.proxy(function(response) { + if (response.error) { + alert($.mage.__('Error') + ': "' + response.message + '".'); + } else { + var defaultStore = 0; + var url = [ + this.options.afterAssignSaveUrl + 'store_id', + stores ? stores[0] : defaultStore, + 'theme_id', + response.themeId + ].join('/'); + this.options.storesByThemes[themeId] = stores; + + document.location = url; + } + }, this), + error: function() { + alert($.mage.__('Error: unknown error.')); } - }, this)).error(function() { - alert($.mage.__('Error: unknown error.')); }); + }, + + /** + * Prepare items for post request + * + * @param items + * @return {Object} + * @private + */ + _preparePostItems: function(items) { + var postData = {}; + $.each(items, function(index, item){ + postData[index] = item.getPostData(); + }); + return postData; + } + }); + + /** + * Theme quick edit controls + */ + $.widget('vde.themeControl', { + options: { + themeData: null, + saveEventName: 'quickEditSave', + isActive: false + }, + + /** + * Bind widget events + * @protected + */ + _init: function() { + this.options._control.on('click', $.proxy(this._onEdit, this)); + this.options._saveControl.on('click', $.proxy(this._onSave, this)); + this.document.on('click', $.proxy(this._onCancel, this)); + }, + + /** + * Widget initialization + * @protected + */ + _create: function() { + this.options._textControl = this.widget().find('.theme-title.text-field'); + this.options._inputControl = this.widget().find('.theme-title.input-field'); + this.options._saveControl = this.widget().find('.save'); + this.options._control = this.widget().find('.theme-control-title'); + + this.options.themeData = this.widget().data('widget-options'); + }, + + /** + * Edit event + * @protected + */ + _onEdit: function() { + if (this.options.isActive) { + return; + } + this.options.isActive = true; + this.options._textControl.fadeOut(); + this.options._inputControl.fadeIn().focus(); + this._setThemeTitle(this.options.themeData.theme_title); + }, + + /** + * Save changed theme data + * @protected + */ + _onSave: function() { + if(!this.options.isActive) { + return; + } + var params = { + theme_id: this.options.themeData.theme_id, + theme_title: this._getThemeTitle() + }; + $('#messages').html(''); + $.ajax({ + url: this.options.url, + type: 'POST', + dataType: 'json', + data: params, + showLoader: true, + success: $.proxy(function(response) { + if (response.success) { + this.options.themeData.theme_title = this._getThemeTitle(); + this._setThemeTitle(this.options.themeData.theme_title); + } + this._cancelEdit(); + }, this), + error: $.proxy(function() { + this._cancelEdit(); + alert($.mage.__('Error: unknown error.')); + }, this) + }); + }, + + /** + * Get the entered value + * @return {string} + * @protected + */ + _getThemeTitle: function() { + return this.options._inputControl.find('input').val(); + }, + + /** + * Set the saved value + * @param title {string} + * @return {*} + * @protected + */ + _setThemeTitle: function(title) { + this.options._textControl.html(title); + this.options._inputControl.find('input').val(title); + return this; + }, + + /** + * Cancel saving theme title + * @param event {*} + * @protected + */ + _onCancel: function(event) { + if (this.options.isActive && this.options._control.has($(event.target)).length === 0) { + this._cancelEdit(); + } + }, + + /** + * Cancel editing mode + * @protected + */ + _cancelEdit: function() { + this.options.isActive = false; + this.options._textControl.fadeIn(); + this.options._inputControl.fadeOut(); } }); + })(jQuery); diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/layout.xml b/app/code/core/Mage/DesignEditor/view/adminhtml/layout.xml index b4d85112aad9cea26c9b07e760d86bf89cd5d280..0c96166cbb2ec36e06df70c8ee2a7e34967967c3 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/layout.xml +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/layout.xml @@ -38,15 +38,15 @@ <action method="addTab"><name>customizations</name><block>customizations.themes.tab</block></action> <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_Tab_Available" name="available.themes.tab"> <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Available" name="available.theme.list" template="Mage_DesignEditor::theme/list/available.phtml"> - <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="available.theme.item" as="item" template="Mage_DesignEditor::theme.phtml"/> + <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="available.theme.item" as="item" template="Mage_DesignEditor::theme/available.phtml" /> </block> </block> - <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_Tab_Customizations" name="customizations.themes.tab" template="Mage_DesignEditor::theme/selector/myCustomizationsTab.phtml"> + <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_Tab_Customizations" name="customizations.themes.tab" template="Mage_DesignEditor::theme/selector/my_customizations_tab.phtml"> <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Assigned" name="assigned.theme.list" template="Mage_DesignEditor::theme/list/customized.phtml"> - <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="assigned.theme" as="theme" template="Mage_DesignEditor::theme_customizations.phtml"/> + <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="assigned.theme" as="theme" template="Mage_DesignEditor::theme/customized.phtml" /> </block> <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Unassigned" name="unassigned.theme.list" template="Mage_DesignEditor::theme/list/customized.phtml"> - <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="unassigned.theme" as="theme" template="Mage_DesignEditor::theme_customizations.phtml" /> + <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="unassigned.theme" as="theme" template="Mage_DesignEditor::theme/customized.phtml" /> </block> </block> </block> @@ -61,9 +61,9 @@ <action method="addCss"><file>Mage_DesignEditor::css/styles.css</file></action> </reference> <reference name="content"> - <block type="Mage_Backend_Block_Template" name="available.theme.list.container" as="theme_container" template="Mage_DesignEditor::theme/selector/firstEntrance.phtml"> + <block type="Mage_Backend_Block_Template" name="available.theme.list.container" as="theme_container" template="Mage_DesignEditor::theme/selector/first_entrance.phtml"> <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Available" name="available.theme.list" template="Mage_DesignEditor::theme/list/available.phtml"> - <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="design.editor.theme" as="theme" template="Mage_DesignEditor::theme.phtml" /> + <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="design.editor.theme" as="theme" template="Mage_DesignEditor::theme/available.phtml" /> </block> </block> <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_StoreView" name="theme.selector.storeview" template="Mage_DesignEditor::theme/selector/storeview.phtml" /> @@ -73,7 +73,7 @@ <adminhtml_system_design_editor_loadthemelist> <container name="root" label="Root" output="1"> <block type="Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Available" name="available.theme.list" template="Mage_DesignEditor::theme/list/available_ajax.phtml"> - <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="design.editor.theme" as="theme" template="Mage_DesignEditor::theme.phtml"/> + <block type="Mage_DesignEditor_Block_Adminhtml_Theme" name="design.editor.theme" as="theme" template="Mage_DesignEditor::theme/available.phtml"/> </block> </container> </adminhtml_system_design_editor_loadthemelist> @@ -86,7 +86,6 @@ <action method="addJs"><file>Mage_DesignEditor::js/theme-selector.js</file></action> <action method="addJs"><file>Mage_DesignEditor::js/base.js</file></action> <action method="addJs"><file>Mage_DesignEditor::js/design_editor.js</file></action> - <action method="addJs"><file>jquery/jquery.iframe-auto-height.plugin.1.9.0.js</file></action> <action method="addJs"><file>jquery/jstree/jquery.jstree.js</file></action> <action method="addJs"><file>jquery/slimScroll/slimScroll.min.js</file></action> <action method="addCss"><file>Mage_DesignEditor::css/styles.css</file></action> diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/theme.phtml b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/available.phtml similarity index 100% rename from app/code/core/Mage/DesignEditor/view/adminhtml/theme.phtml rename to app/code/core/Mage/DesignEditor/view/adminhtml/theme/available.phtml diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/theme_customizations.phtml b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/customized.phtml similarity index 73% rename from app/code/core/Mage/DesignEditor/view/adminhtml/theme_customizations.phtml rename to app/code/core/Mage/DesignEditor/view/adminhtml/theme/customized.phtml index c9d4fdb33d5c3003ca49c427d29f6e0612888493..cf70cdd9997d23117d997d2e1f07c300c1914428 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/theme_customizations.phtml +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/customized.phtml @@ -26,13 +26,24 @@ ?> <?php /** @var $this Mage_DesignEditor_Block_Adminhtml_Theme */?> +<?php + $themeTitle = $this->quoteEscape($this->getTheme()->getThemeTitle()); +?> <li class="theme" id="theme-id-<?php echo $this->getTheme()->getId() ?>" style="margin:20px; float:left;"> - <ul class="theme-element-customizations"> - <li class="theme-assigned-to-storeview"> - <span class="theme-title"> + <ul class="theme-element-customizations" data-widget-options="<?php echo $this->escapeHtml($this->getOptionsJson()); ?>"> + <li class="theme-assigned-to-storeview theme-control-title""> + <span class="theme-title text-field"> <?php echo $this->getTheme()->getThemeTitle() ?> </span> + <div class="theme-title input-field"> + <div class="control"> + <input type="text" value="<?php echo $themeTitle ?>" data-title-original="<?php echo $themeTitle ?>" class="input-text" /> + </div> + <?php echo $this->getQuickSaveButton()->toHtml() ?> + </div> + </li> + <li> <?php if ($this->getTheme()->getAssignedStores()): ?> <?php echo $this->__('Store View applied to:') . ' ' . implode(', ', $this->getStoresTitles()) ?> <?php endif; ?> diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/firstEntrance.phtml b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/first_entrance.phtml similarity index 100% rename from app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/firstEntrance.phtml rename to app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/first_entrance.phtml diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/myCustomizationsTab.phtml b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/my_customizations_tab.phtml similarity index 100% rename from app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/myCustomizationsTab.phtml rename to app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/my_customizations_tab.phtml diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/storeview.phtml b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/storeview.phtml index c24968cb69df500def59bf83018154c63d030fc1..4ccf99c8f533fab79f30a4d1c2f8b8ebadb6fe7d 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/storeview.phtml +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/selector/storeview.phtml @@ -75,5 +75,6 @@ $( document ).ready(function( ) { $( 'body' ).themeSelector(<?php echo $this->getOptionsJson(); ?>); }); + $('.theme-element-customizations').themeControl({url: '<?php echo $this->getUrl('*/*/quickEdit') ?>'}); })(jQuery); </script> diff --git a/app/code/core/Mage/DesignEditor/view/frontend/css/design.css b/app/code/core/Mage/DesignEditor/view/frontend/css/design.css index ae20890496c25a77be745bdb6fcce25ac09b3f28..9b2bc29d3d1958c0066f546dc142ae4d7d355b12 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/css/design.css +++ b/app/code/core/Mage/DesignEditor/view/frontend/css/design.css @@ -22,262 +22,100 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -#vde_toolbar { - position: fixed; - margin-top: -54pt; - width: 100%; - z-index: 999; - font:10pt Arial, Helvetica, sans-serif; - color:#555; - text-align:left; - box-shadow:0 0 4pt 1pt #cbcbcb; -} -.vde_breadcrumbs, #vde_toolbar_row { - padding:0 3em; - height:26pt; - line-height:26pt; - vertical-align:middle; +body { + padding-top: 15px; } -.vde_breadcrumbs { - text-transform:uppercase; - background:white; +a, button { + cursor: default !important; } - -#vde_toolbar_row { - background:#f0efe9; - border-top:1pt solid #dddcd8; - border-bottom:1pt solid #dddcd8; - position:relative; - z-index:100; -} - -#vde_toolbar_row .vde_toolbar_cell { - float: left; - margin-left:-11pt; - margin-right:10pt; - border-right:1pt solid transparent; - border-left:1pt solid transparent; - padding:0 10pt; - position:relative; -} -#vde_toolbar_row .vde_toolbar_cell:hover, #vde_toolbar_row .vde_toolbar_cell.active { - background-color:white; - border-right:1pt solid #deddd9; - border-left:1pt solid #deddd9; -} -#vde_toolbar_buttons { - float: right; - z-index: 1000; +.vde_element_wrapper { + border: 2px solid #69a8cf; position: relative; - line-height:21pt; - padding:2pt 0; -} -#vde_toolbar_buttons a.vde_button { - display:block; - border:1px solid #c9c6be; - box-shadow:0 0 1pt 0 #c9c6be; - border-radius:3pt; - padding:0 1.7em; - color:#555; - text-decoration:none; - background-image:url(../images/button.png); - background-size:contain; - float: left; - margin-right:3px; -} -#vde_toolbar_buttons a.vde_button:hover { - box-shadow:0 0 1pt 1pt #c9c6be; - background-image:url(../images/button_hover.png); } -#vde_toolbar .item-msg { - border-style: solid; - border-width: 1px; - padding: 4px; -} - -#vde_toolbar .error { - border-color: red; - color: red; +.vde_element_wrapper.vde_draggable { + cursor: pointer; + margin-bottom: 2px; } - -.vde_element_wrapper { - margin-bottom: 3px; - padding: 0px 2px 2px 2px; - border: 2px solid #69a8cf; - border-radius: 4px; +.vde_element_wrapper.vde_draggable.ui-sortable-helper { + cursor: move; } .vde_element_title { font-family:Arial, Helvetica, sans-serif; - margin: -2px 0 0 -4px; - padding: 0; + padding: 2px 0 2px 5px; border-width: 2px 5px 6px 7px; - border-image: url(../images/block.png) 2 5 6 7 stretch stretch; - border-image-outset: fill; - -webkit-border-image: url(../images/block.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/block.png) 2 5 6 7 stretch stretch; color: black; font-size: 8pt; font-weight: bold; - max-width: 150px; height: 18px; overflow: hidden; text-align: left; line-height: 17px; - cursor: default; + background-color: #f8f7f5; } .vde_element_remove { - margin: -26px -6px 0px -4px; - padding: 0px; + position: absolute; + right: 0px; + margin: 4px 4px 0px 0px; + padding: 0; border-width: 2px 5px 6px 7px; - border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - border-image-outset: fill; - -webkit-border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; max-width: 20px; height: 18px; overflow: hidden; text-align: right; line-height: 17px; - cursor: default; float: right; } +.vde_element_remove img { + cursor: pointer; +} .vde_element_wrapper.vde_container { - border: 2px solid #7bc361; + border: none; + margin-top: 5px; + margin-bottom: 5px; + min-width: 150px; +} +.vde_element_wrapper.vde_highlight { + border: 1px solid #dedede; + background-color: #fafafa; } .vde_container > .vde_element_title { - border-image: url(../images/container.png) 2 5 6 7 stretch stretch; - -webkit-border-image: url(../images/container.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/container.png) 2 5 6 7 stretch stretch; + display: none; + position: absolute; + background-color: #7bc361; + margin-top: -18px; + margin-left: -3px; + padding-left: 10px; + padding-right: 10px; + color: #ffffff; + border-radius: 0 4px 0 0; } .vde_element_wrapper.vde_stub { border: 2px solid #92978d; -} -.vde_stub > .vde_element_title { - border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - -webkit-border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/stub.png) 2 5 6 7 stretch stretch; + margin: 2px; + min-height: 40px; + background-color: #dadfd4; } .vde_container.vde_container_hover { - border-color: #006400; + border: 3px dashed #7bc361; + min-height: 40px; } .vde_container.vde_container_hover > .vde_element_title { - border-image: url(../images/container_hover.png) 2 5 6 7 stretch stretch; - -webkit-border-image: url(../images/container_hover.png) 2 5 6 7 stretch stretch; - -moz-border-image: url(../images/container_hover.png) 2 5 6 7 stretch stretch; + display: block; } .vde_placeholder { background-color: #F5F5DC; } -.vde_wrapper_hidden, .vde_wrapper_hidden .vde_element_title { - display: none; -} - -.vde_toolbar_cell_title { - font-weight: bold; - cursor: pointer; - padding-right:12pt; - background: url(../images/arrow_down.png) right center no-repeat; -} -.vde_toolbar_cell.active .vde_toolbar_cell_title { - background-image: url(../images/arrow_up.png); -} -.vde_toolbar_cell_value { - font-weight: normal; -} -#vde_toolbar_row .vde_toolbar_cell_content, #vde_toolbar_row .vde_toolbar_cell_content * { - color:#f0efe9; +.vde_placeholder_content { + text-align: center; + background-color: #a0988d; } -.vde_toolbar_cell_content { +.vde_wrapper_hidden, .vde_wrapper_hidden .vde_element_title { display: none; - position: absolute; - top:2.5em; - left:0; - background: #494949; - padding:.5em 0; - z-index: 190; - min-width:20em; - margin-top:1pt; - border-radius:0 0 5pt 5pt; - -moz-box-shadow:0 1pt 2pt 1pt #6c6c6c; - -webkit-box-shadow:0 1pt 2pt 1pt #6c6c6c; - box-shadow:0 1pt 2pt 1pt #6c6c6c; -} -.vde_toolbar_cell.active .vde_toolbar_cell_content { - display: block; -} -.vde_toolbar_cell_content > div { - white-space: nowrap; - vertical-align: middle; - padding: 0 10px; -} -.vde_toolbar_cell_content .vde_cell_list_item { - padding-left:18pt; - cursor: pointer; -} -.vde_toolbar_cell_content .vde_cell_list_group { - padding-left:5pt; - font-style:italic; - cursor:default; -} -.vde_toolbar_cell_content .vde_cell_list_item:hover, #vde_handles_tree .jstree-clicked, #vde_handles_tree .jstree-hovered { - background-color:#7b7b7b; -} -.vde_toolbar_cell_content .checked { - background:url(../images/checked.png) no-repeat 5pt center; -} -.vde_breadcrumbs a { - font-weight: bold; - text-decoration: none; - color: #2483c7; -} - -.vde_breadcrumbs a:hover { - text-decoration: underline; } -.vde_breadcrumbs .vde_breadcrumbs_separator { - margin:0 0.3em; -} - -#visual_design_editor_theme a { - display:block; - text-decoration:none; -} .ui-sortable-helper { opacity: 0.9; } - -#vde_handles_hierarchy .vde_toolbar_cell_content { - padding: 1em .5em 1em 0; -} -#vde_handles_tree { - max-height: 30em; /* max allowed height */ - overflow: hidden; /* don't display native scrollbars */ - padding-right: .5em; - text-align: left; - background-color: transparent; -} -#vde_handles_tree li { - overflow: hidden; -} -#vde_handles_tree a { - margin-left: .5em; - padding: .5em; - width: 100%; -} -#vde_handles_tree .jstree-clicked, #vde_handles_tree .jstree-hovered { - border: none; -} -#vde_handles_tree .jstree-closed > .jstree-icon { - background: url(../images/jstree_plus_minus.png) top left no-repeat; -} -#vde_handles_tree .jstree-open > .jstree-icon { - background: url(../images/jstree_plus_minus.png) top right no-repeat; -} -#vde_handles_tree .vde_option_fragment a { - color: #eea243; -} - .vde_history_toolbar { position: fixed; left:0; top:150px; @@ -293,3 +131,6 @@ white-space: nowrap; overflow: hidden; } +.vde_opacity_enabled { + opacity: 0.5; +} diff --git a/app/code/core/Mage/DesignEditor/view/frontend/images/block-placeholder.png b/app/code/core/Mage/DesignEditor/view/frontend/images/block-placeholder.png new file mode 100644 index 0000000000000000000000000000000000000000..a8c8d913b9e58110f52af2de3e4c68057e28ac0f Binary files /dev/null and b/app/code/core/Mage/DesignEditor/view/frontend/images/block-placeholder.png differ diff --git a/app/code/core/Mage/DesignEditor/view/frontend/js/design_editor.js b/app/code/core/Mage/DesignEditor/view/frontend/js/design_editor.js index d4d5b8d9b6963901eacc008407ab15b4827bd6c0..5080599dfbb050e90ec288a2d2533feafe9c1388 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/js/design_editor.js +++ b/app/code/core/Mage/DesignEditor/view/frontend/js/design_editor.js @@ -38,29 +38,60 @@ revert: true, connectWithSelector: '.vde_element_wrapper.vde_container', placeholder: 'vde_placeholder', + forcePlaceholderSize: true, hoverClass: 'vde_container_hover', items: '.vde_element_wrapper.vde_draggable', helper: 'clone', appendTo: 'body', - containerSelector: '.vde_container' + containerSelector: '.vde_container', + highlightClass: 'vde_highlight', + opacityClass: 'vde_opacity_enabled' }, _create: function() { var self = this; this.element.data('sortable', this); self.options = $.extend({}, self.options, { - start: function( event, ui ) { - ui.placeholder.css({ height: $(ui.helper).outerHeight(true) }); + start: function(event, ui) { + self._highlightEmptyContainers(ui.helper); self.element.vde_container('option', 'connectWith', $(self.options.connectWithSelector) .not(ui.item)).vde_container('refresh'); + + self.element.addClass(self.options.hoverClass).addClass(self.options.highlightClass); + $(self.options.items).addClass(self.options.opacityClass); + ui.helper.removeClass(self.options.opacityClass); }, over: function(event, ui) { + $(self.options.containerSelector).removeClass(self.options.hoverClass); self.element.addClass(self.options.hoverClass); + + self._highlightEmptyContainers(ui.helper); }, - out: function(event, ui) { - self.element.removeClass(self.options.hoverClass); + stop: function(event, ui) { + $(self.options.containerSelector).removeClass(self.options.hoverClass); + $('.' + self.options.highlightClass).removeClass(self.options.highlightClass); + $(self.options.items).removeClass(self.options.opacityClass); + + self._disableEmptyContainers(); } }); $.ui.sortable.prototype._create.apply(this, arguments); + }, + _highlightEmptyContainers: function(originalElement) { + var self = this; + $(this.options.containerSelector).each(function (index, element) { + if ($(element).find(self.options.items + ':visible').length == 0) { + $(element).addClass(self.options.highlightClass) + .css('min-height', originalElement.outerHeight(true)); + } + }) + }, + _disableEmptyContainers: function(originalElement) { + var self = this; + $(this.options.containerSelector).each(function (index, element) { + if ($(element).find(':visible').length == 0) { + $(element).removeClass(self.options.highlightClass).css('min-height', '0px'); + } + }) } }); @@ -87,9 +118,9 @@ _onDragElementStop: function(event, ui) { var block = ui.item; var originContainer = this.element.data('name'); - var originPosition = event.data.position; + var originPosition = event.data.position - 1; var destinationContainer = this._getContainer(block).data('name'); - var destinationPosition = block.index(); + var destinationPosition = block.index() - 1; var containerChanged = destinationContainer != originContainer; var sortingOrderChanged = destinationPosition != originPosition; diff --git a/app/code/core/Mage/Tag/view/frontend/list.js b/app/code/core/Mage/DesignEditor/view/frontend/js/form_deactivation.js similarity index 66% rename from app/code/core/Mage/Tag/view/frontend/list.js rename to app/code/core/Mage/DesignEditor/view/frontend/js/form_deactivation.js index 034ce14d829f76b4e36fc34981dee8c1985c20f2..a09672c746717f1126d1c80013f626a4bcac374c 100644 --- a/app/code/core/Mage/Tag/view/frontend/list.js +++ b/app/code/core/Mage/DesignEditor/view/frontend/js/form_deactivation.js @@ -17,18 +17,28 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category tab - * @package mage + * @category Mage + * @package Mage_DesignEditor * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/*jshint browser:true jquery:true */ -(function ($) { - $.widget('mage.tags', { - options : { + +(function($) { + /** + * Widget Form Deactivation + */ + $.widget('vde.vde_formDeactivation', { + _create: function () { + this._initFormDeactivation(); }, - _create: function() { - this.element.mage().validate({errorClass: 'mage-error', errorElement: 'div'}); + _initFormDeactivation: function () { + $('form').submit( function(e){ + e.preventDefault(); + }); } }); -})(jQuery); + + $(document).ready(function( ){ + $(window).vde_formDeactivation(); + }); +})( jQuery ); diff --git a/app/code/core/Mage/DesignEditor/view/frontend/layout.xml b/app/code/core/Mage/DesignEditor/view/frontend/layout.xml index 16350958e833c861939e3569d74b6c4d922588cd..4fdb0fe66ed7726437338fef3c36953b04fd9e11 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/layout.xml +++ b/app/code/core/Mage/DesignEditor/view/frontend/layout.xml @@ -36,12 +36,13 @@ <action method="addJs"><file>jquery/jquery.min.js</file></action> <action method="addJs"><file>jquery/jquery-ui.custom.min.js</file></action> <action method="addJs"><file>mage/jquery-no-conflict.js</file></action> - <action method="addJs"><file>jquery/head.js</file></action> + <action method="addJs"><file>head.load.min.js</file></action> <action method="addJs"><file>mage/mage.js</file></action> <action method="addJs"><file>mage/decorate.js</file></action> <action method="addJs"><file>mage/translate.js</file></action> <action method="addJs"><file>jquery/jquery.tmpl.min.js</file></action> <action method="addJs"><file>Mage_DesignEditor::js/design_editor.js</file></action> + <action method="addJs"><file>Mage_DesignEditor::js/form_deactivation.js</file></action> <action method="addJs"><file>Mage_DesignEditor::js/change/layout.js</file></action> <action method="addCss"><file>Mage_DesignEditor::css/design.css</file></action> </reference> diff --git a/app/code/core/Mage/DesignEditor/view/frontend/stub.phtml b/app/code/core/Mage/DesignEditor/view/frontend/stub.phtml index 8d1d88c12696a08f737e4f0aaaace867808f9f42..893b129eb508a6ad922508e9a2eb4f8b0608df96 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/stub.phtml +++ b/app/code/core/Mage/DesignEditor/view/frontend/stub.phtml @@ -24,7 +24,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<div class="vde_element_wrapper vde_stub"> - <div class="vde_element_title"><?php echo $this->getNameInLayout() ?></div> - <div><?php echo $this->getChildHtml() ?></div> -</div> +<?php /** @var $this Mage_Core_Block_Template */ ?> +<?php $childHtml = $this->getChildHtml(); ?> +<?php if ($childHtml) : ?> + <div><?php echo $childHtml ?></div> +<?php else : ?> + <div class="vde_placeholder_content"> + <img src="<?php echo $this->getViewFileUrl('Mage_DesignEditor::images/block-placeholder.png') ?>" + alt="<?php echo $this->__('Placeholder')?>" /> + </div> +<?php endif ?> diff --git a/app/code/core/Mage/DesignEditor/view/frontend/wrapper/remove.phtml b/app/code/core/Mage/DesignEditor/view/frontend/wrapper/remove.phtml index e0bd4d9f91ca95e775dcc3c4d221cfe4e9352d4a..ad728678aa82d148bf8dbdeb2688974da8d49f57 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/wrapper/remove.phtml +++ b/app/code/core/Mage/DesignEditor/view/frontend/wrapper/remove.phtml @@ -25,7 +25,7 @@ */ ?> <?php /** @var $this Mage_DesignEditor_Block_Wrapper_Remove */ ?> -<div class="vde_element_title vde_element_remove" id="<?php echo $this->getElementId(); ?>"> +<div class="vde_element_remove" id="<?php echo $this->getElementId(); ?>"> <a href="#remove"> <img src="<?php echo $this->getViewFileUrl('images/btn_remove.gif') ?>" alt="<?php echo $this->__('Remove')?>" /> </a> diff --git a/app/code/core/Mage/DesignEditor/view/frontend/wrapping.phtml b/app/code/core/Mage/DesignEditor/view/frontend/wrapping.phtml index 3d71d2c6f725c7e954ce62da831c59598460c6da..baf3b5f8babd6a8371610cdca24ce039d7e884e8 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/wrapping.phtml +++ b/app/code/core/Mage/DesignEditor/view/frontend/wrapping.phtml @@ -33,11 +33,18 @@ $cssClass = 'vde_element_wrapper' . ($this->getIsContainer() ? ' vde_container' : ''); ?> <div id="<?php echo $elementId; ?>" class="<?php echo $cssClass; ?>" data-name="<?php echo $this->getElementName() ?>"> - <div class="vde_element_title"><?php echo $this->getElementTitle() ?></div> <?php if ($this->getIsManipulationAllowed()): ?> <?php echo $this->getRemoveButton($elementId) ?> <?php endif; ?> + <div class="vde_element_title"><?php echo $this->getElementTitle() ?></div> <!--start_<?php echo $elementId; ?>--> - <?php echo $elementHtml; ?> + <?php if ($elementHtml) : ?> + <div><?php echo $elementHtml ?></div> + <?php elseif (!$this->getIsContainer()) : ?> + <div class="vde_placeholder_content"> + <img src="<?php echo $this->getViewFileUrl('Mage_DesignEditor::images/block-placeholder.png') ?>" + alt="<?php echo $this->__('Placeholder')?>" /> + </div> + <?php endif ?> <!--end_<?php echo $elementId; ?>--> </div> diff --git a/app/code/core/Mage/Downloadable/view/adminhtml/layout.xml b/app/code/core/Mage/Downloadable/view/adminhtml/layout.xml index c4116d1b4da861d4af98a2800487025b0732d0f5..470af0fbd275139b5e0bb125756eae8665ac105b 100644 --- a/app/code/core/Mage/Downloadable/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Downloadable/view/adminhtml/layout.xml @@ -27,7 +27,6 @@ --> <layout> - <adminhtml_catalog_product_downloadable> <update handle="adminhtml_catalog_product_superconfig_config"/> <reference name="product_tabs"> @@ -35,7 +34,17 @@ </reference> <reference name="product-type-tabs"> <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config" - name="admin.product.edit.tab.super.config.grid.container"></block> + name="admin.product.edit.tab.super.config.grid.container"> + <block type="Mage_Core_Block_Template" name="attribute-block-template" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-js-template.phtml" + as="template"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Attribute" + template="Mage_Adminhtml::catalog/product/edit/super/attribute-template.phtml" + as="attribute-renderer"/> + <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix" + template="Mage_Adminhtml::catalog/product/edit/super/matrix.phtml" + as="matrix"/> + </block> </reference> </adminhtml_catalog_product_downloadable> diff --git a/app/code/core/Mage/Downloadable/view/frontend/catalog/product/links.phtml b/app/code/core/Mage/Downloadable/view/frontend/catalog/product/links.phtml index 4ca0ffa86bca9fcae392f84a7d93d9e5eec09bb8..b22849fa06d4321f382ea3bc89968adb36daf9e9 100644 --- a/app/code/core/Mage/Downloadable/view/frontend/catalog/product/links.phtml +++ b/app/code/core/Mage/Downloadable/view/frontend/catalog/product/links.phtml @@ -34,32 +34,26 @@ <dd> <ul id="downloadable-links-list" class="options-list"> <?php foreach ($_links as $_link): ?> - <li> - <?php if ($_linksPurchasedSeparately): ?> - <input type="checkbox" class="checkbox<?php if($_isRequired):?> validate-one-required-by-name<?php endif; ?> product-downloadable-link" onclick="dConfig.reloadPrice()" name="links[]" id="links_<?php echo $_link->getId() ?>" value="<?php echo $_link->getId(); ?>" <?php echo $this->getLinkCheckedValue($_link); ?> /> - <?php endif; ?> - <span class="label"> + <li> + <?php if ($_linksPurchasedSeparately): ?> + <input type="checkbox" <?php if ($_isRequired): ?>data-validate="{'validate-one-checkbox-required-by-name':'downloadable-links-list'}" <?php endif; ?> + class="checkbox" name="links[]" id="links_<?php echo $_link->getId() ?>" + value="<?php echo $_link->getId(); ?>" <?php echo $this->getLinkCheckedValue($_link); ?> /> + <?php endif; ?> + <span class="label"> <label for="links_<?php echo $_link->getId() ?>"> <?php echo $this->escapeHtml($_link->getTitle()); ?> </label> - <?php if ($_link->getSampleFile() || $_link->getSampleUrl()): ?> - (<a href="<?php echo $this->getLinkSamlpeUrl($_link) ?>" <?php echo $this->getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':''; ?>><?php echo Mage::helper('Mage_Downloadable_Helper_Data')->__('sample') ?></a>) - <?php endif; ?> - <?php if ($_linksPurchasedSeparately): ?> - <?php echo $this->getFormattedLinkPrice($_link); ?> - <?php endif; ?> - </span> - <?php if ($_isRequired): ?> - <script type="text/javascript"> - //<![CDATA[ - $('links_<?php echo $_link->getId() ?>').advaiceContainer = 'links-advice-container'; - $('links_<?php echo $_link->getId() ?>').callbackFunction = 'validateDownloadableCallback'; - //]]> - </script> + <?php if ($_link->getSampleFile() || $_link->getSampleUrl()): ?> + (<a href="<?php echo $this->getLinkSamlpeUrl($_link) ?>" <?php echo $this->getIsOpenInNewWindow() ? 'target="_blank"' : ''; ?>><?php echo Mage::helper('Mage_Downloadable_Helper_Data')->__('sample') ?></a>) + <?php endif; ?> + <?php if ($_linksPurchasedSeparately): ?> + <?php echo $this->getFormattedLinkPrice($_link); ?> <?php endif; ?> - </li> + </span> + </li> <?php endforeach; ?> - </ul> + </ul> <?php if ($_isRequired): ?> <span id="links-advice-container"></span> @@ -67,47 +61,13 @@ </dd> </dl> <script type="text/javascript"> - //<![CDATA[ - Product.Downloadable = Class.create(); - Product.Downloadable.prototype = { - config : {}, - initialize : function(config){ - this.config = config; - this.reloadPrice(); - document.observe("dom:loaded", this.reloadPrice.bind(this)); - }, - reloadPrice : function(){ - var price = 0; - config = this.config; - $$('.product-downloadable-link').each(function(elm){ - if (config[elm.value] && elm.checked) { - price += parseFloat(config[elm.value]); - } + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Downloadable::downloadable.js') ?>", function () { + $('#downloadable-links-list').downloadable({ + linkElement: 'input:checkbox', + config: <?php echo $this->getJsonConfig() ?> }); - try { - var _displayZeroPrice = optionsPrice.displayZeroPrice; - optionsPrice.displayZeroPrice = false; - optionsPrice.changePrice('downloadable', price); - optionsPrice.reload(); - optionsPrice.displayZeroPrice = _displayZeroPrice; - } catch (e) { - - } - } - }; - - function validateDownloadableCallback(elmId, result) { - var container = $('downloadable-links-list'); - if (result == 'failed') { - container.removeClassName('validation-passed'); - container.addClassName('validation-failed'); - } else { - container.removeClassName('validation-failed'); - container.addClassName('validation-passed'); - } - } - - var dConfig = new Product.Downloadable(<?php echo $this->getJsonConfig() ?>); - //]]> - </script> -<?php endif;?> + }); + })(jQuery); +</script> +<?php endif; ?> diff --git a/app/code/core/Mage/Downloadable/view/frontend/downloadable.js b/app/code/core/Mage/Downloadable/view/frontend/downloadable.js new file mode 100644 index 0000000000000000000000000000000000000000..9d125c4e47926b5030cb94f04f12c7abdd7a4e93 --- /dev/null +++ b/app/code/core/Mage/Downloadable/view/frontend/downloadable.js @@ -0,0 +1,46 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage downloadable view + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true expr:true*/ +(function ($) { + $.widget('mage.downloadable', { + _create: function() { + this.element.find(this.options.linkElement).on('change', $.proxy(function() { + this._reloadPrice(); + }, this)); + }, + + /** + * Reload product price with selected link price included + * @private + */ + _reloadPrice: function() { + var price = 0; + this.element.find(this.options.linkElement + ':checked').each($.proxy(function(index, element) { + price += this.options.config[$(element).val()]; + }, this)); + this.element.trigger('changePrice', {'config': 'config', 'price': {'price': price} }).trigger('reloadPrice'); + } + }); +})(jQuery); \ No newline at end of file diff --git a/app/code/core/Mage/Eav/Model/Config.php b/app/code/core/Mage/Eav/Model/Config.php index 54f3dd79fc475759aa68b393dab231b5cc586e25..1f3a8dbfcb0ddc9eeee28aaba9151cb924ab3c7c 100644 --- a/app/code/core/Mage/Eav/Model/Config.php +++ b/app/code/core/Mage/Eav/Model/Config.php @@ -113,6 +113,7 @@ class Mage_Eav_Model_Config $this->_references = null; $this->_preloadedAttributes = array(); $this->_initializedAttributes = array(); + $this->_attributeCodes = array(); return $this; } diff --git a/app/code/core/Mage/Eav/Model/Entity/Abstract.php b/app/code/core/Mage/Eav/Model/Entity/Abstract.php index f59723b152611c03062c289ce221986f2d118ae8..3b15a5fc83fd13e064c1c642d0bd5c9b096af13d 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Abstract.php @@ -376,25 +376,25 @@ abstract class Mage_Eav_Model_Entity_Abstract extends Mage_Core_Model_Resource_A */ public function getAttribute($attribute) { + /** @var $config Mage_Eav_Model_Config */ + $config = Mage::getSingleton('Mage_Eav_Model_Config'); if (is_numeric($attribute)) { $attributeId = $attribute; if (isset($this->_attributesById[$attributeId])) { return $this->_attributesById[$attributeId]; } - $attributeInstance = Mage::getSingleton('Mage_Eav_Model_Config')->getAttribute($this->getEntityType(), $attributeId); + $attributeInstance = $config->getAttribute($this->getEntityType(), $attributeId); if ($attributeInstance) { $attributeCode = $attributeInstance->getAttributeCode(); } - - } else if (is_string($attribute)) { + } elseif (is_string($attribute)) { $attributeCode = $attribute; if (isset($this->_attributesByCode[$attributeCode])) { return $this->_attributesByCode[$attributeCode]; } - $attributeInstance = Mage::getSingleton('Mage_Eav_Model_Config') - ->getAttribute($this->getEntityType(), $attributeCode); + $attributeInstance = $config->getAttribute($this->getEntityType(), $attributeCode); if (!$attributeInstance->getAttributeCode() && in_array($attribute, $this->getDefaultAttributes())) { $attributeInstance ->setAttributeCode($attribute) @@ -404,8 +404,7 @@ abstract class Mage_Eav_Model_Entity_Abstract extends Mage_Core_Model_Resource_A ->setEntityType($this->getEntityType()) ->setEntityTypeId($this->getEntityType()->getId()); } - } else if ($attribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract) { - + } elseif ($attribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract) { $attributeInstance = $attribute; $attributeCode = $attributeInstance->getAttributeCode(); if (isset($this->_attributesByCode[$attributeCode])) { @@ -612,15 +611,18 @@ abstract class Mage_Eav_Model_Entity_Abstract extends Mage_Core_Model_Resource_A * * Returns array with results for each attribute * - * if $method is in format "part/method" will run method on specified part + * if $partMethod is in format "part/method" will run method on specified part * for example: $this->walkAttributes('backend/validate'); * - * @param string $method + * @param string $partMethod * @param array $args - * @param array $part attribute, backend, frontend, source + * @param null|bool $collectExceptionMessages + * + * @throws Mage_Eav_Model_Entity_Attribute_Exception + * * @return array */ - public function walkAttributes($partMethod, array $args = array()) + public function walkAttributes($partMethod, array $args = array(), $collectExceptionMessages = null) { $methodArr = explode('/', $partMethod); switch (sizeof($methodArr)) { @@ -666,11 +668,21 @@ abstract class Mage_Eav_Model_Entity_Abstract extends Mage_Core_Model_Resource_A try { $results[$attrCode] = call_user_func_array(array($instance, $method), $args); } catch (Mage_Eav_Model_Entity_Attribute_Exception $e) { - throw $e; + if ($collectExceptionMessages) { + $results[$attrCode] = $e->getMessage(); + } else { + throw $e; + } } catch (Exception $e) { - $e = Mage::getModel('Mage_Eav_Model_Entity_Attribute_Exception', array('message' => $e->getMessage())); - $e->setAttributeCode($attrCode)->setPart($part); - throw $e; + if ($collectExceptionMessages) { + $results[$attrCode] = $e->getMessage(); + } else { + $e = Mage::getModel('Mage_Eav_Model_Entity_Attribute_Exception', + array('message' => $e->getMessage()) + ); + $e->setAttributeCode($attrCode)->setPart($part); + throw $e; + } } } @@ -837,7 +849,7 @@ abstract class Mage_Eav_Model_Entity_Abstract extends Mage_Core_Model_Resource_A public function validate($object) { $this->loadAllAttributes($object); - $result = $this->walkAttributes('backend/validate', array($object)); + $result = $this->walkAttributes('backend/validate', array($object), $object->getCollectExceptionMessages()); $errors = array(); foreach ($result as $attributeCode => $error) { if ($error === false) { @@ -1320,7 +1332,7 @@ abstract class Mage_Eav_Model_Entity_Abstract extends Mage_Core_Model_Resource_A /** * Import variables into the current symbol table from save data array * - * @see Mage_Eav_Model_Entity_Attribute_Abstract::_collectSaveData() + * @see Mage_Eav_Model_Entity_Abstract::_collectSaveData() * * @var array $entityRow * @var Mage_Core_Model_Abstract $newObject diff --git a/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit.php b/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit.php index 1a771c9c9a1269cb27405c4159d81f63f2d665e0..e75516f9acd768be56cb19383a315d5e8bd86205 100644 --- a/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit.php +++ b/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit.php @@ -47,7 +47,7 @@ class Mage_ImportExport_Block_Adminhtml_Import_Edit extends Mage_Adminhtml_Block ->_updateButton('save', 'label', $this->__('Check Data')) ->_updateButton('save', 'id', 'upload_button') ->_updateButton('save', 'onclick', 'varienImport.postToFrame();') - ->_updateButton('save', 'data_attr', ''); + ->_updateButton('save', 'data_attribute', ''); $this->_objectId = 'import_id'; $this->_blockGroup = 'Mage_ImportExport'; diff --git a/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit/Before.php b/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit/Before.php index 988138578f3a356b0c08c5b7376a54654f1b9d44..7226ecf950646ee60d3f7f9f84b0ac5d52fd8eee 100644 --- a/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit/Before.php +++ b/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit/Before.php @@ -59,6 +59,7 @@ class Mage_ImportExport_Block_Adminhtml_Import_Edit_Before extends Mage_Backend_ * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Helper_Data $coreHelper * @param Mage_ImportExport_Model_Import $importModel * @param array $data @@ -76,12 +77,13 @@ class Mage_ImportExport_Block_Adminhtml_Import_Edit_Before extends Mage_Backend_ Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Helper_Data $coreHelper, Mage_ImportExport_Model_Import $importModel, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); $this->_coreHelper = $coreHelper; $this->_importModel = $importModel; diff --git a/app/code/core/Mage/ImportExport/Helper/Data.php b/app/code/core/Mage/ImportExport/Helper/Data.php index da81bb193fa5724258a4c1982e0303ac90b0ad4b..72e4a1c47f24488464dfbb0150acf760624354f6 100644 --- a/app/code/core/Mage/ImportExport/Helper/Data.php +++ b/app/code/core/Mage/ImportExport/Helper/Data.php @@ -47,7 +47,7 @@ class Mage_ImportExport_Helper_Data extends Mage_Core_Helper_Data */ public function getMaxUploadSizeMessage() { - $maxImageSize = Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSizeInMb(); + $maxImageSize = Mage::getObjectManager()->get('Magento_File_Size')->getMaxFileSizeInMb(); if ($maxImageSize) { $message = $this->__('Total size of uploadable files must not exceed %sM', $maxImageSize); } else { diff --git a/app/code/core/Mage/Install/Block/Begin.php b/app/code/core/Mage/Install/Block/Begin.php index 8aa6b8abf1491fe072bba35a9af6c50547a57c18..fc5d52d9960c2bcfda8067ec68776246ee845f73 100644 --- a/app/code/core/Mage/Install/Block/Begin.php +++ b/app/code/core/Mage/Install/Block/Begin.php @@ -50,6 +50,6 @@ class Mage_Install_Block_Begin extends Mage_Install_Block_Abstract */ public function getLicenseHtml() { - return file_get_contents(BP . DS . (string)Mage::getConfig()->getNode('install/eula_file')); + return $this->_filesystem->read(BP . DS . (string)Mage::getConfig()->getNode('install/eula_file')); } } diff --git a/app/code/core/Mage/Install/Block/Download.php b/app/code/core/Mage/Install/Block/Download.php index 9f88a9366c0fa250e1fda0bb15a7c9a1ea284ba7..4d47393e3f4ae7039fea57efc96fee73b95ad2cc 100644 --- a/app/code/core/Mage/Install/Block/Download.php +++ b/app/code/core/Mage/Install/Block/Download.php @@ -54,10 +54,9 @@ class Mage_Install_Block_Download extends Mage_Install_Block_Abstract public function hasLocalCopy() { $dir = Mage::getConfig()->getModuleDir('etc', 'Mage_Adminhtml'); - if ($dir && file_exists($dir)) { + if ($dir && $this->_filesystem->isDirectory($dir)) { return true; } return false; } } - diff --git a/app/code/core/Mage/Install/Helper/Data.php b/app/code/core/Mage/Install/Helper/Data.php index 7bafd58e67768b7296fe25ce2bf6ba2151afcc1b..f90aef951207bf9b5b3a245d4998ebc180404e66 100644 --- a/app/code/core/Mage/Install/Helper/Data.php +++ b/app/code/core/Mage/Install/Helper/Data.php @@ -36,13 +36,26 @@ class Mage_Install_Helper_Data extends Mage_Core_Helper_Abstract */ protected $_varSubFolders; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + public function __construct(Magento_Filesystem $filesystem) + { + $this->_filesystem = $filesystem; + } + /** * Delete all service folders from var directory */ public function cleanVarFolder() { foreach ($this->getVarSubFolders() as $folder) { - Varien_Io_File::rmdirRecursive($folder); + try { + $this->_filesystem->delete($folder); + } catch (Magento_Filesystem_Exception $e) { + } } } diff --git a/app/code/core/Mage/Install/Model/Installer/Config.php b/app/code/core/Mage/Install/Model/Installer/Config.php index 5ddae8a4717e9783bb39ab6de18bc8344f573686..fabfa65fb3cdb510049869ef444cc4b354f6204d 100644 --- a/app/code/core/Mage/Install/Model/Installer/Config.php +++ b/app/code/core/Mage/Install/Model/Installer/Config.php @@ -44,8 +44,17 @@ class Mage_Install_Model_Installer_Config extends Mage_Install_Model_Installer_A protected $_configData = array(); - public function __construct() + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + /** + * @param Magento_Filesystem $filesystem + */ + public function __construct(Magento_Filesystem $filesystem) { + $this->_filesystem = $filesystem; $this->_localConfigFile = Mage::getBaseDir('etc') . DS . 'local.xml'; } @@ -100,12 +109,12 @@ class Mage_Install_Model_Installer_Config extends Mage_Install_Model_Installer_A $this->_getInstaller()->getDataModel()->setConfigData($data); - $template = file_get_contents(Mage::getBaseDir('etc') . DS . 'local.xml.template'); + $template = $this->_filesystem->read(Mage::getBaseDir('etc') . DS . 'local.xml.template'); foreach ($data as $index => $value) { $template = str_replace('{{' . $index . '}}', '<![CDATA[' . $value . ']]>', $template); } - file_put_contents($this->_localConfigFile, $template); - chmod($this->_localConfigFile, 0777); + $this->_filesystem->write($this->_localConfigFile, $template); + $this->_filesystem->changePermissions($this->_localConfigFile, 0777); } public function getFormData() @@ -175,9 +184,9 @@ class Mage_Install_Model_Installer_Config extends Mage_Install_Model_Installer_A public function replaceTmpInstallDate($date = null) { $stamp = strtotime((string) $date); - $localXml = file_get_contents($this->_localConfigFile); + $localXml = $this->_filesystem->read($this->_localConfigFile); $localXml = str_replace(self::TMP_INSTALL_DATE_VALUE, date('r', $stamp ? $stamp : time()), $localXml); - file_put_contents($this->_localConfigFile, $localXml); + $this->_filesystem->write($this->_localConfigFile, $localXml); return $this; } @@ -187,9 +196,9 @@ class Mage_Install_Model_Installer_Config extends Mage_Install_Model_Installer_A if (!$key) { $key = md5(Mage::helper('Mage_Core_Helper_Data')->getRandomString(10)); } - $localXml = file_get_contents($this->_localConfigFile); + $localXml = $this->_filesystem->read($this->_localConfigFile); $localXml = str_replace(self::TMP_ENCRYPT_KEY_VALUE, $key, $localXml); - file_put_contents($this->_localConfigFile, $localXml); + $this->_filesystem->write($this->_localConfigFile, $localXml); return $this; } diff --git a/app/code/core/Mage/Install/Model/Installer/Console.php b/app/code/core/Mage/Install/Model/Installer/Console.php index f9e12abde3f0d4e0b8ba1695dc546562b0c48b41..914195803d1df27b96a58b852b01d2805389087e 100644 --- a/app/code/core/Mage/Install/Model/Installer/Console.php +++ b/app/code/core/Mage/Install/Model/Installer/Console.php @@ -72,12 +72,20 @@ class Mage_Install_Model_Installer_Console extends Mage_Install_Model_Installer_ */ protected $_dataModel; + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + /** * Constructor + * + * @param Magento_Filesystem $filesystem */ - public function __construct() + public function __construct(Magento_Filesystem $filesystem) { Mage::app(); + $this->_filesystem = $filesystem; $this->_getInstaller()->setDataModel($this->_getDataModel()); } @@ -327,10 +335,8 @@ class Mage_Install_Model_Installer_Console extends Mage_Install_Model_Installer_ /** * Change directories mode to be writable by apache user */ - Varien_Io_File::chmodRecursive(Mage::getBaseDir('var'), 0777); - + $this->_filesystem->changePermissions(Mage::getBaseDir('var'), 0777, true); return $encryptionKey; - } catch (Exception $e) { $this->addError('ERROR: ' . $e->getMessage()); return false; @@ -392,11 +398,11 @@ class Mage_Install_Model_Installer_Console extends Mage_Install_Model_Installer_ $configOptions->getVarDir() . '/report', ); foreach ($dirsToRemove as $dir) { - Varien_Io_File::rmdirRecursive($dir); + $this->_filesystem->delete($dir); } /* Remove local configuration */ - unlink($configOptions->getEtcDir() . '/local.xml'); + $this->_filesystem->delete($configOptions->getEtcDir() . '/local.xml'); return true; } diff --git a/app/code/core/Mage/Install/Model/Installer/Filesystem.php b/app/code/core/Mage/Install/Model/Installer/Filesystem.php index 52daadc397c2565e002a604c7da433933ecb64a0..f738baf205d5cf507b232af7bbcca8319a603400 100644 --- a/app/code/core/Mage/Install/Model/Installer/Filesystem.php +++ b/app/code/core/Mage/Install/Model/Installer/Filesystem.php @@ -40,8 +40,14 @@ class Mage_Install_Model_Installer_Filesystem extends Mage_Install_Model_Install const MODE_READ = 'read'; /**#@- */ - public function __construct() + /** + * @var Magento_Filesystem + */ + protected $_filesystem; + + public function __construct(Magento_Filesystem $filesystem) { + $this->_filesystem = $filesystem; } /** @@ -102,26 +108,35 @@ class Mage_Install_Model_Installer_Filesystem extends Mage_Install_Model_Install */ protected function _checkFullPath($fullPath, $recursive, $existence) { - $res = true; - $setError = $existence && (is_dir($fullPath) && !is_dir_writeable($fullPath) || !is_writable($fullPath)) - || !$existence && file_exists($fullPath) && !is_writable($fullPath); + $result = true; - if ($setError) { - $this->_getInstaller()->getDataModel()->addError( - Mage::helper('Mage_Install_Helper_Data')->__('Path "%s" must be writable.', $fullPath) - ); - $res = false; + if ($recursive && $this->_filesystem->isDirectory($fullPath)) { + $pathsToCheck = $this->_filesystem->getNestedKeys($fullPath); + array_unshift($pathsToCheck, $fullPath); + } else { + $pathsToCheck = array($fullPath); } - if ($recursive && is_dir($fullPath)) { - $skipFileNames = array('.svn', '.htaccess'); - foreach (new DirectoryIterator($fullPath) as $file) { - $fileName = $file->getFilename(); - if (!$file->isDot() && !in_array($fileName, $skipFileNames)) { - $res = $this->_checkFullPath($fullPath . DS . $fileName, $recursive, $existence) && $res; - } + $skipFileNames = array('.svn', '.htaccess'); + foreach ($pathsToCheck as $pathToCheck) { + if (in_array(basename($pathToCheck), $skipFileNames)) { + continue; + } + + if ($existence) { + $setError = !$this->_filesystem->isWritable($fullPath); + } else { + $setError = $this->_filesystem->has($fullPath) && !$this->_filesystem->isWritable($fullPath); + } + + if ($setError) { + $this->_getInstaller()->getDataModel()->addError( + Mage::helper('Mage_Install_Helper_Data')->__('Path "%s" must be writable.', $pathToCheck) + ); + $result = false; } } - return $res; + + return $result; } } diff --git a/app/code/core/Mage/Install/controllers/WizardController.php b/app/code/core/Mage/Install/controllers/WizardController.php index 6cc0475b9d76b83a60b774f12ee3d70aa0ebda8e..c37edd15ce2181fa15d9210e37d2b7b93ae39209 100644 --- a/app/code/core/Mage/Install/controllers/WizardController.php +++ b/app/code/core/Mage/Install/controllers/WizardController.php @@ -53,15 +53,16 @@ class Mage_Install_WizardController extends Mage_Install_Controller_Action */ protected function _verifyTheme() { + /** @var Magento_Filesystem $filesystem */ $pubTheme = Mage::getDesign()->getPublicDir(); - if (is_dir($pubTheme)) { - $isWritable = is_writable($pubTheme); - } else { - $isWritable = @mkdir($pubTheme, 0777, true); - if ($isWritable) { - rmdir($pubTheme); - } + try { + $filesystem = $this->_objectManager->get('Magento_Filesystem'); + $filesystem->setIsAllowCreateDirectories(true); + $filesystem->ensureDirectoryExists($pubTheme, 0777); + $isWritable = $filesystem->isWritable($pubTheme); + } catch (Magento_Filesystem_Exception $e) { + $isWritable = false; } if (!$isWritable) { diff --git a/app/code/core/Mage/Install/view/install/begin.phtml b/app/code/core/Mage/Install/view/install/begin.phtml index 2a2d246d16ef735dcd48eb4b4f9adb6fde9e02ff..209050a18b5f958d94ec2d8017d583a73f9a4603 100644 --- a/app/code/core/Mage/Install/view/install/begin.phtml +++ b/app/code/core/Mage/Install/view/install/begin.phtml @@ -54,7 +54,7 @@ //<![CDATA[ (function($) { head.js("<?php echo $this->getViewFileUrl('Mage_Install::js/install.js') ?>", function() { - $('#agree').begin({submitButtonSelector: '#submitButton'}); + $.mage.install.begin('#agree', '#submitButton'); }); })(jQuery); //]]> diff --git a/app/code/core/Mage/Install/view/install/config.phtml b/app/code/core/Mage/Install/view/install/config.phtml index d971354f3ad1e1f7bbabe21c6537264920c9b26e..645d6036b86d5b3ad9b5e0f838732a26eb924173 100644 --- a/app/code/core/Mage/Install/view/install/config.phtml +++ b/app/code/core/Mage/Install/view/install/config.phtml @@ -49,7 +49,7 @@ <label for="base_url"><?php echo $this->__('Base URL') ?> <span class="required">*</span></label><br/> <input type="text" name="config[unsecure_base_url]" id="base_url" value="<?php echo $this->getFormData()->getUnsecureBaseUrl() ?>" - title="<?php echo $this->__('Base URL') ?>" data-validate="{required:true,validateUrl:true}" + title="<?php echo $this->__('Base URL') ?>" data-validate="{required:true,'validate-url':true}" class="input-text"/> </li> <li> @@ -57,7 +57,7 @@ class="required">*</span></label><br/> <input type="text" name="config[backend_frontname]" id="backend_frontname" value="<?php echo $this->getFormData()->getBackendFrontname() ?>" - title="<?php echo $this->__('Admin Path') ?>" data-validate="{required:true,validateData:true}" + title="<?php echo $this->__('Admin Path') ?>" data-validate="{required:true,'validate-data':true}" class="input-text"/> <p style="margin-top:4px; line-height:1.3em; color:#666;"> @@ -112,7 +112,7 @@ <input type="text" name="config[secure_base_url]" id="secure_base_url" value="<?php echo $this->getFormData()->getSecureBaseUrl() ?>" title="<?php echo $this->__('Secure Base URL') ?>" - data-validate="{required:true,validateUrl:true}" class="required-entry validate-url input-text"/> + data-validate="{required:true,'validate-url':true}" class="input-text"/> <p style="margin-top:4px; line-height:1.3em; color:#666;"> <small><?php echo $this->__('Provide a complete base URL for SSL connection. For example: %s', '<strong>https://www.mydomain.com/magento/</strong>') ?></small> @@ -157,15 +157,11 @@ <script type="text/javascript"> (function ($) { head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", "<?php echo $this->getViewFileUrl('Mage_Install::js/install.js') ?>", function() { - $('#form-validate').configure({ - useSecureSelector: '#use_secure', - useSecureOptionsSelector: '#use_secure_options' - }); + $.mage.install.configureForm('#form-validate', '#use_secure', '#use_secure_options'); }); })(jQuery); </script> @@ -177,9 +173,9 @@ <script type="text/javascript"> (function($) { head.js("<?php echo $this->getViewFileUrl('Mage_Install::js/install.js')?>", function() { - $('#btn-continue').configure({ - url: '<?php echo $this->getUrl('*/*/*', array('_current' => true)) ?>' - }); + $.mage.install.configureContinue( + '#btn-continue', '<?php echo $this->getUrl('*/*/*', array('_current' => true)) ?>' + ); }); })(jQuery); </script> diff --git a/app/code/core/Mage/Install/view/install/create_admin.phtml b/app/code/core/Mage/Install/view/install/create_admin.phtml index 8196af835a278befb9d07bad17e57d3ea015c0ea..57999d2f569e3dae7f891208be6918a81b0e7001 100644 --- a/app/code/core/Mage/Install/view/install/create_admin.phtml +++ b/app/code/core/Mage/Install/view/install/create_admin.phtml @@ -61,7 +61,7 @@ <input type="text" name="admin[email]" id="email_address" value="<?php echo $this->getFormData()->getEmail() ?>" title="<?php echo $this->__('Email Address') ?>" - data-validate="{required:true,validateEmail:true}" class="input-text"/> + data-validate="{required:true,'validate-email':true}" class="input-text"/> </li> </ul> </fieldset> @@ -81,7 +81,7 @@ class="required">*</span></label><br/> <input type="password" name="admin[new_password]" id="password" title="<?php echo $this->__('Password') ?>" - data-validate="{required:true,validateAdminPassword:true}" class="input-text"/> + data-validate="{required:true,'validate-admin-password':true}" class="input-text"/> </div> <div class="input-box"> <label for="confirmation"><?php echo $this->__('Confirm Password') ?> <span @@ -116,12 +116,11 @@ <script type="text/javascript"> (function ($) { head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", "<?php echo $this->getViewFileUrl('Mage_Install::js/install.js') ?>", function() { - $('#form-validate').createAdmin(); + $.mage.install.createAdmin('#form-validate'); }); })(jQuery); </script> diff --git a/app/code/core/Mage/Install/view/install/css/mage-js-style.css b/app/code/core/Mage/Install/view/install/css/mage-js-style.css index 53838d666167cff4cddef4d22ce7f99ae7e1a23a..1738d9ae86b25e96f6038ab65b9cc868f4d60811 100644 --- a/app/code/core/Mage/Install/view/install/css/mage-js-style.css +++ b/app/code/core/Mage/Install/view/install/css/mage-js-style.css @@ -33,6 +33,6 @@ button.mage-disabled { button.mage-enabled { background: #f18200; cursor: pointer; - color: #FFFFFF; + color: #C73615; } diff --git a/app/code/core/Mage/Install/view/install/db/mysql4.phtml b/app/code/core/Mage/Install/view/install/db/mysql4.phtml index 9fcb4dd58b9ae02559df74fb0aa1af777caa416f..2a14ffef76f984e234268fe33ea7fc6692fb88c5 100644 --- a/app/code/core/Mage/Install/view/install/db/mysql4.phtml +++ b/app/code/core/Mage/Install/view/install/db/mysql4.phtml @@ -57,7 +57,7 @@ <li> <div class="input-box"> <label for="prefix"><?php echo $this->__('Tables Prefix') ?></label><br /> - <input type="text" name="connection[<?php echo $this->getIdPrefix()?>][db_prefix]" id="prefix" value="<?php echo $this->getFormData()->getDbPrefix() ?>" title="<?php echo $this->__('Tables Prefix') ?>" data-validate="{validateData:true}" class="input-text" /> + <input type="text" name="connection[<?php echo $this->getIdPrefix()?>][db_prefix]" id="prefix" value="<?php echo $this->getFormData()->getDbPrefix() ?>" title="<?php echo $this->__('Tables Prefix') ?>" data-validate="{'validate-data':true}" class="input-text" /> <p style="margin-top:4px; line-height:1.3em; color:#666;"> <small><?php echo $this->__('(Optional. Leave blank for no prefix)') ?></small> </p> diff --git a/app/code/core/Mage/Install/view/install/js/install.js b/app/code/core/Mage/Install/view/install/js/install.js index c93c0071f9882b3fa6a36481a3fc9c3a4fcf0137..dbcdc0733199b60a9e232b26e48f11e754c40132 100644 --- a/app/code/core/Mage/Install/view/install/js/install.js +++ b/app/code/core/Mage/Install/view/install/js/install.js @@ -24,66 +24,75 @@ */ /*jshint browser:true jquery:true */ (function($) { - $.widget('mage.begin', { - /** - * Beginning phase of the installation process. Check the box to agree to Terms and - * Conditions, License, etc. and then click the Continue button. - */ - _create: function() { - this.element.on('click', $.proxy(function(e) { - var btn = $(this.options.submitButtonSelector); - if (e.target.checked) { - btn.removeClass('mage-disabled').addClass('mage-enabled') - .removeAttr('disabled'); - } else { - btn.removeClass('mage-enabled').addClass('mage-disabled') - .attr('disabled', 'disabled'); - } - }, this)); - } - }); + $.extend(true, $.mage, { + install: { + /** + * Beginning phase of the installation process. Check the box to agree to Terms and + * Conditions, License, etc. and then click the Continue button. + * @param {string} agreeBox Selector for the agree checkbox + * @param {string} submitButton Selector for the submit button + */ + begin: function(agreeBox, submitButton) { + $(agreeBox).on('click', function(e) { + var btn = $(submitButton); + if (e.target.checked) { + btn.removeClass('mage-disabled').addClass('mage-enabled') + .removeAttr('disabled'); + } else { + btn.removeClass('mage-enabled').addClass('mage-disabled') + .attr('disabled', 'disabled'); + } + }); + }, - $.widget('mage.configure', { - /** - * Configuration phase. Prompt for hostname, database information, and options, - * such as whether to enable SSL, referred to as secure options. - */ - _create: function() { - if (this.options.url) { - this.element.on('click', $.proxy(function() { - location.href = this.options.url; - }, this)); - } else { - this.element.mage().validate(); - $(this.options.useSecureSelector).on('click', $.proxy(function(e) { + /** + * Configuration phase. Prompt for hostname, database information, and options, + * such as whether to enable SSL, referred to as secure options. + * @param {string} form Selector for the configuration form + * @param {string} useSecure Selector for the 'Use Secure (SSL)' checkbox + * @param {string} useSecureOptions Selector for the secure (SSL) options content + */ + configureForm: function(form, useSecure, useSecureOptions) { + $(form).validation(); + $(useSecure).on('click', function(e) { return e.target.checked ? - $(this.options.useSecureOptionsSelector).show() : - $(this.options.useSecureOptionsSelector).hide(); - }, this)); - } - } - }); + $(useSecureOptions).show() : $(useSecureOptions).hide(); + }); + }, - $.widget('mage.createAdmin', { - /** - * Create backend administrator login form validation. Enter user's name, email, - * admin username, and password. Validate the form. - */ - _create: function() { - this.element.mage().validate({errorClass: 'mage-error', errorElement: 'div'}); - } - }); + /** + * Configure phase. Happens when an error occurs and intervention is needed. Prompts + * the user to fix the issue and click a Continue button to proceed. + * @param {string} continueButton Selector for the continue button + * @param {string} url The URL to proceed to next after clicking the button + */ + configureContinue: function(continueButton, url) { + $(continueButton).on('click', function() { + location.href = url; + }); + }, - $.widget('mage.setLocale', { - /** - * Generate a new URL whenever a different locale is selected and refresh the - * page to that new locale based URL. - */ - _create: function() { - this.element.on('change', $.proxy(function() { - location.href = this.options.url + 'locale/' + this.element.val() + - '/?timezone=' + $('#timezone').val() + '&currency=' + $('#currency').val(); - }, this)); + /** + * Create backend administrator login form validation. Enter user's name, email, + * admin username, and password. Validate the form. + * @param {string} form Selector for the administrator form + */ + createAdmin: function(form) { + $(form).validation(); + }, + + /** + * Generate a new URL whenever a different locale is selected and refresh the + * page to that new locale based URL. + * @param {string} localeField Selector for the locale input field + * @param {string} url Partial URL used to construct full URL to change the locale + */ + changeLocale: function(localeField, url) { + $(localeField).on('change', function() { + location.href = url + 'locale/' + $(localeField).val() + '/?timezone=' + + $('#timezone').val() + '&currency=' + $('#currency').val(); + }); + } } }); })(jQuery); diff --git a/app/code/core/Mage/Install/view/install/locale.phtml b/app/code/core/Mage/Install/view/install/locale.phtml index c91ee4517a7c78c2b8e685578239463ebbf1889f..f31c6c1d04eb58d52035372b5747ad017d1dd05a 100644 --- a/app/code/core/Mage/Install/view/install/locale.phtml +++ b/app/code/core/Mage/Install/view/install/locale.phtml @@ -66,7 +66,7 @@ <script type="text/javascript"> (function($) { head.js("<?php echo $this->getViewFileUrl('Mage_Install::js/install.js') ?>", function() { - $('#locale').setLocale({url: '<?php echo $this->getChangeUrl();?>'}); + $.mage.install.changeLocale('#locale', '<?php echo $this->getChangeUrl();?>'); }); })(jQuery); </script> diff --git a/app/code/core/Mage/Install/view/install/page.phtml b/app/code/core/Mage/Install/view/install/page.phtml index 616870bc38f9670a7e2a6eeef9eddecafaa7f696..6cbe9dbfcf6b69b2281cca7aea490135314f46cd 100644 --- a/app/code/core/Mage/Install/view/install/page.phtml +++ b/app/code/core/Mage/Install/view/install/page.phtml @@ -39,9 +39,8 @@ <link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.min.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.min.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/head.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.cookie.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.custom.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('head.load.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/mage.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/translate.js') ?>"></script> diff --git a/app/code/core/Mage/Newsletter/Model/Queue/Options/Status.php b/app/code/core/Mage/Newsletter/Model/Queue/Options/Status.php new file mode 100644 index 0000000000000000000000000000000000000000..08dd7d2932abcdd9d2f0d01be10f78e6cf8a170c --- /dev/null +++ b/app/code/core/Mage/Newsletter/Model/Queue/Options/Status.php @@ -0,0 +1,67 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Newsletter + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Newsletter Queue statuses option array + * + * @category Mage + * @package Mage_Newsletter + * @author Magento Core Team <core@magentocommerce.com> + */ + +class Mage_Newsletter_Model_Queue_Options_Status implements Mage_Core_Model_Option_ArrayInterface +{ + /** + * Newsletter Helper Data + * + * @var Mage_Newsletter_Helper_Data + */ + protected $_helper; + + /** + * @param Mage_Newsletter_Helper_Data $newsletterHelper + */ + public function __construct(Mage_Newsletter_Helper_Data $newsletterHelper) + { + $this->_helper = $newsletterHelper; + } + + /** + * Return statuses option array + * + * @return array + */ + public function toOptionArray() + { + return array( + Mage_Newsletter_Model_Queue::STATUS_SENT => $this->_helper->__('Sent'), + Mage_Newsletter_Model_Queue::STATUS_CANCEL => $this->_helper->__('Cancelled'), + Mage_Newsletter_Model_Queue::STATUS_NEVER => $this->_helper->__('Not Sent'), + Mage_Newsletter_Model_Queue::STATUS_SENDING => $this->_helper->__('Sending'), + Mage_Newsletter_Model_Queue::STATUS_PAUSE => $this->_helper->__('Paused'), + ); + } +} diff --git a/app/code/core/Mage/Newsletter/Model/Resource/Queue/Grid/Collection.php b/app/code/core/Mage/Newsletter/Model/Resource/Queue/Grid/Collection.php new file mode 100644 index 0000000000000000000000000000000000000000..fc64347d351e2e9c8213dd43ea378790a1dedf04 --- /dev/null +++ b/app/code/core/Mage/Newsletter/Model/Resource/Queue/Grid/Collection.php @@ -0,0 +1,47 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Newsletter + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +/** + * Newsletter queue data grid collection + * + * @category Mage + * @package Mage_Newsletter + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Newsletter_Model_Resource_Queue_Grid_Collection + extends Mage_Newsletter_Model_Resource_Queue_Collection +{ + /** + * @return Mage_Newsletter_Model_Resource_Queue_Grid_Collection + */ + protected function _initSelect() + { + parent::_initSelect(); + $this->addSubscribersInfo(); + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Newsletter/etc/config.xml b/app/code/core/Mage/Newsletter/etc/config.xml index d5cf4eeded9321e35c171a13bfc75fbdff22b55d..a9d92123d5e85c8f19d26d2b2ca3a6867ecb6838 100644 --- a/app/code/core/Mage/Newsletter/etc/config.xml +++ b/app/code/core/Mage/Newsletter/etc/config.xml @@ -98,6 +98,13 @@ </Mage_Newsletter> </modules> </translate> + <layout> + <updates> + <newsletters module="Mage_Newsletter"> + <file>layout.xml</file> + </newsletters> + </updates> + </layout> </adminhtml> <frontend> <events> diff --git a/app/code/core/Mage/Newsletter/view/adminhtml/layout.xml b/app/code/core/Mage/Newsletter/view/adminhtml/layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..8bca1fb9728032a2afa7b8798f32effda532f071 --- /dev/null +++ b/app/code/core/Mage/Newsletter/view/adminhtml/layout.xml @@ -0,0 +1,132 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout> + <adminhtml_newsletter_queue_index> + <update handle="adminhtml_newsletter_queue_grid_block" /> + <reference name='content'> + <block type='Mage_Backend_Block_Template' template="Mage_Newsletter::queue/list.phtml" name='adminhtml.newsletter.queue.grid.container' /> + </reference> + </adminhtml_newsletter_queue_index> + + <adminhtml_newsletter_queue_grid> + <update handle="formkey"/> + <update handle="adminhtml_newsletter_queue_grid_block" /> + <container name='adminhtml.newsletter.queue.grid.container' label='Newsletter Queue Container' output='1'/> + </adminhtml_newsletter_queue_grid> + + <adminhtml_newsletter_queue_grid_block> + <reference name='adminhtml.newsletter.queue.grid.container'> + <block type="Mage_Backend_Block_Widget_Grid" name="adminhtml.newsletter.queue.grid" as='grid'> + <arguments> + <id>queueGrid</id> + <dataSource type='object'>Mage_Newsletter_Model_Resource_Queue_Grid_Collection</dataSource> + <default_sort>start_at</default_sort> + <default_dir>DESC</default_dir> + <save_parameters_in_session>1</save_parameters_in_session> + <use_ajax>1</use_ajax> + </arguments> + <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.newsletter.queue.grid.columnSet' as='grid.columnSet'> + <arguments> + <rowUrl> + <path>*/*/edit</path> + <extraParamsTemplate> + <id>getId</id> + </extraParamsTemplate> + </rowUrl> + </arguments> + <block type='Mage_Backend_Block_Widget_Grid_Column' as='queue_id'> + <arguments> + <header translate='true' module='Mage_Newsletter'>ID</header> + <index>queue_id</index> + <width>10px</width> + </arguments> + </block> + <block type='Mage_Backend_Block_Widget_Grid_Column' as='start_at'> + <arguments> + <header translate='true' module='Mage_Newsletter'>Queue Start</header> + <type>datetime</type> + <index>queue_start_at</index> + <gmtoffset>1</gmtoffset> + <default> ---- </default> + </arguments> + </block> + <block type='Mage_Backend_Block_Widget_Grid_Column' as='finish_at'> + <arguments> + <header translate='true' module='Mage_Newsletter'>Queue Finish</header> + <type>datetime</type> + <index>queue_finish_at</index> + <gmtoffset>1</gmtoffset> + <default> ---- </default> + </arguments> + </block> + <block type='Mage_Backend_Block_Widget_Grid_Column' as='newsletter_subject'> + <arguments> + <header translate='true' module='Mage_Newsletter'>Subject</header> + <index>newsletter_subject</index> + </arguments> + </block> + <block type='Mage_Backend_Block_Widget_Grid_Column' as='status'> + <arguments> + <header translate='true' module='Mage_Newsletter'>Status</header> + <index>queue_status</index> + <type>options</type> + <options type='options'>Mage_Newsletter_Model_Queue_Options_Status</options> + <width>100px</width> + </arguments> + </block> + + + <block type='Mage_Backend_Block_Widget_Grid_Column' as='subscribers_sent'> + <arguments> + <header translate='true' module='Mage_Newsletter'>Processed</header> + <type>number</type> + <index>subscribers_sent</index> + </arguments> + </block> + <block type='Mage_Backend_Block_Widget_Grid_Column' as='subscribers_total'> + <arguments> + <header translate='true' module='Mage_Newsletter'>Recipients</header> + <type>number</type> + <index>subscribers_total</index> + </arguments> + </block> + <block type='Mage_Backend_Block_Widget_Grid_Column' as='action'> + <arguments> + <header translate='true' module='Mage_Newsletter'>Action</header> + <filter>0</filter> + <sortable>0</sortable> + <no_link>1</no_link> + <width>100px</width> + <renderer>Mage_Adminhtml_Block_Newsletter_Queue_Grid_Renderer_Action</renderer> + </arguments> + </block> + </block> + </block> + </reference> + </adminhtml_newsletter_queue_grid_block> +</layout> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/queue/list.phtml b/app/code/core/Mage/Newsletter/view/adminhtml/queue/list.phtml similarity index 96% rename from app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/queue/list.phtml rename to app/code/core/Mage/Newsletter/view/adminhtml/queue/list.phtml index b03f835d63c3b2957f00cc0a2d6258069535c438..44de7d319ba8c9f2d3ce8a53e4f6c1b1b54b914c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/queue/list.phtml +++ b/app/code/core/Mage/Newsletter/view/adminhtml/queue/list.phtml @@ -35,5 +35,5 @@ </table> </div> <div> - <?php echo $this->getChildHtml('grid') ?> + <?php echo $this->getChildHtml('grid'); ?> </div> diff --git a/app/code/core/Mage/Newsletter/view/frontend/newsletter.js b/app/code/core/Mage/Newsletter/view/frontend/newsletter.js index 19f38129624a68d0ea3bd504823b56443ccdd524..010a1e46a986b9d377476940d4148912c5a9549c 100644 --- a/app/code/core/Mage/Newsletter/view/frontend/newsletter.js +++ b/app/code/core/Mage/Newsletter/view/frontend/newsletter.js @@ -30,7 +30,7 @@ }, _create: function() { $(this.options.formSelector) - .mage().validate({ errorClass: this.options.errorClass }); + .validation({errorClass: this.options.errorClass}); this.element.on('click', $.proxy(function(e) { if ($(e.target).val() === this.options.placeholder) { $(e.target).val(''); diff --git a/app/code/core/Mage/Newsletter/view/frontend/subscribe.phtml b/app/code/core/Mage/Newsletter/view/frontend/subscribe.phtml index 72835d326529d234f489fa5d6ca781f21005b489..b4983c3a38e0ab8ee8a2ccc896d1823afc6d1306 100644 --- a/app/code/core/Mage/Newsletter/view/frontend/subscribe.phtml +++ b/app/code/core/Mage/Newsletter/view/frontend/subscribe.phtml @@ -37,7 +37,7 @@ <input type="text" name="email" id="newsletter" title="<?php echo $this->__('Sign up for our newsletter') ?>" value="<?php echo $this->__('Enter your email address') ?>" - class="input-text" data-validate="{required:true,validateEmail:true}"/> + class="input-text" data-validate="{required:true, 'validate-email':true}"/> </div> <div class="actions"> <button type="submit" title="<?php echo $this->__('Subscribe') ?>" class="button"> @@ -49,10 +49,9 @@ //<![CDATA[ (function($) { head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", "<?php echo $this->getViewFileUrl('Mage_Newsletter::newsletter.js')?>", function() { $('#newsletter').newsletter({ formSelector: '#newsletter-validate-detail', diff --git a/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Consumer/Edit.php b/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Consumer/Edit.php index 10d7ed84ba497a310840f1ad6aa208f5ff799e2a..07f257d7bf4e59869f62db3fc90f53b04be55142 100644 --- a/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Consumer/Edit.php +++ b/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Consumer/Edit.php @@ -67,8 +67,10 @@ class Mage_Oauth_Block_Adminhtml_Oauth_Consumer_Edit extends Mage_Adminhtml_Bloc $this->_addButton('save_and_continue', array( 'label' => Mage::helper('Mage_Oauth_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), 100); diff --git a/app/code/core/Mage/Oauth/view/adminhtml/authorize/form/login.phtml b/app/code/core/Mage/Oauth/view/adminhtml/authorize/form/login.phtml index dc3f4948a9ce62849bb88897fdc3722d2566aba3..3b6275ab1d4ca08cb7e25f6b8e5458835f8f7bab 100644 --- a/app/code/core/Mage/Oauth/view/adminhtml/authorize/form/login.phtml +++ b/app/code/core/Mage/Oauth/view/adminhtml/authorize/form/login.phtml @@ -55,7 +55,7 @@ </fieldset> </form> <script type="text/javascript"> - jQuery('#login-form').form().validation(); + jQuery('#login-form').mage('form').mage('validation'); </script> <?php endif; ?> </div> diff --git a/app/code/core/Mage/Page/Block/Html/Header.php b/app/code/core/Mage/Page/Block/Html/Header.php index ac32788191ecafeb65cf68734e96ca4f93ac0024..a89d872ed6c92ef0ca1650a166585a64940d659a 100644 --- a/app/code/core/Mage/Page/Block/Html/Header.php +++ b/app/code/core/Mage/Page/Block/Html/Header.php @@ -38,6 +38,24 @@ class Mage_Page_Block_Html_Header extends Mage_Core_Block_Template */ protected $_configOptions; + /** + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Core_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem + * @param Mage_Core_Model_Config_Options $configOptions + * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ public function __construct( Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, @@ -50,6 +68,7 @@ class Mage_Page_Block_Html_Header extends Mage_Core_Block_Template Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_Config_Options $configOptions, array $data = array() ) { @@ -65,6 +84,7 @@ class Mage_Page_Block_Html_Header extends Mage_Core_Block_Template $storeConfig, $frontController, $helperFactory, + $filesystem, $data ); $this->_configOptions = $configOptions; diff --git a/app/code/core/Mage/Page/view/frontend/css/tabs.css b/app/code/core/Mage/Page/view/frontend/css/tabs.css new file mode 100644 index 0000000000000000000000000000000000000000..d0d774cf710b46c2f59871d0d73d5d8a75cb7362 --- /dev/null +++ b/app/code/core/Mage/Page/view/frontend/css/tabs.css @@ -0,0 +1,69 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category tabs style + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +div.ui-tabs { + padding: 0 0 20px 0; +} +div.ui-tabs > ul { + padding-left: 5px; +} +div.ui-tabs li { + position: relative; + z-index: 98; + display:inline-block; + border: 1px solid #ccc; + margin: 0 3px; + padding: 7px 10px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + background-color: #f7f7f7; +} +div.ui-tabs li.ui-tabs-active { + background-color: #fff; + border-bottom: 1px solid #fff; + z-index: 100; +} +div.ui-tabs .ui-state-hover > a { + color: #444; +} +div.ui-tabs > ul a { + text-decoration: none; + color: #777; + font-size: 1.1em; +} +div.ui-tabs .ui-tabs-active > a { + color: #444; +} + +div.ui-tabs > div { + position: relative; + border: 1px solid #CCC; + padding: 20px; + z-index: 99; + font-size: 1.1em; +} diff --git a/app/code/core/Mage/Page/view/frontend/html/head.phtml b/app/code/core/Mage/Page/view/frontend/html/head.phtml index 36c65f0de27a2ed70be22a1e9400eb9c32b187ab..6018d7f5abfed01185547f6104c2973b30ec5014 100644 --- a/app/code/core/Mage/Page/view/frontend/html/head.phtml +++ b/app/code/core/Mage/Page/view/frontend/html/head.phtml @@ -31,7 +31,6 @@ <meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>"/> <link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon"/> <link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon"/> -<link rel="stylesheet" href="<?php echo $this->getViewFileUrl('jquery/ui/css/jquery-ui.css')?>" type="text/css" media="all"/> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('Mage_Page::css/validate.css') ?>" type="text/css" media="all"/> <?php echo $this->getCssJsHtml() ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/core/Mage/Page/view/frontend/html/notices.phtml b/app/code/core/Mage/Page/view/frontend/html/notices.phtml index 72e5741803312b4e7b791b89f2638454c6c0f4c2..4298a9136b668d9fbd99b968023e6a02c5607c49 100644 --- a/app/code/core/Mage/Page/view/frontend/html/notices.phtml +++ b/app/code/core/Mage/Page/view/frontend/html/notices.phtml @@ -50,25 +50,22 @@ <div class="global-site-notice notice-cookie" id="notice-cookie-block" style="display: none"> <div class="notice-inner"> <p><?php echo $this->__('This website requires cookies to provide all of its features. For more information on what data is contained in the cookies, please see our <a href="%s">Privacy Policy page</a>. To accept cookies from this site, please click the Allow button below.', $this->getPrivacyPolicyLink()) ?></p> - <div class="actions"><button class="button"><span><span><?php echo $this->__('Allow');?></span></span></button></div> + <div class="actions"><button id="btn-cookie-allow" class="button"><span><span><?php echo $this->__('Allow');?></span></span></button></div> </div> </div> <script type="text/javascript"> // <![CDATA[ (function($) { - $.mage.event.observe('mage.nocookies.initialize', function(e, o) { - o.cookieBlockSelector = '#notice-cookie-block'; - o.cookieAllowButtonSelector = '#notice-cookie-block > .notice-inner > .actions > .button'; - o.cookieName = '<?php echo Mage_Core_Helper_Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?>'; - o.cookieValue = '<?php echo Mage::helper('Mage_Core_Helper_Cookie')->getAcceptedSaveCookiesWebsiteIds() ?>'; - o.cookieExpires = new Date(new Date().getTime() + <?php echo Mage::helper('Mage_Core_Helper_Cookie')->getCookieRestrictionLifetime() ?> * 1000); - o.noCookiesUrl = '<?php echo Mage::getUrl('cms/index/noCookies') ?>'; - }); - $.mage.load.jsSync( - "<?php echo $this->getViewFileUrl('jquery/jquery.cookie.js')?>", - "<?php echo $this->getViewFileUrl('Mage_Page::js/cookies.js')?>", - "<?php echo $this->getViewFileUrl('Mage_Page::js/notices.js')?>" - ); + head.js("<?php echo $this->getViewFileUrl('mage/cookies.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Page::js/notices.js')?>", function() { + $('#notice-cookie-block').cookieBlock({ + cookieAllowButtonSelector: '#btn-cookie-allow', + cookieName: '<?php echo Mage_Core_Helper_Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?>', + cookieValue: '<?php echo Mage::helper('Mage_Core_Helper_Cookie')->getAcceptedSaveCookiesWebsiteIds() ?>', + cookieLifetime: <?php echo Mage::helper('Mage_Core_Helper_Cookie')->getCookieRestrictionLifetime()?>, + noCookiesUrl: '<?php echo Mage::getUrl('cms/index/noCookies') ?>' + }); + }); })(jQuery); // ]]> </script> diff --git a/app/code/core/Mage/Page/view/frontend/js/cookie.phtml b/app/code/core/Mage/Page/view/frontend/js/cookie.phtml index 74f5fda5be475ddb215d1c724ab81f44c2dacdd6..dc01e80875e2ab71a174c2ee78308211d8a2f715 100644 --- a/app/code/core/Mage/Page/view/frontend/js/cookie.phtml +++ b/app/code/core/Mage/Page/view/frontend/js/cookie.phtml @@ -35,14 +35,16 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - $.mage.event.observe('mage.cookie.initialize', function (e, o) { - o.path = '<?php echo $this->getPath()?>', - o.domain = '<?php echo $this->getDomain()?>' + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.cookie.js') ?>", + "<?php echo $this->getViewFileUrl('mage/cookies.js') ?>", function() { + $.extend($.mage.cookies.defaults, { + expires: null, + path: '<?php echo $this->getPath()?>', + domain: '<?php echo $this->getDomain()?>', + secure: false + }); + $.extend($.cookie.defaults, $.mage.cookies.defaults); }); - $.mage.load.jsSync( - "<?php echo $this->getViewFileUrl('jquery/jquery.cookie.js') ?>", - "<?php echo $this->getViewFileUrl('Mage_Page::js/cookie.js') ?>" - ); })(jQuery); //]]> </script> diff --git a/app/code/core/Mage/PageCache/view/frontend/js/cookie.js b/app/code/core/Mage/Page/view/frontend/js/global.js similarity index 58% rename from app/code/core/Mage/PageCache/view/frontend/js/cookie.js rename to app/code/core/Mage/Page/view/frontend/js/global.js index e764025caa0d0b88c3c39d101fa1d87e6241cf9e..9ce6ad31db722b7b4f959451fe402a97189e7ea4 100644 --- a/app/code/core/Mage/PageCache/view/frontend/js/cookie.js +++ b/app/code/core/Mage/Page/view/frontend/js/global.js @@ -17,24 +17,30 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category PageCache - * @package js + * @category Mage + * @package Mage_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/*jshint browser:true jquery:true*/ -(function ($) { - $(document).ready(function () { - var _data = { - cookieName: undefined, - cookieLifetime: undefined, - cookieExpireAt: null - }; - $.mage.event.trigger('mage.nocachecookie.initialize', _data); - if (_data.cookieLifetime > 0) { - _data.cookieExpireAt = new Date(); - _data.cookieExpireAt.setTime(_data.cookieExpireAt.getTime() + _data.cookieLifetime * 1000); - } - $.mage.cookies.set(_data.cookieName, 1, _data.cookieExpireAt); - }); +/*jshint evil:true */ +// Temporary solution, will be replaced when plug-in "mage" will be merged to master +(function($){ + "use strict"; + var bootstrap = function() { + $('[data-mage-init]').each(function(){ + var inits = $(this).data('mage-init') || {}; + // in case it's not well-formed JSON inside data attribute, evaluate it manually + if (typeof inits === 'string') { + try { + inits = eval('(' + inits + ')'); + } catch (e) { + inits = {}; + } + } + $.each(inits, $.proxy(function(key, args){ + $(this)[key].apply($(this), $.makeArray(args)); + }, this)); + }); + }; + $(document).ready(bootstrap); })(jQuery); diff --git a/app/code/core/Mage/Page/view/frontend/js/notices.js b/app/code/core/Mage/Page/view/frontend/js/notices.js index 1eaf9dd46c60267f86ad3469ab6563a33591a76c..eada7010038329faf2a948258c95d84782ac69bd 100644 --- a/app/code/core/Mage/Page/view/frontend/js/notices.js +++ b/app/code/core/Mage/Page/view/frontend/js/notices.js @@ -24,26 +24,18 @@ */ /*jshint browser:true jquery:true*/ (function ($) { - $(document).ready(function () { - var _data = { - cookieBlockSelector: undefined, - cookieAllowButtonSelector: undefined, - cookieName: undefined, - cookieValue: undefined, - cookieExpires: undefined, - noCookiesUrl: undefined - }; - - $.mage.event.trigger('mage.nocookies.initialize', _data); - - $(_data.cookieBlockSelector).show(); - $(_data.cookieAllowButtonSelector).on('click', function () { - $.mage.cookies.set(_data.cookieName, _data.cookieValue, _data.cookieExpires); - if ($.mage.cookies.get(_data.cookieName)) { - window.location.reload(); - } else { - window.location.href = _data.noCookiesUrl; - } - }); + $.widget('mage.cookieBlock', { + _create: function() { + this.element.show(); + $(this.options.cookieAllowButtonSelector).on('click', $.proxy(function() { + var cookieExpires = new Date(new Date().getTime() + this.options.cookieLifetime * 1000); + $.mage.cookies.set(this.options.cookieName, this.options.cookieValue, {expires: cookieExpires}); + if ($.mage.cookies.get(this.options.cookieName)) { + window.location.reload(); + } else { + window.location.href = this.options.noCookiesUrl; + } + }, this)); + } }); })(jQuery); diff --git a/app/code/core/Mage/Page/view/frontend/js/popup-menu.js b/app/code/core/Mage/Page/view/frontend/js/popup-menu.js new file mode 100644 index 0000000000000000000000000000000000000000..a4cd598fb3387194118feb951703178db391cb3d --- /dev/null +++ b/app/code/core/Mage/Page/view/frontend/js/popup-menu.js @@ -0,0 +1,141 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category popup-menu + * @package js + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +(function($) { + $.widget('mage.popUpMenu', { + options: { + eventClass: 'faded', // Class applied to popUpMenu with mouseleave/mouseenter events. + fadeDuration: 'slow', // Duration for the fade effect when popUpMenu is shown/hidden. + hideOnClick: true, // Hides the popUpMenu when click anywhere in the document body. + menu: '', // Selector for the popUpMenu (e.g. <ul>). + onMouseEnter: null, // Function called when mouseenter event is triggered on popUpMenu. + onMouseLeave: null, // Function called when mouseleave event is triggered on popUpMenu. + openedClass: 'list-opened', // Class applied to switcher when popUpMenu is shown/hidden. + switcher: 'span.switcher', // Selector for the popUpMenu switcher. + timeoutDuration: 2000 // Duration before popUpMenu is hidden after mouseleave event. + }, + + /** + * Add click event to the switcher. Add blur, mouseenter/mouseleave events to the + * containing element. + * @private + */ + _create: function() { + this.switcher = this.element.find(this.options.switcher) + .on('click', $.proxy(this._toggleMenu, this)); + var eventMap = { + mouseenter: $.proxy(this.options.onMouseEnter, this), + mouseleave: $.proxy(this.options.onMouseLeave, this) + }; + if (this.options.hideOnClick) { + eventMap.blur = $.proxy(this._hide, this); + } + this.element.on(eventMap); + $(this.options.menu).find('a').on('click', $.proxy(this._hide, this)); + }, + + /** + * Custom method for defining options during instantiation. User-provided options + * override the options returned by this method which override the default options. + * @private + * @return {Object} Object containing options for mouseenter/mouseleave events. + */ + _getCreateOptions: function() { + return {onMouseEnter: this._onMouseEnter, onMouseLeave: this._onMouseLeave}; + }, + + /** + * Hide the popup menu using a fade effect. + * @private + */ + _hide: function(){ + $(this.options.menu).fadeOut(this.options.fadeDuration, $.proxy(this._stopTimer, this)); + this.switcher.removeClass(this.options.openedClass); + }, + + /** + * Show the popup menu using a fade effect and put focus on the containing element for + * the blur event. + * @private + */ + _show: function() { + $(this.options.menu) + .removeClass(this.options.eventClass).fadeIn(this.options.fadeDuration); + this.switcher.addClass(this.options.openedClass); + if (this.options.hideOnClick) { + this.element.focus(); + } + }, + + /** + * Stop (clear) the timeout. + * @private + */ + _stopTimer: function() { + clearTimeout(this.timer); + }, + + /** + * Determines whether the popup menu is open (show) or closed (hide). + * @private + * @return boolean Returns true if open, false otherwise. + */ + _isOpened: function() { + return this.switcher.hasClass(this.options.openedClass); + }, + + /** + * Mouseleave event on the popup menu. Add faded class and set appropriate timeout. + * @private + */ + _onMouseLeave: function() { + if (this._isOpened()) { + $(this.options.menu).addClass(this.options.eventClass); + this._stopTimer(); + this.timer = setTimeout($.proxy(this._hide, this), this.options.timeoutDuration); + } + }, + + /** + * Mouseenter event on the popup menu. Reset the timer and remove the faded class. + * @private + */ + _onMouseEnter: function() { + if (this._isOpened()) { + this._stopTimer(); + $(this.options.menu).removeClass(this.options.eventClass); + } + }, + + /** + * Toggle the state of the popup menu. Open it (show) or close it (hide). + * @private + * @return {*} + */ + _toggleMenu: function() { + return this[this._isOpened() ? '_hide' : '_show'](); + } + }); +})(jQuery); diff --git a/app/code/core/Mage/Page/view/frontend/layout_addons.xml b/app/code/core/Mage/Page/view/frontend/layout_addons.xml index 15c711e2d5d617df25d379380b5e276e861cd524..302f29b9adb57d8aba6f338b2ed02a111e914ada 100644 --- a/app/code/core/Mage/Page/view/frontend/layout_addons.xml +++ b/app/code/core/Mage/Page/view/frontend/layout_addons.xml @@ -40,13 +40,15 @@ <action method="addCss"><file>mage/calendar.css</file><params/></action> <action method="addJs"><file>jquery/jquery.min.js</file></action> <action method="addJs"><file>mage/jquery-no-conflict.js</file></action> - <action method="addJs"><file>jquery/head.js</file></action> + <action method="addJs"><file>head.load.min.js</file></action> <action method="addJs"><file>mage/mage.js</file></action> <action method="addJs"><file>mage/decorate.js</file></action> <action method="addJs"><file>mage/translate.js</file></action> - <action method="addJs"><file>Mage_Page::js/cookies.js</file></action> - <action method="addJs"><file>jquery/jquery-ui.min.js</file></action> + <action method="addJs"><file>mage/cookies.js</file></action> + <action method="addJs"><file>jquery/jquery-ui.custom.min.js</file></action> <action method="addJs"><file>jquery/jquery.tmpl.min.js</file></action> + <action method="addJs"><file>Mage_Page::js/global.js</file></action> + <action method="addCss"><file>Mage_Page::css/tabs.css</file><params/></action> <action method="addJs"><file>mage/loader.js</file></action> </reference> </default> diff --git a/app/code/core/Mage/PageCache/view/frontend/cookie.phtml b/app/code/core/Mage/PageCache/view/frontend/cookie.phtml index 047f574ae5e1522655bbbec1f2046b46f1912df6..e7487def5fc85a317239c378dbe9ac73d39cc7a1 100644 --- a/app/code/core/Mage/PageCache/view/frontend/cookie.phtml +++ b/app/code/core/Mage/PageCache/view/frontend/cookie.phtml @@ -28,15 +28,13 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - $.mage.event.observe('mage.nocachecookie.initialize', function(e, o) { - o.cookieName = '<?php echo Mage_PageCache_Helper_Data::NO_CACHE_COOKIE ?>' - o.cookieLifetime = <?php echo Mage::helper('Mage_PageCache_Helper_Data')->getNoCacheCookieLifetime() ?>; - o.cookieExpireAt = $.cookie.defaults.expires; + head.js("<?php echo $this->getViewFileUrl('mage/cookies.js')?>", function() { + $.mage.cookies.set( + '<?php echo Mage_PageCache_Helper_Data::NO_CACHE_COOKIE ?>', + 1, + {lifetime: <?php echo Mage::helper('Mage_PageCache_Helper_Data')->getNoCacheCookieLifetime() ?>} + ) }); - $.mage.load.jsSync( - "<?php echo $this->getViewFileUrl('Mage_Page::js/cookies.js')?>", - "<?php echo $this->getViewFileUrl('Mage_PageCache::js/cookie.js')?>" - ); })(jQuery); //]]> </script> diff --git a/app/code/core/Mage/Persistent/view/frontend/customer/form/login.phtml b/app/code/core/Mage/Persistent/view/frontend/customer/form/login.phtml index 13ba3dd925c71fe3f176cd3c430114a05549cd21..6861d70fbd6e8f194c2f681ecd686a798aa64dd1 100644 --- a/app/code/core/Mage/Persistent/view/frontend/customer/form/login.phtml +++ b/app/code/core/Mage/Persistent/view/frontend/customer/form/login.phtml @@ -53,13 +53,13 @@ <li> <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label> <div class="input-box"> - <input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" /> + <input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text" title="<?php echo $this->__('Email Address') ?>" data-validate="{required:true, 'validate-email':true}" /> </div> </li> <li> <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label> <div class="input-box"> - <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" /> + <input type="password" name="login[password]" class="input-text" id="pass" title="<?php echo $this->__('Password') ?>" data-validate="{required:true, 'validate-password':true}" /> </div> </li> <?php echo $this->getChildHtml('form.additional.info'); ?> @@ -88,8 +88,16 @@ <?php endif; ?> </form> <script type="text/javascript"> - //<![CDATA[ - var dataForm = new VarienForm('login-form', true); - //]]> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#login-form .new-users button').on('click', function() {window.location='<?php echo Mage::helper('Mage_Persistent_Helper_Data')->getCreateAccountUrl($this->getCreateAccountUrl()) ?>';}); + $('#login-form').validation(); + }); + })(jQuery); </script> </div> diff --git a/app/code/core/Mage/Persistent/view/frontend/customer/form/register.phtml b/app/code/core/Mage/Persistent/view/frontend/customer/form/register.phtml index aed59f6694cccc32a4daee70248d662029ddbc1a..0ff598a3835213e5ba3165284139a91a722d23a5 100644 --- a/app/code/core/Mage/Persistent/view/frontend/customer/form/register.phtml +++ b/app/code/core/Mage/Persistent/view/frontend/customer/form/register.phtml @@ -50,7 +50,7 @@ <li> <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label> <div class="input-box"> - <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email" data-validate="{required:true,validateEmail:true}" /> + <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}" /> </div> </li> <?php if ($this->isNewsletterEnabled()): ?> @@ -122,11 +122,6 @@ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;"> <option value=""><?php echo $this->__('Please select region, state or province') ?></option> </select> - <script type="text/javascript"> - //<![CDATA[ - $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>"); - //]]> - </script> <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('Mage_Customer_Helper_Address')->getAttributeValidationClass('region') ?>" style="display:none;" /> </div> </div> @@ -135,7 +130,7 @@ <div class="field"> <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label> <div class="input-box"> - <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('Mage_Customer_Helper_Address')->getAttributeValidationClass('postcode') ?>" /> + <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text <?php echo $this->helper('Mage_Customer_Helper_Address')->getAttributeValidationClass('postcode') ?>" /> </div> </div> <div class="field"> @@ -157,13 +152,13 @@ <div class="field"> <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label> <div class="input-box"> - <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" data-validate="{required:true,validatePassword:true}"/> + <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text" data-validate="{required:true, 'validate-password':true}"/> </div> </div> <div class="field"> <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label> <div class="input-box"> - <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" data-validate="{required:true, equalTo:'#password'}"/> + <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text" data-validate="{required:true, equalTo:'#password'}"/> </div> </div> </li> @@ -181,23 +176,47 @@ <input name="context" type="hidden" value="checkout" /> <?php endif; ?> </form> - <script type="text/javascript"> - (function ($) { - $.mage.event.observe('mage.register.initialize', function (event, initData) { - initData.formSelector = '#form-validate'; - initData.dobInputSelector = '#dob'; - initData.dobSelector = '.customer-dob'; - initData.dobDaySelector = '#day'; - initData.dobMonthSelector = '#month'; - initData.dobYearSelector = '#year'; - }); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Customer::register.js') ?>"); + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Checkout::js/region-updater.js') ?>", + <?php if ($_dob->isEnabled()): ?> + "<?php echo $this->getViewFileUrl('mage/validation/dob-rule.js') ?>", + <?php endif ?> + function() { + var dataForm = $('#form-validate').validation({ + <?php if ($_dob->isEnabled()): ?> + errorPlacement: function(error, element) { + if (element.prop('id') === 'dob') { + var dobElement = $('.customer-dob'), + errorClass = error.prop('class'); + error.insertAfter(element.parent()); + dobElement.find('.validate-custom').addClass(errorClass) + .after('<div class="' + errorClass + '"></div>'); + } + else { + error.insertAfter(element); + } + }, + ignore: ':hidden:not(#dob)' + <?php endif ?> + }); + <?php if($this->getShowAddressFields()): ?> + $('#country').regionUpdater({ + regionListId: '#region_id', + regionInputId: '#region', + postcodeId: '#zip', + form: dataForm, + regionJson: <?php echo $this->helper('Mage_Directory_Helper_Data')->getRegionJson() ?>, + defaultRegion: "<?php echo $this->getFormData()->getRegionId() ?>", + countriesWithOptionalZip: <?php echo $this->helper('Mage_Directory_Helper_Data')->getCountriesWithOptionalZip(true) ?> + }); + <?php endif; ?> + }); })(jQuery); </script> </div> diff --git a/app/code/core/Mage/Persistent/view/frontend/remember-me-popup.js b/app/code/core/Mage/Persistent/view/frontend/remember-me-popup.js new file mode 100644 index 0000000000000000000000000000000000000000..2e04ae6ee6cf224dcb4aca0d063b9756ef8206b5 --- /dev/null +++ b/app/code/core/Mage/Persistent/view/frontend/remember-me-popup.js @@ -0,0 +1,106 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category frontend Persistent remember me popup + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +(function ($) { + $.widget('mage.rememberMePopup', { + options: { + closeBtn: '.btn-close', + windowOverlayTemplate: '<div class="window-overlay"></div>', + popupBlockTemplate: '<div class="popup-block block popup-remember-tip active">' + + '<div class="block-title">' + + '<strong>${title}</strong>' + + '<div class="btn-close"></div>' + + '</div>' + + '<div class="block-content">' + + '<p>${content}</p>' + + '<div class="buttons-set">' + + '<button class="button btn-close" type="button">' + + '<span>' + + '<span>Close</span>' + + '</span>' + + '</button>' + + '</div>' + + '</div>' + + '</div>' + }, + + _create: function() { + this._renderWindowOverLay(); + this._renderPopupBlock(); + $('body').append(this.windowOverlay.hide()); + $('body').append(this.popupBlock.hide()); + this.element.find('a').on('click', $.proxy(this._showPopUp, this)); + }, + + /** + * Add windowOverlay block to body + * If windowOverlay is not an option, use default template + * @private + */ + _renderWindowOverLay: function() { + if (this.options.windowOverlay) { + this.windowOverlay = $(this.options.windowOverlay); + } else { + $.template('windowOverlayTemplate', this.options.windowOverlayTemplate); + this.windowOverlay = $.tmpl('windowOverlayTemplate').hide(); + } + this.windowOverlay.height($('body').height()); + }, + + /** + * Add popupBlock to body + * If popupBlock is not an option, use default template + * @private + */ + _renderPopupBlock: function() { + if (this.options.popupBlock) { + this.popupBlock = $(this.options.popupBlock); + } else { + $.template('popupBlockTemplate', this.options.popupBlockTemplate); + this.popupBlock = $.tmpl('popupBlockTemplate', + {title: this.options.title, content: this.options.content}); + } + this.popupBlock.find(this.options.closeBtn).on('click', $.proxy(this._hidePopUp, this)); + }, + + /** + * show windowOverlay and popupBlock + * @private + */ + _showPopUp: function() { + this.windowOverlay.show(); + this.popupBlock.show(); + }, + + /** + * hide windowOverlay and popupBlock + * @private + */ + _hidePopUp: function() { + this.windowOverlay.hide(); + this.popupBlock.hide(); + } + }); +})(jQuery); \ No newline at end of file diff --git a/app/code/core/Mage/Persistent/view/frontend/remember_me_tooltip.phtml b/app/code/core/Mage/Persistent/view/frontend/remember_me_tooltip.phtml index 7aa4d27ddb46c8c99914348aaecd08d17fc76287..bcdb25eb85ce2c3cfb0c9d3b83e7f9f0ba309422 100644 --- a/app/code/core/Mage/Persistent/view/frontend/remember_me_tooltip.phtml +++ b/app/code/core/Mage/Persistent/view/frontend/remember_me_tooltip.phtml @@ -45,28 +45,15 @@ </div> </div> <script type="text/javascript"> -//<![CDATA[ - function toggleRememberMepopup(event){ - if($('remember-me-popup')){ - var viewportHeight = document.viewport.getHeight(), - docHeight = $$('body')[0].getHeight(), - height = docHeight > viewportHeight ? docHeight : viewportHeight; - $('remember-me-popup').toggle(); - $('window-overlay').setStyle({ height: height + 'px' }).toggle(); - } - Event.stop(event); - } - - document.observe("dom:loaded", function() { - new Insertion.Bottom($$('body')[0], $('window-overlay')); - new Insertion.Bottom($$('body')[0], $('remember-me-popup')); - - $$('.remember-me-popup-close').each(function(element){ - Event.observe(element, 'click', toggleRememberMepopup); - }) - $$('#remember-me-box a').each(function(element) { - Event.observe(element, 'click', toggleRememberMepopup); - }); - }); -//]]> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('Mage_Persistent::remember-me-popup.js') ?>", + function() { + $('#remember-me-box').rememberMePopup({ + windowOverlay: '#window-overlay', + popupBlock: '#remember-me-popup', + closeBtn: '.remember-me-popup-close' + }); + }); + })(jQuery); </script> diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php b/app/code/core/Mage/Reports/Block/Adminhtml/Refresh/Statistics.php similarity index 83% rename from app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php rename to app/code/core/Mage/Reports/Block/Adminhtml/Refresh/Statistics.php index c5bc4daf199ae03e8bbbd72c6445e90119b64e55..308c0daede241e62c1e750754e2227986f26d028 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php +++ b/app/code/core/Mage/Reports/Block/Adminhtml/Refresh/Statistics.php @@ -19,21 +19,23 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Reports * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml report filter form + * Report Refresh statistic container * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Reports * @author Magento Core Team <core@magentocommerce.com> */ - -class Mage_Adminhtml_Block_Report_Refresh_Statistics extends Mage_Adminhtml_Block_Widget_Grid_Container +class Mage_Reports_Block_Adminhtml_Refresh_Statistics extends Mage_Backend_Block_Widget_Grid_Container { + /* + * Modify Header and remove button "Add" + */ protected function _construct() { $this->_controller = 'report_refresh_statistics'; diff --git a/app/code/core/Mage/Reports/Model/Resource/Refresh/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Refresh/Collection.php new file mode 100644 index 0000000000000000000000000000000000000000..1c8c3e71a0d3772244e6773cabd70f08b81667bf --- /dev/null +++ b/app/code/core/Mage/Reports/Model/Resource/Refresh/Collection.php @@ -0,0 +1,116 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Reports + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +/** + * Refresh Statistic Grid collection + * + * @category Mage + * @package Mage_Report + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Reports_Model_Resource_Refresh_Collection extends Varien_Data_Collection +{ + /** + * Get if updated + * + * @param $reportCode + * @return string|Zend_Date + */ + protected function _getUpdatedAt($reportCode) + { + $flag = Mage::getModel('Mage_Reports_Model_Flag')->setReportFlagCode($reportCode)->loadSelf(); + return ($flag->hasData()) + ? Mage::app()->getLocale() + ->storeDate(0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true) + : ''; + } + + /** + * Load data + * @return Mage_Reports_Model_Resource_Refresh_Collection|Varien_Data_Collection + */ + public function loadData($printQuery = false, $logQuery = false) + { + if (!count($this->_items)) { + $data = array( + array( + 'id' => 'sales', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Orders'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Ordered Report'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_ORDER_FLAG_CODE) + ), + array( + 'id' => 'tax', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Tax'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Order Taxes Report Grouped by Tax Rates'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_TAX_FLAG_CODE) + ), + array( + 'id' => 'shipping', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Shipping'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Shipped Report'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_SHIPPING_FLAG_CODE) + ), + array( + 'id' => 'invoiced', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Invoiced'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Invoiced VS Paid Report'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_INVOICE_FLAG_CODE) + ), + array( + 'id' => 'refunded', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Refunded'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Refunded Report'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_REFUNDED_FLAG_CODE) + ), + array( + 'id' => 'coupons', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Coupons'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Promotion Coupons Usage Report'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_COUPONS_FLAG_CODE) + ), + array( + 'id' => 'bestsellers', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Bestsellers'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Products Bestsellers Report'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_BESTSELLERS_FLAG_CODE) + ), + array( + 'id' => 'viewed', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Most Viewed'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Most Viewed Products Report'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_PRODUCT_VIEWED_FLAG_CODE)), + ); + foreach ($data as $value) { + $item = new Varien_Object(); + $item->setData($value); + $this->addItem($item); + } + } + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Reports/view/adminhtml/layout.xml b/app/code/core/Mage/Reports/view/adminhtml/layout.xml index 66fc2e9238790d446dc2f75685d078b19c9995fb..3cbd9943bb1c6510bfafd5812e999d813b7ea86e 100644 --- a/app/code/core/Mage/Reports/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Reports/view/adminhtml/layout.xml @@ -540,4 +540,76 @@ <update handle="adminhtml_report_review_product_grid"/> <container name="adminhtml.report.review.product.grid.container" label="Export Excel"/> </adminhtml_report_review_exportproductexcel> + + <adminhtml_report_statistics_index> + <reference name="content"> + <block type="Mage_Reports_Block_Adminhtml_Refresh_Statistics" name ="adminhtml.block.report.refresh.statistics" > + <block type="Mage_Backend_Block_Widget_Grid" name="adminhtml.block.report.refresh.statistics.grid" as='grid'> + <arguments> + <id>gridRefreshStatistics</id> + <use_ajax>0</use_ajax> + <sortable>0</sortable> + <pager_visibility>0</pager_visibility> + <dataSource type="object">Mage_Reports_Model_Resource_Refresh_Collection</dataSource> + </arguments> + <block type="Mage_Backend_Block_Widget_Grid_Massaction" name="adminhtml.block.refresh.statistics.massactions" as="grid.massaction"> + <arguments> + <massaction_id_field>id</massaction_id_field> + <form_field_name>code</form_field_name> + <use_select_all>1</use_select_all> + <options> + <refresh_lifetime> + <label translate="true" module="Mage_Reports">Refresh Lifetime Statistics</label> + <url>*/*/refreshLifetime</url> + <confirm translate="true" module="Mage_Reports">Are you sure you want to refresh lifetime statistics? There can be performance impact during this operation.</confirm> + </refresh_lifetime> + <refresh_recent> + <label translate="true" module="Mage_Reports">Refresh Statistics for the Last Day</label> + <url>*/*/refreshRecent</url> + <confirm translate="true" module="Mage_Reports">Are you sure you want to refresh statistics for last day?</confirm> + <selected>1</selected> + </refresh_recent> + </options> + </arguments> + </block> + <block type="Mage_Backend_Block_Widget_Grid_ColumnSet" as="grid.columnSet" name="adminhtml.block.reportrefresh.statistics.columnSet"> + <arguments> + <filter_visibility>0</filter_visibility> + <id>gridRefreshStatistics</id> + </arguments> + <block type="Mage_Backend_Block_Widget_Grid_Column" as="report"> + <arguments> + <header translate="true" module="Mage_Reports">Report</header> + <type>string</type> + <width>150</width> + <sortable>0</sortable> + <id>report</id> + <index>report</index> + </arguments> + </block> + <block type="Mage_Backend_Block_Widget_Grid_Column" as="comment"> + <arguments> + <header translate="true" module="Mage_Reports">Description</header> + <type>string</type> + <sortable>0</sortable> + <id>comment</id> + <index>comment</index> + </arguments> + </block> + <block type="Mage_Backend_Block_Widget_Grid_Column" as="updated_at"> + <arguments> + <header translate="true" module="Mage_Reports">Updated At</header> + <type>datetime</type> + <width>200</width> + <sortable>0</sortable> + <id>updated_at</id> + <index>updated_at</index> + <default translate="true" module="Mage_Reports">undefined</default> + </arguments> + </block> + </block> + </block> + </block> + </reference> + </adminhtml_report_statistics_index> </layout> diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag.php b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag.php index aa311350ce665b4f4dcf9ca5e01954e4aa857daa..c9a841d36f904c8d5adda10b29eb2c925c8194b3 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag.php @@ -72,6 +72,7 @@ class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_Authorization $authSession * @param array $data * @@ -88,11 +89,12 @@ class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_Authorization $authSession, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); if (isset($data['helpers'])) { diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer.php b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer.php index 428fd3f7ee9073a6ac444f364d709e7e02425726..857a7fa270275b97061d864eb6a329d03fb7554d 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer.php @@ -72,6 +72,7 @@ class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag_Customer * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory, + * @param Magento_Filesystem $filesystem, * @param Mage_Core_Model_Authorization $authSession * @param array $data * @@ -89,12 +90,12 @@ class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag_Customer Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_Authorization $authSession, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $helperFactory, $data - ); + $storeConfig, $frontController, $helperFactory, $filesystem, $data); if (isset($data['helpers'])) { $this->_helpers = $data['helpers']; diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php b/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php index 0c768570a2983a0e43988dea6cc4617f90efd7fa..9b131ff2b87e47f968ecaf953c7581a7779aad69 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php @@ -66,6 +66,7 @@ class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag extends Mage_Backend_Block_ * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Core_Model_Authorization $authSession * @param array $data * @@ -82,12 +83,12 @@ class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag extends Mage_Backend_Block_ Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Core_Model_Authorization $authSession, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data - ); + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data); $this->_authSession = $authSession; if (isset($data['helpers'])) { diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Edit.php b/app/code/core/Mage/Tag/Block/Adminhtml/Edit.php index d4c023a9a8f75932959b053cb112d00c38650aee..7ad0259a28419c738cf723c08f31c371fecb30eb 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Edit.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Edit.php @@ -57,11 +57,15 @@ class Mage_Tag_Block_Adminhtml_Edit extends Mage_Adminhtml_Block_Widget_Form_Con $this->addButton('save_and_edit_button', array( 'label' => Mage::helper('Mage_Tag_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#edit_form', - 'eventData' => array( - 'action' => array( - 'args' => array('ret' => 'edit', 'continue' => 'index'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'save', + 'target' => '#edit_form', + 'eventData' => array( + 'action' => array( + 'args' => array('ret' => 'edit', 'continue' => 'index'), + ), ), ), ), diff --git a/app/code/core/Mage/Tag/view/adminhtml/tag/edit/container.phtml b/app/code/core/Mage/Tag/view/adminhtml/tag/edit/container.phtml index e28f1e7c26a7b4903691d14e6c9be5b0ccdd25c9..877bb5b8898d625dcb7f4ba70e98b9c38e0793e8 100644 --- a/app/code/core/Mage/Tag/view/adminhtml/tag/edit/container.phtml +++ b/app/code/core/Mage/Tag/view/adminhtml/tag/edit/container.phtml @@ -46,7 +46,8 @@ </div> <?php endif; ?> <script type="text/javascript"> - jQuery('#edit_form').form().validation({validationUrl: '<?php echo $this->getValidationUrl() ?>'}); + jQuery('#edit_form').mage('form') + .mage('validation', {validationUrl: '<?php echo $this->getValidationUrl() ?>'}); </script> <?php echo $this->getFormScripts() ?> <?php echo $this->getAcordionsHtml() ?> diff --git a/app/code/core/Mage/Tag/view/frontend/list.phtml b/app/code/core/Mage/Tag/view/frontend/list.phtml index 728ff6c20dff00fcc3169dadd41de244a880c5aa..924481111bd387652d5b600ddc5f3d816bbaba1f 100644 --- a/app/code/core/Mage/Tag/view/frontend/list.phtml +++ b/app/code/core/Mage/Tag/view/frontend/list.phtml @@ -54,12 +54,10 @@ <script type="text/javascript"> (function($) { head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", - "<?php echo $this->getViewFileUrl('Mage_Tag::list.js')?>", function() { - $('#addTagForm').tags(); + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", function() { + $('#addTagForm').validation(); } ) })(jQuery); diff --git a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit.php b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit.php index 5a188c8f79bd219cad3bf0e75f28e97759863b43..a59442a62f1b6b8b9be153c6a6a3a9f0c52b2287 100644 --- a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit.php +++ b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit.php @@ -42,25 +42,39 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit extends Mage_Backend_B /** @var $theme Mage_Core_Model_Theme */ $theme = Mage::registry('current_theme'); - if ($theme && !$theme->isVirtual()) { - $this->_removeButton('delete'); - $this->_removeButton('save'); - $this->_removeButton('reset'); - } else { - $this->_addButton('save_and_continue', array( - 'label' => $this->__('Save and Continue Edit'), - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), - ), - 'class' => 'save', - ), 1); - - if ($theme->hasChildThemes()) { - $onClick = 'deleteConfirm(\'' . $this->__('Theme contains child themes. Their parent will be modified.') - . ' ' . $this->__('Are you sure you want to do this?') - . '\', \'' . $this->getUrl('*/*/delete', array('id' => $theme->getId())) . '\')'; + if ($theme) { + if ($theme->isEditable()) { + $this->_addButton('save_and_continue', array( + 'label' => $this->__('Save and Continue Edit'), + 'class' => 'save', + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array( + 'event' => 'saveAndContinueEdit', + 'target' => '#edit_form' + ), + ), + ), + ), 1); + } else { + $this->_removeButton('save'); + $this->_removeButton('reset'); + } - $this->_updateButton('delete', 'onclick', $onClick); + if ($theme->isDeletable()) { + if ($theme->hasChildThemes()) { + $message = join(' ', array( + $this->__('Theme contains child themes. Their parent will be modified.'), + $this->__('Are you sure you want to do this?') + )); + $onClick = sprintf("deleteConfirm('%s', '%s')", + $message, + $this->getUrl('*/*/delete', array('id' => $theme->getId())) + ); + $this->_updateButton('delete', 'onclick', $onClick); + } + } else { + $this->_removeButton('delete'); } } diff --git a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Links.php b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Links.php new file mode 100644 index 0000000000000000000000000000000000000000..daf598ade40ef639f66e32f47cae296b736eb974 --- /dev/null +++ b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Links.php @@ -0,0 +1,98 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Theme + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Form element renderer to display link element + */ +class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Form_Element_Links extends Varien_Data_Form_Element_Abstract +{ + /** + * Initialize form element + * + * @param array $attributes + */ + public function __construct($attributes=array()) + { + parent::__construct($attributes); + $this->setType('links'); + } + + /** + * Generates element html + * + * @return string + */ + public function getElementHtml() + { + $html = '<div id="'.$this->getHtmlId().'" ' . $this->serialize($this->getHtmlAttributes()) . '>'."\n"; + + $values = $this->getValues(); + if ($values) { + foreach ($values as $option) { + $html .= $this->_optionToHtml($option); + } + } + + $html.= '</div><br />'."\n"; + $html.= $this->getAfterElementHtml(); + return $html; + } + + /** + * Generate list of links for element content + * + * @param array $option + * @return string + */ + protected function _optionToHtml(array $option) + { + $allowedAttribute = array('href', 'target', 'title', 'style'); + $attributes = array(); + foreach ($option as $title => $value) { + if (!in_array($title, $allowedAttribute)) { + continue; + } + $attributes[] = $title . '="' . $this->_escape($value) . '"'; + } + $html = '<a ' . implode(' ', $attributes) . '>'; + $html .= $this->_escape($option['label']); + $html .= '</a>'; + $html .= isset($option['delimiter']) ? $option['delimiter'] : ''; + return $html; + } + + /** + * Prepare array of anchor attributes + * + * @return array + */ + public function getHtmlAttributes() + { + return array('rel', 'rev', 'accesskey', 'class', 'style', 'tabindex', 'onmouseover', + 'title', 'xml:lang', 'onblur', 'onclick', 'ondblclick', 'onfocus', 'onmousedown', + 'onmousemove', 'onmouseout', 'onmouseup', 'onkeydown', 'onkeypress', 'onkeyup'); + } +} diff --git a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php new file mode 100644 index 0000000000000000000000000000000000000000..9d695ad4fa6225c5bb5bf2e9402c7ba729c7143b --- /dev/null +++ b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php @@ -0,0 +1,448 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Theme + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Theme form, Css editor tab + * + * @method Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css setFiles(array $files) + * @method array getFiles() + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css + extends Mage_Backend_Block_Widget_Form + implements Mage_Backend_Block_Widget_Tab_Interface +{ + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * Uploader service + * + * @var Mage_Theme_Model_Uploader_Service + */ + protected $_uploaderService; + + /** + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_ObjectManager $objectManager + * @param Mage_Theme_Model_Uploader_Service $uploaderService + * @param Magento_Filesystem $filesystem + * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + Magento_ObjectManager $objectManager, + Mage_Theme_Model_Uploader_Service $uploaderService, + Magento_Filesystem $filesystem, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data + ); + $this->_objectManager = $objectManager; + $this->_uploaderService = $uploaderService; + } + + /** + * Create a form element with necessary controls + * + * @return Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css + */ + protected function _prepareForm() + { + $form = new Varien_Data_Form(); + $this->setForm($form); + $this->_addThemeCssFieldset(); + $this->_addCustomCssFieldset(); + + $formData['custom_css_content'] = $this->_getCurrentTheme()->getCustomCssFile()->getContent(); + /** @var $session Mage_Backend_Model_Session */ + $session = $this->_objectManager->get('Mage_Backend_Model_Session'); + $cssFileContent = $session->getThemeCustomCssData(); + if ($cssFileContent) { + $formData['custom_css_content'] = $cssFileContent; + $session->unsThemeCustomCssData(); + } + $form->addValues($formData); + return $this; + } + + /** + * Set theme css fieldset + * + * @return Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css + */ + protected function _addThemeCssFieldset() + { + $form = $this->getForm(); + $themeFieldset = $form->addFieldset('theme_css', array( + 'legend' => $this->__('Theme CSS'), + 'class' => 'fieldset-wide' + )); + $this->_addElementTypes($themeFieldset); + foreach ($this->_getGroupedFiles() as $groupName => $group) { + $themeFieldset->addField('theme_css_view_' . $groupName, 'links', array( + 'label' => $groupName, + 'title' => $groupName, + 'name' => 'links', + 'values' => $group, + )); + } + + return $this; + } + + /** + * Prepare file items for output on page for download + * + * @param string $fileTitle + * @param string $filePath + * @return array + */ + protected function _getThemeCss($fileTitle, $filePath) + { + return array( + 'href' => $this->getUrl('*/*/downloadCss', array( + 'theme_id' => $this->_getCurrentTheme()->getId(), + 'file' => $this->_helperFactory->get('Mage_Theme_Helper_Data')->urlEncode($fileTitle)) + ), + 'label' => $fileTitle, + 'title' => $filePath, + 'delimiter' => '<br />' + ); + } + + /** + * Set custom css fieldset + * + * @return Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css + */ + protected function _addCustomCssFieldset() + { + $form = $this->getForm(); + $themeFieldset = $form->addFieldset('custom_css', array( + 'legend' => $this->__('Custom CSS'), + 'class' => 'fieldset-wide' + )); + + $themeFieldset->addField('css_file_uploader', 'file', array( + 'name' => 'css_file_uploader', + 'label' => $this->__('Select CSS File to Upload'), + 'title' => $this->__('Select CSS File to Upload'), + 'note' => $this->__('Allowed file types *.css.') + . ' ' . $this->__('The file you upload will replace the existing custom.css file (shown below).') + )); + + $themeFieldset->addField('css_uploader_button', 'button', array( + 'name' => 'css_uploader_button', + 'value' => $this->__('Upload CSS File'), + 'disabled' => 'disabled', + )); + + $themeFieldset->addField('custom_css_content', 'textarea', array( + 'label' => $this->__('Edit custom.css'), + 'title' => $this->__('Edit custom.css'), + 'name' => 'custom_css_content', + )); + + return $this; + } + + /** + * Get current theme + * + * @return Mage_Core_Model_Theme + */ + protected function _getCurrentTheme() + { + return Mage::registry('current_theme'); + } + + /** + * Set additional form field type for theme preview image + * + * @return array + */ + protected function _getAdditionalElementTypes() + { + $element = Mage::getConfig() + ->getBlockClassName('Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Form_Element_Links'); + return array('links' => $element); + } + + /** + * Get files by groups + * + * @return array + */ + protected function _getGroupedFiles() + { + $options = Mage::getConfig()->getOptions(); + $jsDir = $options->getJsDir(); + $codeDir = $options->getCodeDir(); + + $groups = array(); + $themes = array(); + foreach ($this->getFiles() as $fileTitle => $filePath) { + /** @var $theme Mage_Core_Model_Theme */ + list($group, $theme) = $this->_getGroup($filePath); + if ($theme) { + $themes[$theme->getThemeId()] = $theme; + } + + if (!isset($groups[$group])) { + $groups[$group] = array(); + } + $groups[$group][] = $this->_getThemeCss($fileTitle, $filePath); + } + + if (count($themes) > 1) { + $this->_sortThemes($themes); + } + + $order = array_merge(array($codeDir, $jsDir), array_map(function ($theme) { + /** @var $theme Mage_Core_Model_Theme */ + return $theme->getThemeId(); + }, $themes)); + $groups = $this->_sortArrayByArray($groups, $order); + + $labels = $this->_getGroupLabels($themes); + foreach ($groups as $key => $group) { + usort($group, array($this, '_sortGroupFiles')); + $groups[$labels[$key]] = $group; + unset($groups[$key]); + } + return $groups; + } + + /** + * Sort files inside group + * + * @param array $item1 + * @param array $item2 + * @return int + */ + protected function _sortGroupFiles ($item1, $item2) + { + $hasModuleContext = strpos($item1['label'], '::') !== false; + $hasModuleContext2 = strpos($item2['label'], '::') !== false; + + if ($hasModuleContext && $hasModuleContext2) { + $result = strcmp($item1['label'], $item2['label']); + } elseif (!$hasModuleContext && !$hasModuleContext2) { + $result = strcmp($item1['label'], $item2['label']); + } elseif ($hasModuleContext) { + //case when first item has module context and second item doesn't + $result = 1; + } else { + //case when second item has module context and first item doesn't + $result = -1; + } + return $result; + } + + /** + * Get group by filename + * + * @param string $filename + * @return array + */ + protected function _getGroup($filename) + { + $options = Mage::getConfig()->getOptions(); + $designDir = $options->getDesignDir(); + $jsDir = $options->getJsDir(); + $codeDir = $options->getCodeDir(); + + $group = null; + $theme = null; + if (substr($filename, 0, strlen($designDir)) == $designDir) { + $theme = $this->_getThemeByFilename($filename); + $group = $theme->getThemeId(); + } elseif (substr($filename, 0, strlen($jsDir)) == $jsDir) { + $group = $jsDir; + } elseif (substr($filename, 0, strlen($codeDir)) == $codeDir) { + $group = $codeDir; + } else { + Mage::throwException($this->__('Invalid view file directory "%s"', $filename)); + } + + return array($group, $theme); + } + + /** + * Sort themes according to their hierarchy + * + * @param array $themes + * @return Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css + */ + protected function _sortThemes(&$themes) + { + uasort($themes, function($theme, $theme2) { + /** @var $theme Mage_Core_Model_Theme */ + /** @var $theme2 Mage_Core_Model_Theme */ + while ($parentTheme = $theme->getParentTheme()) { + if ($parentTheme->getId() == $theme2->getId()) { + return -1; + } + } + return 1; + }); + + return $this; + } + + /** + * Get theme object that contains gien file + * + * @param string $filename + * @return Mage_Core_Model_Theme + */ + protected function _getThemeByFilename($filename) + { + $designDir = Mage::getConfig()->getOptions()->getDesignDir(); + list(, $area, $package, $theme,) = explode('/', substr($filename, strlen($designDir)), 5); + /** @var $collection Mage_Core_Model_Resource_Theme_Collection */ + $collection = Mage::getModel('Mage_Core_Model_Resource_Theme_Collection'); + return $collection->getThemeByFullPath(join('/', array($area, $package, $theme))); + } + + /** + * Get group labels + * + * @param array $themes + * @return array + */ + protected function _getGroupLabels($themes) + { + $labels = array( + Mage::getConfig()->getOptions()->getJsDir() => $this->__('Library files'), + Mage::getConfig()->getOptions()->getCodeDir() => $this->__('Framework files') + ); + foreach ($themes as $theme) { + /** @var $theme Mage_Core_Model_Theme */ + $labels[$theme->getThemeId()] = $this->__('"%s" Theme files', $theme->getThemeTitle()); + } + + return $labels; + } + + /** + * Sort one associative array according to another array + * + * $groups = array( + * b => item2, + * a => item1, + * c => item3, + * ); + * $order = array(a,b,c); + * result: array( + * a => item1, + * b => item2, + * c => item3, + * ) + * + * @param array $groups + * @param array $order + * @return array + */ + protected function _sortArrayByArray($groups, $order) + { + $ordered = array(); + foreach ($order as $key) { + if (array_key_exists($key, $groups)) { + $ordered[$key] = $groups[$key]; + unset($groups[$key]); + } + } + return $ordered + $groups; + } + + /** + * Return Tab label + * + * @return string + */ + public function getTabLabel() + { + return $this->__('CSS Editor'); + } + + /** + * Return Tab title + * + * @return string + */ + public function getTabTitle() + { + return $this->getTabLabel(); + } + + /** + * Can show tab in tabs + * + * @return boolean + */ + public function canShowTab() + { + return $this->_getCurrentTheme()->isVirtual() && $this->_getCurrentTheme()->getId(); + } + + /** + * Tab is hidden + * + * @return boolean + */ + public function isHidden() + { + return false; + } +} diff --git a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php index 50772251437d5cb10b286a3a36a539744d46dbb9..4e98092ae7296d75e3dd81854a1f5cb857a73fed 100644 --- a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php +++ b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php @@ -343,7 +343,7 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General */ protected function _getPreviewImageNote() { - $maxImageSize = Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSizeInMb(); + $maxImageSize = Mage::getObjectManager()->get('Magento_File_Size')->getMaxFileSizeInMb(); if ($maxImageSize) { return $this->__('Max image size %sM', $maxImageSize); } else { diff --git a/app/code/core/Mage/Theme/Helper/Data.php b/app/code/core/Mage/Theme/Helper/Data.php index 781ab22b31f630b533452b80f03fd6d80a58e2c5..70a4531198850482afc683119abe901818b8ef86 100644 --- a/app/code/core/Mage/Theme/Helper/Data.php +++ b/app/code/core/Mage/Theme/Helper/Data.php @@ -29,4 +29,45 @@ */ class Mage_Theme_Helper_Data extends Mage_Core_Helper_Abstract { + /** + * Get CSS files of a given theme + * + * Returned array has a structure + * array( + * 'Mage_Catalog::widgets.css' => 'http://mage2.com/pub/media/theme/frontend/_theme15/en_US/Mage_Cms/widgets.css' + * ) + * + * @param Mage_Core_Model_Theme $theme + * @return array + */ + public function getCssFiles($theme) + { + $arguments = array( + 'area' => $theme->getArea(), + 'theme' => $theme->getId() + ); + /** @var $layoutMerge Mage_Core_Model_Layout_Merge */ + $layoutMerge = Mage::getModel('Mage_Core_Model_Layout_Merge', array('arguments' => $arguments)); + $layoutElement = $layoutMerge->getFileLayoutUpdatesXml(); + + $xpathRefs = '//reference[@name="head"]/action[@method="addCss" or @method="addCssIe"]/*[1]'; + $xpathBlocks = '//block[@type="Mage_Page_Block_Html_Head"]/action[@method="addCss" or @method="addCssIe"]/*[1]'; + $files = array_merge( + $layoutElement->xpath($xpathRefs), + $layoutElement->xpath($xpathBlocks) + ); + + $design = Mage::getDesign(); + $params = array( + 'area' => $theme->getArea(), + 'themeModel' => $theme, + 'skipProxy' => true + ); + $urls = array(); + foreach ($files as $file) { + $urls[(string)$file] = $design->getViewFile($file, $params); + } + + return $urls; + } } diff --git a/app/code/core/Mage/Theme/Model/Uploader/Service.php b/app/code/core/Mage/Theme/Model/Uploader/Service.php new file mode 100644 index 0000000000000000000000000000000000000000..ba6467824bbf589b9df99b17ac11f1e160d807b3 --- /dev/null +++ b/app/code/core/Mage/Theme/Model/Uploader/Service.php @@ -0,0 +1,156 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Theme + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Theme file uploader service + */ +class Mage_Theme_Model_Uploader_Service extends Mage_Core_Model_Abstract +{ + /** + * Css file upload limit + */ + const XML_PATH_CSS_UPLOAD_LIMIT = 'global/theme/css/upload_limit'; + + /** + * Uploaded file path + * + * @var string|null + */ + protected $_filePath; + + /** + * File system helper + * + * @var Varien_Io_File + */ + protected $_fileIo; + + /** + * File size + * + * @var Magento_File_Size + */ + protected $_fileSize; + + /** + * File uploader + * + * @var Mage_Core_Model_File_Uploader + */ + protected $_uploader; + + /** + * @param Mage_Core_Model_Event_Manager $eventDispatcher + * @param Mage_Core_Model_Cache $cacheManager + * @param Varien_Io_File $fileIo + * @param Mage_Core_Model_Resource_Abstract $resource + * @param Varien_Data_Collection_Db $resourceCollection + * @param Magento_File_Size $fileSize + * @param array $data + */ + public function __construct( + Mage_Core_Model_Event_Manager $eventDispatcher, + Mage_Core_Model_Cache $cacheManager, + Varien_Io_File $fileIo, + Magento_File_Size $fileSize, + Mage_Core_Model_Resource_Abstract $resource = null, + Varien_Data_Collection_Db $resourceCollection = null, + array $data = array() + ) { + $this->_fileIo = $fileIo; + $this->_fileSize = $fileSize; + parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data); + } + + /** + * Upload css file + * + * @param string $type + * @return Mage_Theme_Model_Uploader_Service + */ + public function uploadCssFile($type) + { + /** @var $fileUploader Mage_Core_Model_File_Uploader */ + $fileUploader = Mage::getObjectManager()->get('Mage_Core_Model_File_Uploader', array($type)); + $fileUploader->setAllowedExtensions(array('css')); + $fileUploader->setAllowRenameFiles(true); + $fileUploader->setAllowCreateFolders(true); + + $this->_validateCssMaxFileSize($fileUploader->getFileSize()); + + $file = $fileUploader->validateFile(); + $this->setFilePath($file['tmp_name']); + return $this; + } + + /** + * Get uploaded file content + * + * @return string + */ + public function getFileContent() + { + return $this->_fileIo->read($this->getFilePath()); + } + + /** + * Get css upload max size + * + * @return int + */ + public function getCssUploadMaxSize() + { + $maxCssUploadSize = $this->_fileSize->convertSizeToInteger( + (string)Mage::getConfig()->getNode(self::XML_PATH_CSS_UPLOAD_LIMIT) + ); + $maxIniUploadSize = $this->_fileSize->getMaxFileSize(); + return min($maxCssUploadSize, $maxIniUploadSize); + } + + /** + * Get css upload max size in megabytes + * + * @return float + */ + public function getCssUploadMaxSizeInMb() + { + return $this->_fileSize->getFileSizeInMb($this->getCssUploadMaxSize()); + } + + /** + * Validate CSS max file size + * + * @param int $fileSize + * @return Mage_Theme_Model_Uploader_Service + */ + protected function _validateCssMaxFileSize($fileSize) + { + if ($fileSize > $this->getCssUploadMaxSize()) { + Mage::throwException("File size should be less than {$this->getCssUploadMaxSizeInMb()}M."); + } + return $this; + } +} diff --git a/app/code/core/Mage/Theme/controllers/Adminhtml/System/Design/ThemeController.php b/app/code/core/Mage/Theme/controllers/Adminhtml/System/Design/ThemeController.php index f33d9f3a033177271845fb0fb8f1e7c3728299c5..d78ec42811c0f0f4377e2fab70e5fd249545d48b 100644 --- a/app/code/core/Mage/Theme/controllers/Adminhtml/System/Design/ThemeController.php +++ b/app/code/core/Mage/Theme/controllers/Adminhtml/System/Design/ThemeController.php @@ -29,12 +29,46 @@ */ class Mage_Theme_Adminhtml_System_Design_ThemeController extends Mage_Adminhtml_Controller_Action { + /** + * Theme service model + * + * @var Mage_Theme_Model_Uploader_Service + */ + protected $_serviceModel; + + /** + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Controller_Response_Http $response + * @param string $areaCode + * @param Magento_ObjectManager $objectManager + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Layout_Factory $layoutFactory + * @param Mage_Theme_Model_Uploader_Service $service + * @param array $invokeArgs + */ + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Controller_Response_Http $response, + $areaCode = null, + Magento_ObjectManager $objectManager, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Layout_Factory $layoutFactory, + Mage_Theme_Model_Uploader_Service $service, + array $invokeArgs = array() + ) { + $this->_serviceModel = $service; + + parent::__construct($request, $response, $areaCode, $objectManager, $frontController, $layoutFactory, + $invokeArgs + ); + } + /** * Index action */ public function indexAction() { - Mage::dispatchEvent('theme_registration_from_filesystem'); + $this->_objectManager->get('Mage_Core_Model_Event_Manager')->dispatch('theme_registration_from_filesystem'); $this->loadLayout(); $this->_setActiveMenu('Mage_Theme::system_design_theme'); $this->renderLayout(); @@ -64,7 +98,7 @@ class Mage_Theme_Adminhtml_System_Design_ThemeController extends Mage_Adminhtml_ { $themeId = (int) $this->getRequest()->getParam('id'); /** @var $theme Mage_Core_Model_Theme */ - $theme = Mage::getModel('Mage_Core_Model_Theme'); + $theme = $this->_objectManager->create('Mage_Core_Model_Theme'); try { if ($themeId && !$theme->load($themeId)->getId()) { Mage::throwException($this->__('Theme was not found.')); @@ -72,6 +106,16 @@ class Mage_Theme_Adminhtml_System_Design_ThemeController extends Mage_Adminhtml_ Mage::register('current_theme', $theme); $this->loadLayout(); + + /** @var $tab Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css */ + $tab = $this->getLayout()->getBlock('theme_edit_tabs_tab_css_tab'); + if ($tab && $tab->canShowTab()) { + /** @var $helper Mage_Theme_Helper_Data */ + $helper = $this->_objectManager->get('Mage_Theme_Helper_Data'); + + $files = $helper->getCssFiles($theme); + $tab->setFiles($files); + } $this->_setActiveMenu('Mage_Adminhtml::system_design_theme'); $this->renderLayout(); } catch (Mage_Core_Exception $e) { @@ -79,7 +123,7 @@ class Mage_Theme_Adminhtml_System_Design_ThemeController extends Mage_Adminhtml_ $this->_redirect('*/*/'); } catch (Exception $e) { $this->_getSession()->addError($this->__('The theme was not found.')); - Mage::logException($e); + $this->_objectManager->get('Mage_Core_Model_Logger')->logException($e); $this->_redirect('*/*/'); } } @@ -91,20 +135,27 @@ class Mage_Theme_Adminhtml_System_Design_ThemeController extends Mage_Adminhtml_ { $redirectBack = (bool)$this->getRequest()->getParam('back', false); /** @var $theme Mage_Core_Model_Theme */ - $theme = Mage::getModel('Mage_Core_Model_Theme'); + $theme = $this->_objectManager->create('Mage_Core_Model_Theme'); + /** @var $themeCss Mage_Core_Model_Theme_Files_Css */ + $themeCss = $this->_objectManager->create('Mage_Core_Model_Theme_Files_Css'); try { if ($this->getRequest()->getPost()) { $themeData = $this->getRequest()->getParam('theme'); + $customCssData = $this->getRequest()->getParam('custom_css_content'); + $theme->saveFormData($themeData); + $themeCss->saveFormData($theme, $customCssData); + $this->_getSession()->addSuccess($this->__('The theme has been saved.')); } } catch (Mage_Core_Exception $e) { $this->_getSession()->addError($e->getMessage()); $this->_getSession()->setThemeData($themeData); + $this->_getSession()->setThemeCustomCssData($customCssData); $redirectBack = true; } catch (Exception $e) { $this->_getSession()->addError('The theme was not saved'); - Mage::logException($e); + $this->_objectManager->get('Mage_Core_Model_Logger')->logException($e); } $redirectBack ? $this->_redirect('*/*/edit', array('id' => $theme->getId())) : $this->_redirect('*/*/'); } @@ -118,14 +169,24 @@ class Mage_Theme_Adminhtml_System_Design_ThemeController extends Mage_Adminhtml_ $themeId = $this->getRequest()->getParam('id'); try { if ($themeId) { - Mage::getModel('Mage_Core_Model_Theme')->load($themeId)->delete(); + /** @var $theme Mage_Core_Model_Theme */ + $theme = $this->_objectManager->create('Mage_Core_Model_Theme')->load($themeId); + if (!$theme->getId()) { + throw new InvalidArgumentException($this->__('Theme with id "%d" is not found.', $themeId)); + } + if (!$theme->isVirtual()) { + throw new InvalidArgumentException( + $this->__('Only virtual theme is possible to delete.', $themeId) + ); + } + $theme->delete(); $this->_getSession()->addSuccess($this->__('The theme has been deleted.')); } } catch (Mage_Core_Exception $e) { $this->_getSession()->addError($e->getMessage()); } catch (Exception $e) { $this->_getSession()->addException($e, $this->__('Cannot delete the theme.')); - Mage::logException($e); + $this->_objectManager->get('Mage_Core_Model_Logger')->logException($e); } /** * @todo Temporary solution. Theme module should not know about the existence of editor module. @@ -133,6 +194,59 @@ class Mage_Theme_Adminhtml_System_Design_ThemeController extends Mage_Adminhtml_ $redirectBack ? $this->_redirect('*/system_design_editor/index/') : $this->_redirect('*/*/'); } + /** + * Upload css file + */ + public function uploadCssAction() + { + $serviceModel = $this->_serviceModel; + try { + $cssFileContent = $serviceModel->uploadCssFile('css_file_uploader')->getFileContent(); + $result = array('error' => false, 'content' => $cssFileContent); + } catch (Mage_Core_Exception $e) { + $result = array('error' => true, 'message' => $e->getMessage()); + } catch (Exception $e) { + $result = array('error' => true, 'message' => $this->__('Cannot upload css file')); + $this->_objectManager->get('Mage_Core_Model_Logger')->logException($e); + } + $this->getResponse()->setBody($this->_objectManager->get('Mage_Core_Helper_Data')->jsonEncode($result)); + } + + /** + * Download css file + */ + public function downloadCssAction() + { + $themeId = $this->getRequest()->getParam('theme_id'); + $file = $this->getRequest()->getParam('file'); + + /** @var $helper Mage_Theme_Helper_Data */ + $helper = $this->_objectManager->get('Mage_Theme_Helper_Data'); + $fileName = $helper->urlDecode($file); + try { + /** @var $theme Mage_Core_Model_Theme */ + $theme = $this->_objectManager->create('Mage_Core_Model_Theme')->load($themeId); + if (!$theme->getId()) { + throw new InvalidArgumentException($this->__('Theme with id "%d" is not found.', $themeId)); + } + + $themeCss = $helper->getCssFiles($theme); + if (!isset($themeCss[$fileName])) { + throw new InvalidArgumentException( + $this->__('Css file "%s" is not in the theme with id "%d".', $fileName, $themeId) + ); + } + + $this->_prepareDownloadResponse($fileName, array( + 'type' => 'filename', + 'value' => $themeCss[$fileName] + )); + } catch (Exception $e) { + $this->_getSession()->addException($e, $this->__('File "%s" is not found.', $fileName)); + $this->_redirectUrl($this->_getRefererUrl()); + } + } + /** * Check the permission to manage themes * @@ -140,6 +254,6 @@ class Mage_Theme_Adminhtml_System_Design_ThemeController extends Mage_Adminhtml_ */ protected function _isAllowed() { - return Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed('Mage_Theme::theme'); + return $this->_objectManager->get('Mage_Core_Model_Authorization')->isAllowed('Mage_Theme::theme'); } } diff --git a/app/code/core/Mage/Theme/etc/config.xml b/app/code/core/Mage/Theme/etc/config.xml index f3df55fd4eb731021d12dd495f76eb5e1f10d626..fe7f4b0dd17f85f4ef145e66e0b93b0d7b0a5b39 100644 --- a/app/code/core/Mage/Theme/etc/config.xml +++ b/app/code/core/Mage/Theme/etc/config.xml @@ -33,6 +33,13 @@ <codePool>core</codePool> </Mage_Theme> </modules> + <global> + <theme> + <css> + <upload_limit>2M</upload_limit> + </css> + </theme> + </global> <admin> <routers> <adminhtml> diff --git a/app/code/core/Mage/Theme/view/adminhtml/system/design/form.js b/app/code/core/Mage/Theme/view/adminhtml/js/form.js similarity index 100% rename from app/code/core/Mage/Theme/view/adminhtml/system/design/form.js rename to app/code/core/Mage/Theme/view/adminhtml/js/form.js diff --git a/app/code/core/Mage/Theme/view/adminhtml/layout.xml b/app/code/core/Mage/Theme/view/adminhtml/layout.xml index 162f25daef94d89d607509edd6d66cebbe482f7f..417502ee3405a82904602dad47de15baea09960c 100644 --- a/app/code/core/Mage/Theme/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Theme/view/adminhtml/layout.xml @@ -42,17 +42,26 @@ <adminhtml_system_design_theme_edit> <reference name="head"> - <action method="addJs"><file>Mage_Theme::system/design/form.js</file></action> + <action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.iframe-transport.js</file></action> + <action method="addJs"><file>Mage_Adminhtml::jquery/fileUploader/jquery.fileupload.js</file></action> + + <action method="addJs"><file>Mage_Theme::js/form.js</file></action> </reference> <reference name="content"> <block type="Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit" name="theme_edit"/> </reference> <reference name="left"> <block type="Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tabs" name="theme_edit_tabs"> + <block template="tabs/css.phtml" type="Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css" + name="theme_edit_tabs_tab_css_tab" /> + <action method="addTab"> <name>general_section</name> <block>Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General</block> </action> + <action method="addTab"> + <name>css_tab</name> + <block>theme_edit_tabs_tab_css_tab</block></action> </block> </reference> </adminhtml_system_design_theme_edit> diff --git a/app/code/core/Mage/Theme/view/adminhtml/tabs/css.phtml b/app/code/core/Mage/Theme/view/adminhtml/tabs/css.phtml new file mode 100644 index 0000000000000000000000000000000000000000..50a3be32295deef9c10c8dd83d5ac84119431790 --- /dev/null +++ b/app/code/core/Mage/Theme/view/adminhtml/tabs/css.phtml @@ -0,0 +1,82 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package Mage_DesignEditor + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> + +<?php /** @var $this Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_Css */ ?> + +<?php echo $this->getFormHtml(); ?> + +<script type="text/javascript"> + (function ($) { + + $( '#css_file_uploader' ).fileupload({ + dataType: 'json', + replaceFileInput: false, + url : '<?php echo $this->getUrl('*/system_design_theme/uploadcss') ?>', + + /** + * Add data + * @param e + * @param data + */ + add: function (e, data) { + var uploadButton = $('#css_uploader_button'); + /** Unbind click event on file change */ + uploadButton.unbind('click'); + uploadButton.removeAttr('disabled'); + + uploadButton.click(function () { + $('#messages').html(''); + $(this).attr('disabled', 'disabled'); + data.submit(); + }); + }, + + /** + * On done event + * @param e + * @param data + */ + done: function (e, data) { + var contentArea = $('#custom_css_content'); + $(this).val(''); + + $('#css_uploader_button').attr('disabled', 'disabled'); + + if (!data.result.error) { + contentArea.trigger('focusin'); + contentArea.val(data.result.content); + contentArea.trigger('focusout'); + } + } + }); + + $(document).on('beforeSubmit', function() { + $('#css_file_uploader').val(''); + }); + + })(jQuery); +</script> diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php index 9d49cee29c3495bf8d4cf465bfacb6cc4b782ef8..4cd7276e7c57df7306c3fe35a7fefb6b800f2273 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php @@ -1214,9 +1214,9 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_International { $rawRequest = $this->_request; - $originRegion = (string)$this->getCountryParams( + $originRegion = $this->getCountryParams( Mage::getStoreConfig(Mage_Shipping_Model_Shipping::XML_PATH_STORE_COUNTRY_ID, $this->getStore()) - )->region; + )->getRegion(); if (!$originRegion) { Mage::throwException(Mage::helper('Mage_Usa_Helper_Data')->__('Wrong Region.')); @@ -1288,7 +1288,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_International $nodeConsignee->addChild('PostalCode', $rawRequest->getRecipientAddressPostalCode()); $nodeConsignee->addChild('CountryCode', $rawRequest->getRecipientAddressCountryCode()); $nodeConsignee->addChild('CountryName', - (string)$this->getCountryParams($rawRequest->getRecipientAddressCountryCode())->name + $this->getCountryParams($rawRequest->getRecipientAddressCountryCode())->getName() ); $nodeContact = $nodeConsignee->addChild('Contact'); $nodeContact->addChild('PersonName', substr($rawRequest->getRecipientContactPersonName(), 0, 34)); @@ -1347,7 +1347,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_International $nodeShipper->addChild('PostalCode', $rawRequest->getShipperAddressPostalCode()); $nodeShipper->addChild('CountryCode', $rawRequest->getShipperAddressCountryCode()); $nodeShipper->addChild('CountryName', - (string)$this->getCountryParams($rawRequest->getShipperAddressCountryCode())->name + $this->getCountryParams($rawRequest->getShipperAddressCountryCode())->getName() ); $nodeContact = $nodeShipper->addChild('Contact', '', ''); $nodeContact->addChild('PersonName', substr($rawRequest->getShipperContactPersonName(), 0, 34)); diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php index 20b51be3b36e2439ef612efc92e1c7bc5f633b3a..1a0763ca29d065907c81a3651e196642f21ced85 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php @@ -114,7 +114,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder $y = $this->_y(0); $image = new Zend_Pdf_Resource_Image_Jpeg( - Mage::getDesign()->getViewFile('dhl/logo.jpg', array('area' => 'adminhtml')) + Mage::getDesign()->getViewFile('Mage_Usa::dhl/logo.jpg', array('theme' => false)) ); $this->_page->drawImage($image, $x + 191, $this->_y(27), $x + 287, $this->_y(1)); diff --git a/app/code/core/Mage/Usa/etc/config.xml b/app/code/core/Mage/Usa/etc/config.xml index 37600d7dc38a9adf8db306a51c469c4bac603749..0de804f9a652c93e730451d3d20e50926b916c54 100644 --- a/app/code/core/Mage/Usa/etc/config.xml +++ b/app/code/core/Mage/Usa/etc/config.xml @@ -216,7 +216,7 @@ <gateway_url>https://xmlpi-ea.dhl.com/XMLShippingServlet</gateway_url> <id backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <password backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> - <shipment_type>N</shipment_type> + <content_type>N</content_type> <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg> <divide_order_weight>1</divide_order_weight> <unit_of_measure>K</unit_of_measure> diff --git a/app/code/core/Mage/User/Block/Buttons.php b/app/code/core/Mage/User/Block/Buttons.php index a44be3ec189281ff01da20f14139f15973a7fba0..ddbbafe6ee996b1e0b4edca8686eb2ff2c9f3d92 100644 --- a/app/code/core/Mage/User/Block/Buttons.php +++ b/app/code/core/Mage/User/Block/Buttons.php @@ -43,9 +43,11 @@ class Mage_User_Block_Buttons extends Mage_Backend_Block_Template $this->addChild('saveButton', 'Mage_Backend_Block_Widget_Button', array( 'label' => Mage::helper('Mage_User_Helper_Data')->__('Save Role'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'save', 'related' => '#role-edit-form') - ) + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'save', 'target' => '#role-edit-form'), + ), + ), )); $this->addChild('deleteButton', 'Mage_Backend_Block_Widget_Button', array( diff --git a/app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml b/app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml index 28b59d6d51c035156cdc33a6efc603fe08dc7741..1073bd744849ea1104cf985ca02608bec330c653 100644 --- a/app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml +++ b/app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml @@ -35,7 +35,7 @@ <link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/jquery-no-conflict.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.custom.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/validation.js') ?>"></script> diff --git a/app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml b/app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml index 522e39463b98aebd217a9d44fc5fadcde4355739..05e773d7a2f747b9f8ea5a0fc4ba3d4f60acc261 100644 --- a/app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml +++ b/app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml @@ -36,7 +36,7 @@ <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/jquery-no-conflict.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui.custom.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/validation.js') ?>"></script> diff --git a/app/code/core/Mage/User/view/adminhtml/role/info.phtml b/app/code/core/Mage/User/view/adminhtml/role/info.phtml index 4e2337580fefdc19234d49e03bdead509cd2a7be..994dc0f3af62a8b516da23edbd1832f45e1b7f57 100644 --- a/app/code/core/Mage/User/view/adminhtml/role/info.phtml +++ b/app/code/core/Mage/User/view/adminhtml/role/info.phtml @@ -41,5 +41,5 @@ <?php echo $this->getBlockHtml('formkey')?> </form> <script type="text/javascript"> - jQuery('#role-edit-form').form().validation(); + jQuery('#role-edit-form').mage('form').mage('validation'); </script> diff --git a/app/code/core/Mage/Webapi/Block/Adminhtml/Role/Edit/Tab/Resource.php b/app/code/core/Mage/Webapi/Block/Adminhtml/Role/Edit/Tab/Resource.php index 64444785fa806a717cf3030ceac20a8c654a2ccf..7ea5bd9ff7b0fd620789ea947ee01e74307cf6a0 100644 --- a/app/code/core/Mage/Webapi/Block/Adminhtml/Role/Edit/Tab/Resource.php +++ b/app/code/core/Mage/Webapi/Block/Adminhtml/Role/Edit/Tab/Resource.php @@ -64,6 +64,7 @@ class Mage_Webapi_Block_Adminhtml_Role_Edit_Tab_Resource extends Mage_Backend_Bl * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Magento_Filesystem $filesystem * @param Mage_Webapi_Model_Authorization_Config $authorizationConfig * @param Mage_Webapi_Model_Resource_Acl_Rule $ruleResource * @param array $data @@ -82,12 +83,13 @@ class Mage_Webapi_Block_Adminhtml_Role_Edit_Tab_Resource extends Mage_Backend_Bl Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Factory_Helper $helperFactory, + Magento_Filesystem $filesystem, Mage_Webapi_Model_Authorization_Config $authorizationConfig, Mage_Webapi_Model_Resource_Acl_Rule $ruleResource, array $data = array() ) { parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, - $session, $storeConfig, $frontController, $helperFactory, $data + $session, $storeConfig, $frontController, $helperFactory, $filesystem, $data ); $this->_authorizationConfig = $authorizationConfig; $this->_ruleResource = $ruleResource; diff --git a/app/code/core/Mage/Webapi/Block/Adminhtml/User/Edit.php b/app/code/core/Mage/Webapi/Block/Adminhtml/User/Edit.php index 250d147d61c5cd299b2e008f69acef21b8df69a1..e3c989dcaf9ea5365416c60eaff8f2d530578a88 100644 --- a/app/code/core/Mage/Webapi/Block/Adminhtml/User/Edit.php +++ b/app/code/core/Mage/Webapi/Block/Adminhtml/User/Edit.php @@ -52,13 +52,14 @@ class Mage_Webapi_Block_Adminhtml_User_Edit extends Mage_Backend_Block_Widget_Fo $this->_addButton('save_and_continue', array( 'label' => $this->__('Save and Continue Edit'), - 'onclick' => 'saveAndContinueEdit()', - 'class' => 'save' + 'class' => 'save', + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), + ), ), 100); - $this->_formScripts[] = "function saveAndContinueEdit()" - . "{editForm.submit($('edit_form').action + 'back/edit/')}"; - $this->_updateButton('save', 'label', $this->__('Save API User')); $this->_updateButton('save', 'id', 'save_button'); $this->_updateButton('delete', 'label', $this->__('Delete API User')); diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php index 3f19113bcd6f2a61ef91a6f2509d78d9af3cc48e..276507bf7dfedb9dcb041ad0b24a165a9787d46b 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php @@ -69,8 +69,10 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit extends Mage_Adminhtml_Bl array( 'label' => Mage::helper('Mage_Widget_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', - 'data_attr' => array( - 'widget-button' => array('event' => 'saveAndContinueEdit', 'related' => '#edit_form'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form'), + ), ), ), 100 diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php index 37ad4f1c82ff4b6e671af1274995428c1230132f..04488c786ad778f191774209f050bb4f1370f09a 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php @@ -26,6 +26,11 @@ /** * A chooser for container for widget instances + * + * @method getTheme() + * @method getArea() + * @method Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Container setTheme($theme) + * @method Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Container setArea($area) */ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Container extends Mage_Core_Block_Html_Select { @@ -48,17 +53,16 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Container extends protected function _beforeToHtml() { if (!$this->getOptions()) { - $layoutUpdateParams = array( + $layoutMergeParams = array( 'area' => $this->getArea(), - 'package' => $this->getPackage(), 'theme' => $this->getTheme(), ); - /** @var $layoutUpdate Mage_Core_Model_Layout_Merge */ - $layoutUpdate = Mage::getModel('Mage_Core_Model_Layout_Merge', array('arguments' => $layoutUpdateParams)); - $layoutUpdate->addPageHandles(array($this->getLayoutHandle())); - $layoutUpdate->load(); + /** @var $layoutMerge Mage_Core_Model_Layout_Merge */ + $layoutMerge = Mage::getModel('Mage_Core_Model_Layout_Merge', array('arguments' => $layoutMergeParams)); + $layoutMerge->addPageHandles(array($this->getLayoutHandle())); + $layoutMerge->load(); - $containers = $layoutUpdate->getContainers(); + $containers = $layoutMerge->getContainers(); if ($this->getAllowedContainers()) { foreach (array_keys($containers) as $containerName) { if (!in_array($containerName, $this->getAllowedContainers())) { diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php index d61e786ad37ba459049bcde0b86cdc377542c185..48c2a1debf2008fe924b308fdf53fc9e57fd0bb8 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php @@ -26,6 +26,9 @@ /** * Widget Instance layouts chooser + * + * @method getArea() + * @method getTheme() */ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Layout extends Mage_Core_Block_Html_Select { @@ -38,18 +41,17 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Layout extends Ma { if (!$this->getOptions()) { $this->addOption('', Mage::helper('Mage_Widget_Helper_Data')->__('-- Please Select --')); - $layoutUpdateParams = array( + $layoutMergeParams = array( 'area' => $this->getArea(), - 'package' => $this->getPackage(), 'theme' => $this->getTheme(), ); $pageTypes = array(); - $pageTypesAll = $this->_getLayoutUpdate($layoutUpdateParams)->getPageHandlesHierarchy(); + $pageTypesAll = $this->_getLayoutMerge($layoutMergeParams)->getPageHandlesHierarchy(); foreach ($pageTypesAll as $pageTypeName => $pageTypeInfo) { - $layoutUpdate = $this->_getLayoutUpdate($layoutUpdateParams); - $layoutUpdate->addPageHandles(array($pageTypeName)); - $layoutUpdate->load(); - if (!$layoutUpdate->getContainers()) { + $layoutMerge = $this->_getLayoutMerge($layoutMergeParams); + $layoutMerge->addPageHandles(array($pageTypeName)); + $layoutMerge->load(); + if (!$layoutMerge->getContainers()) { continue; } $pageTypes[$pageTypeName] = $pageTypeInfo; @@ -60,12 +62,12 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Layout extends Ma } /** - * Retrieve new layout update model instance + * Retrieve new layout merge model instance * * @param array $arguments * @return Mage_Core_Model_Layout_Merge */ - protected function _getLayoutUpdate(array $arguments) + protected function _getLayoutMerge(array $arguments) { return Mage::getModel('Mage_Core_Model_Layout_Merge', array('arguments' => $arguments)); } diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 33037b1d17dd0ecc61eccc9190aa422548a5dfd3..45f685cfe3f11ab32c790268f7e853a4b41597f6 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -27,9 +27,7 @@ /** * Widget Instance page groups (predefined layouts group) to display on * - * @category Mage - * @package Mage_Widget - * @author Magento Core Team <core@magentocommerce.com> + * @method Mage_Widget_Model_Widget_Instance getWidgetInstance() */ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main_Layout extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface @@ -249,8 +247,7 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main_Layout ->setExtraParams("onchange=\"WidgetInstance.loadSelectBoxByType(\'block_reference\', " . "this.up(\'div.pages\'), this.value)\"") ->setArea($this->getWidgetInstance()->getArea()) - ->setPackage($this->getWidgetInstance()->getPackage()) - ->setTheme($this->getWidgetInstance()->getTheme()) + ->setTheme($this->getWidgetInstance()->getThemeId()) ; return $chooserBlock->toHtml(); } diff --git a/app/code/core/Mage/Widget/Model/Widget/Instance.php b/app/code/core/Mage/Widget/Model/Widget/Instance.php index 6bbff1978638cf9afb29dfff746b1ec6eb5c39c5..a2f69698a4666d60ec89195764dfbc723ea88f11 100644 --- a/app/code/core/Mage/Widget/Model/Widget/Instance.php +++ b/app/code/core/Mage/Widget/Model/Widget/Instance.php @@ -213,6 +213,7 @@ class Mage_Widget_Model_Widget_Instance extends Mage_Core_Model_Abstract */ public function getArea() { + //TODO Shouldn't we get "area" from theme model which we can load using "theme_id"? if (!$this->_getData('area')) { return Mage_Core_Model_Design_Package::DEFAULT_AREA; } diff --git a/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php b/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php index d9c304c4c10fbe86f91c19ab9a6e5d0696001adb..f0325d9b34b5578982fe4784f5bc00f4bf14e2d5 100644 --- a/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php +++ b/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php @@ -271,8 +271,7 @@ class Mage_Widget_Adminhtml_Widget_InstanceController extends Mage_Adminhtml_Con ->createBlock('Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Container') ->setValue($selected) ->setArea($widgetInstance->getArea()) - ->setPackage($widgetInstance->getPackage()) - ->setTheme($widgetInstance->getTheme()) + ->setTheme($widgetInstance->getThemeId()) ->setLayoutHandle($layout) ->setAllowedContainers($widgetInstance->getWidgetSupportedContainers()); $this->setBody($blocksChooser->toHtml()); diff --git a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Cart.php b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Cart.php index bc700bc534e89f7535a1f3e0d978f27727f553c0..3bf4fc900ae9925754a9658f6c670b8e11e0d9ac 100644 --- a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Cart.php +++ b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Cart.php @@ -44,31 +44,4 @@ class Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Cart extends Mage_Wishli $qty = $item->getQty(); return $qty ? $qty : 1; } - - /** - * Retrieve column related javascript code - * - * @return string - */ - public function getJs() - { - $js = " - function addWItemToCart(itemId) { - var url = '" . $this->getItemAddToCartUrl('%item%') . "'; - url = url.gsub('%item%', itemId); - var form = $('wishlist-view-form'); - if (form) { - var input = form['qty[' + itemId + ']']; - if (input) { - var separator = (url.indexOf('?') >= 0) ? '&' : '?'; - url += separator + input.name + '=' + encodeURIComponent(input.value); - } - } - setLocation(url); - } - "; - - $js .= parent::getJs(); - return $js; - } } diff --git a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php index 6138cb2f7101f728d11d086c8f84deded3e8e7f7..50eadcd97ccf4e8165b9f2faf9319f34907ad2ef 100644 --- a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php +++ b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php @@ -34,21 +34,5 @@ class Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Comment extends Mage_Wishlist_Block_Customer_Wishlist_Item_Column { - /** - * Retrieve column javascript code - * - * @return string - */ - public function getJs() - { - return parent::getJs() . " - function focusComment(obj) { - if( obj.value == '" . $this->helper('Mage_Wishlist_Helper_Data')->defaultCommentString() . "' ) { - obj.value = ''; - } else if( obj.value == '' ) { - obj.value = '" . $this->helper('Mage_Wishlist_Helper_Data')->defaultCommentString() . "'; - } - } - "; - } + } diff --git a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php index 00d3a5bceb7f16638d33af4934e2f1540a6115fc..a5520be6c3361fb36b4324b034cfd93fab866424 100644 --- a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php +++ b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php @@ -33,17 +33,4 @@ */ class Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Remove extends Mage_Wishlist_Block_Customer_Wishlist_Item_Column { - /** - * Retrieve block javascript - * - * @return string - */ - public function getJs() - { - return parent::getJs() . " - function confirmRemoveWishlistItem() { - return confirm('" . $this->__('Are you sure you want to remove this product from your wishlist?') . "'); - } - "; - } } diff --git a/app/code/core/Mage/Wishlist/view/frontend/button/tocart.phtml b/app/code/core/Mage/Wishlist/view/frontend/button/tocart.phtml index ce7de2fe6679cda68da73f986d02cbb9eadb1cc3..1c4f978d986d2691b8ac8a5a1143bf5f0cc0cf90 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/button/tocart.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/button/tocart.phtml @@ -26,5 +26,5 @@ ?> <?php if($this->getWishlist()->getItemsCount() && $this->getWishlist()->isSalable()): ?> - <button type="button" title="<?php echo $this->__('Add All to Cart') ?>" onclick="addAllWItemsToCart()" class="button btn-add"><span><span><?php echo $this->__('Add All to Cart') ?></span></span></button> + <button type="button" title="<?php echo $this->__('Add All to Cart') ?>" class="button btn-add"><span><span><?php echo $this->__('Add All to Cart') ?></span></span></button> <?php endif;?> diff --git a/app/code/core/Mage/Wishlist/view/frontend/cart.js b/app/code/core/Mage/Wishlist/view/frontend/cart.js new file mode 100644 index 0000000000000000000000000000000000000000..e9a04c65420bff73cd21cd562d12575a4fbfffbc --- /dev/null +++ b/app/code/core/Mage/Wishlist/view/frontend/cart.js @@ -0,0 +1,127 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category frontend product msrp + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/*jshint browser:true jquery:true*/ +(function($, window) { + "use strict"; + $.widget('mage.addWishListToCart', { + + options: { + dataAttribute: 'item-id', + nameFormat: 'qty[{0}]', + wishListFormSelector: '#wishlist-view-form', + btnRemoveSelector: '.btn-remove', + qtySelector: '.qty', + addToCartSelector: '.btn-cart', + addAllToCartSelector: '.btn-add', + commentInputType: 'textarea' + }, + + /** + * Bind handlers to events + */ + _create: function() { + $(this.options.wishListFormSelector) + .on('submit', $.proxy(this._addItemsToCart, this)) + .on('click', this.options.addToCartSelector, $.proxy(this._addItemsToCart, this)) + .on('click', this.options.btnRemoveSelector, $.proxy(this._confirmRemoveWishlistItem, this)) + .on('click', this.options.addAllToCartSelector, $.proxy(this._addAllWItemsToCart, this)) + .on('focusin focusout', this.options.commentInputType, $.proxy(this._focusComment, this)); + }, + + /** + * Validate and Redirect + * @private + * @param {string} url + */ + _validateAndRedirect: function(url) { + if ($(this.options.wishListFormSelector).validation({ + errorPlacement: function(error, element) { + error.insertAfter(element.next()); + } + }).valid()) { + $(this.options.wishListFormSelector).prop('action', url); + window.location.href = url; + } + }, + + /** + * Add items to cart + * @private + * @param {event} e + */ + _addItemsToCart: function() { + $(this.options.addToCartSelector).each($.proxy(function(index, element) { + if ($(element).data(this.options.dataAttribute)) { + var itemId = $(element).data(this.options.dataAttribute), + url = this.options.addToCartUrl.replace('%item%', itemId), + inputName = $.validator.format(this.options.nameFormat, itemId), + inputValue = $(this.options.wishListFormSelector).find('[name="' + inputName + '"]').val(), + separator = (url.indexOf('?') >= 0) ? '&' : '?'; + url += separator + inputName + '=' + encodeURIComponent(inputValue); + this._validateAndRedirect(url); + return; + } + }, this)); + }, + + /** + * Confirmation window for removing wish list item + * @private + */ + _confirmRemoveWishlistItem: function() { + return window.confirm(this.options.confirmRemoveMessage); + }, + + /** + * Add all wish list items to cart + * @private + */ + _addAllWItemsToCart: function() { + var url = this.options.addAllToCartUrl; + var separator = (url.indexOf('?') >= 0) ? '&' : '?'; + $(this.options.wishListFormSelector).find(this.options.qtySelector).each( + function(index, elem) { + url += separator + $(elem).prop('name') + '=' + encodeURIComponent($(elem).val()); + separator = '&'; + } + ); + + this._validateAndRedirect(url); + }, + + /** + * Toggle comment string + * @private + * @param {event} e + */ + _focusComment: function(e) { + var commentInput = e.currentTarget; + if (commentInput.value === '' || commentInput.value === this.options.commentString) { + commentInput.value = commentInput.value === this.options.commentString ? '' : this.options.commentString; + } + } + }); +})(jQuery, window); diff --git a/app/code/core/Mage/Wishlist/view/frontend/item/column/cart.phtml b/app/code/core/Mage/Wishlist/view/frontend/item/column/cart.phtml index 90ee4d10ff20022dd526721144dd5c2ea89c1d58..8aaf043c9202e062e17d5e52a5a3c386125e67f4 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/item/column/cart.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/item/column/cart.phtml @@ -33,25 +33,43 @@ $options = $this->getChildBlock('customer.wishlist.item.options') ->getConfiguredOptions(); ?> <div class="cart-cell"> -<?php echo $this->getPriceHtml($product, empty($options));?> -<div class="add-to-cart-alt"> -<?php if ($item->canHaveQty() && $item->getProduct()->isVisibleInSiteVisibility()): ?> - <input type="text" class="input-text qty validate-not-negative-number" name="qty[<?php echo $item->getId() ?>]" value="<?php echo $this->getAddToCartQty($item) * 1 ?>" /> -<?php endif; ?> -<?php if ($product->isSaleable()): ?> - <button type="button" title="<?php echo $this->__('Add to Cart') ?>" onclick="addWItemToCart(<?php echo $item->getId()?>);" class="button btn-cart"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button> -<?php else: ?> - <?php if ($product->getIsSalable()): ?> - <p class="availability in-stock"><span><?php echo $this->__('In stock') ?></span></p> - <?php else: ?> - <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p> - <?php endif; ?> -<?php endif; ?> -</div> -<?php foreach($this->getChildNames() as $childName):?> - <?php echo $this->getLayout()->renderElement($childName, false);?> -<?php endforeach;?> -<?php if ($product->isVisibleInSiteVisibility()): ?> - <p><a class="link-edit" href="<?php echo $this->getItemConfigureUrl($item) ?>"><?php echo $this->__('Edit') ?></a></p> -<?php endif ?> + <?php echo $this->getPriceHtml($product, empty($options));?> + <div class="add-to-cart-alt"> + <?php if ($item->canHaveQty() && $item->getProduct()->isVisibleInSiteVisibility()): ?> + <input type="text" class="input-text qty" data-validate="{'validate-greater-than-zero':true}" name="qty[<?php echo $item->getId() ?>]" + value="<?php echo $this->getAddToCartQty($item) * 1 ?>"/> + <?php endif; ?> + <?php if ($product->isSaleable()): ?> + <button type="button" title="<?php echo $this->__('Add to Cart') ?>" data-item-id="<?php echo $item->getId()?>" class="button btn-cart"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button> + <?php else: ?> + <?php if ($product->getIsSalable()): ?> + <p class="availability in-stock"><span><?php echo $this->__('In stock') ?></span></p> + <?php else: ?> + <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p> + <?php endif; ?> + <?php endif; ?> + </div> + <?php foreach ($this->getChildNames() as $childName): ?> + <?php echo $this->getLayout()->renderElement($childName, false); ?> + <?php endforeach;?> + <?php if ($product->isVisibleInSiteVisibility()): ?> + <p><a class="link-edit" href="<?php echo $this->getItemConfigureUrl($item) ?>"><?php echo $this->__('Edit') ?></a> + </p> + <?php endif ?> </div> +<script> + (function($) { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Wishlist::cart.js')?>", function() { + $.mage.addWishListToCart({ + addToCartUrl: '<?php echo $this->getItemAddToCartUrl('%item%');?>' , + confirmRemoveMessage: '<?php echo $this->__('Are you sure you want to remove this product from your wishlist?') ?>', + addAllToCartUrl : '<?php echo $this->getUrl('*/*/allcart', array('wishlist_id' => $this->getWishlistInstance()->getId())) ?>', + commentString : '<?php echo $this->helper('Mage_Wishlist_Helper_Data')->defaultCommentString()?>' + }); + }); + })(jQuery); +</script> diff --git a/app/code/core/Mage/Wishlist/view/frontend/item/column/info.phtml b/app/code/core/Mage/Wishlist/view/frontend/item/column/info.phtml index ac113d52bf3becf4e8ff88f1d7b0ef21f55533d7..1c2bd35b852ae2e6be2d8cc02cf944c1075b942c 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/item/column/info.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/item/column/info.phtml @@ -30,7 +30,7 @@ $product = $item->getProduct(); ?> <h3 class="product-name"><a href="<?php echo $this->getProductUrl($item) ?>" title="<?php echo $this->escapeHtml($product->getName()) ?>"><?php echo $this->escapeHtml($product->getName()) ?></a></h3> <div class="description std"><div class="inner"><?php echo $this->escapeHtml($this->stripTags($product->getShortDescription()));?></div></div> -<textarea name="description[<?php echo $item->getWishlistItemId() ?>]" rows="3" cols="5" onfocus="focusComment(this)" onblur="focusComment(this)" title="<?php echo $this->__('Comment') ?>"><?php echo ($this->escapeHtml($item->getDescription())) ?></textarea> +<textarea name="description[<?php echo $item->getWishlistItemId() ?>]" rows="3" cols="5" title="<?php echo $this->__('Comment') ?>"><?php echo ($this->escapeHtml($item->getDescription())) ?></textarea> <?php $children = $this->getChildNames(); ?> <?php if ($children): ?> <div class="item-manage"> diff --git a/app/code/core/Mage/Wishlist/view/frontend/item/column/remove.phtml b/app/code/core/Mage/Wishlist/view/frontend/item/column/remove.phtml index 015a3d66daf5e1ebabc907d8829911b2489dd153..945150826d0d53328277afeda66a1b126967e98a 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/item/column/remove.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/item/column/remove.phtml @@ -25,5 +25,5 @@ */ ?> -<a href="<?php echo $this->getItemRemoveUrl($this->getItem()); ?>" onclick="return confirmRemoveWishlistItem();" title="<?php echo $this->__('Remove Item') ?>" +<a href="<?php echo $this->getItemRemoveUrl($this->getItem()); ?>" title="<?php echo $this->__('Remove Item') ?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove item');?></a> diff --git a/app/code/core/Mage/Wishlist/view/frontend/item/configure/addto.phtml b/app/code/core/Mage/Wishlist/view/frontend/item/configure/addto.phtml index 595f456a98d9fbd770ec24e6bb6d90658b6906f8..4879ea39f27782e196ba620f954fe155b580549c 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/item/configure/addto.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/item/configure/addto.phtml @@ -29,7 +29,7 @@ <?php $_wishlistSubmitUrl = $this->helper('Mage_Wishlist_Helper_Data')->getUpdateUrl($_wishlistItem); ?> <ul class="add-to-links"> <?php if ($this->helper('Mage_Wishlist_Helper_Data')->isAllow()) : ?> - <li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-compare"><?php echo $this->__('Update Wishlist') ?></a></li> + <li><a href="<?php echo $_wishlistSubmitUrl ?>" class="link-compare"><?php echo $this->__('Update Wishlist') ?></a></li> <?php endif; ?> <?php $_product = $this->getProduct(); ?> <?php $_compareUrl = $this->helper('Mage_Catalog_Helper_Product_Compare')->getAddUrl($_product); ?> diff --git a/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_item.phtml b/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_item.phtml index 133e0dbc0b4226abfa93b4528e6049b86bc4a69d..a99fa6a067187e06a18ba17898b8f7f747e3d559 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_item.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_item.phtml @@ -49,57 +49,40 @@ <?php $_msrpPrice = $_coreHelper->currency($_product->getMsrp(),true,true) ?> <span class="old-price" ><?php echo $_msrpPrice ?></span> <?php endif; ?> - <?php if ($_catalogHelper->isShowPriceOnGesture($_product)): ?> <?php $priceElementId = 'product-price-' . $_id . $this->getIdSuffix(); ?> <span id="<?php echo $priceElementId ?>" style="display:none"></span> <?php $popupId = 'msrp-popup-' . $_id . $_coreHelper->getRandomString(20); ?> <a href="#" id="<?php echo($popupId);?>"><?php echo $this->__('Click for price'); ?></a> - <script type="text/javascript"> - Event.observe(window, 'load', function() { - var priceElement = $("<?php echo $priceElementId ?>"), - realPrice = <?php echo $this->getRealPriceJs($_product) ?>, - priceHtml = realPrice.stripScripts(); - - priceElement.innerHTML = priceHtml; - realPrice.evalScripts(); - var originalOptionPriceReload; - if (typeof(optionsPrice) != 'undefined' && optionsPrice && optionsPrice.reload) { - originalOptionPriceReload = optionsPrice.reload; - Product.OptionsPrice.prototype.reload = function() { - if (originalOptionPriceReload) { - originalOptionPriceReload.call(this); - } - if ($('<?php echo $popupId ?>') == Catalog.Map.active) { - Element.update( - $('map-popup-price'), - $("<?php echo $priceElementId ?>").innerHTML - ); - } - } - } - }); - - Catalog.Map.addHelpLink( - $('<?php echo $popupId ?>'), - "<?php echo $_product->getName() ?>", - $("<?php echo $priceElementId ?>"), - '<?php echo $_msrpPrice ?>', - "<?php echo $_product->isSalable() ? $_product->getAddToCartUrl() : '' ?>" - ); - </script> <?php else: ?> <span class="msrp-price-hide-message"> <?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?> </span> <?php endif; ?> - <?php $helpLinkId = 'msrp-help-' . $_id . $_coreHelper->getRandomString(20); ?> <a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__("What's this?"); ?></a> - <script type="text/javascript"> - Catalog.Map.addHelpLink( - $('<?php echo $helpLinkId ?>'), - "<?php echo $this->__("What's this?"); ?>" - ); - </script> </div> + <script type="text/javascript"> + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>", + function () { + <?php if ($this->helper('Mage_Catalog_Helper_Data')->isShowPriceOnGesture($_product)): ?> + $('#<?php echo($popupId);?>').addToCart({ + cartForm: "#wishlist-view-form", + popupId: "#<?php echo($popupId);?>", + productName: '<?php echo $_product->getName() ?>', + realPrice: '<?php echo $this->getRealPriceJs($_product) ?>', + msrpPrice: '<?php echo $_msrpPrice ?>', + priceElementId: '<?php echo $priceElementId ?>', + closeButtonId: '#map-popup-close', + popupCartButtonId: "#map-popup-button" + }); + <?php endif; ?> + $("#<?php echo($helpLinkId);?>").addToCart({ + helpLinkId: "#<?php echo($helpLinkId);?>", + productName: '<?php echo $_product->getName() ?>' + }); + }); + })(jQuery); + </script> + diff --git a/app/code/core/Mage/Wishlist/view/frontend/view.phtml b/app/code/core/Mage/Wishlist/view/frontend/view.phtml index c0eff262aaded58c52f8c8c325169dfa7cca0e11..693d137c0a406502c0234dcf318e190eb01c4d90 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/view.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/view.phtml @@ -52,22 +52,6 @@ </fieldset> </form> - <script type="text/javascript"> - //<![CDATA[ - var wishlistForm = new Validation($('wishlist-view-form')); - function addAllWItemsToCart() { - var url = '<?php echo $this->getUrl('*/*/allcart', array('wishlist_id' => $this->getWishlistInstance()->getId())) ?>'; - var separator = (url.indexOf('?') >= 0) ? '&' : '?'; - $$('#wishlist-view-form .qty').each( - function (input, index) { - url += separator + input.name + '=' + encodeURIComponent(input.value); - separator = '&'; - } - ); - setLocation(url); - } - //]]> - </script> </div> <?php echo $this->getChildHtml('bottom'); ?> <div class="buttons-set"> diff --git a/app/design/adminhtml/default/basic/boxes.css b/app/design/adminhtml/default/basic/boxes.css index 2ce1a9e43f5a3b7fba489fa3f65f231a222d3372..47bd9a8d83ab42e0453c8a44f466033c927d5e3c 100644 --- a/app/design/adminhtml/default/basic/boxes.css +++ b/app/design/adminhtml/default/basic/boxes.css @@ -281,9 +281,11 @@ ul.tabs .ui-state-active a span, ul.tabs .ui-state-active a:hover span { background:#fff; font-weight:bold; } ul.tabs a.subitem { padding-left:2.2em; } ul.tabs span.changed, -ul.tabs span.error { float:right; background:0; padding:0; } +ul.tabs span.error, +ul.tabs span.loading { float:right; background:0; padding:0; } ul.tabs a.changed span.changed { background:url(images/fam_bullet_disk.gif) 0 0 no-repeat !important; width:16px; height:16px; } ul.tabs a.error span.error { background:url(Mage_Adminhtml::images/fam_bullet_error.gif) 0 0 no-repeat !important; width:16px; height:16px; } +ul.tabs a.ui-tabs-loading span.loading { background:url(images/loader-small.gif) 0 0 no-repeat !important; width:16px; height:16px; } ul.tabs a.changed { font-style:italic; } /* Horizontal Tabs */ @@ -829,6 +831,62 @@ div.autocomplete ul { margin:0; padding:0; } div.autocomplete ul li.selected { background-color:#dcebf0; } div.autocomplete ul li { padding:.5em .7em; min-height:32px; cursor:pointer; text-align:left; color:#2f2f2f; line-height:1.3em; } +/* Mage suggest */ +/*.mage-suggest { position:relative; display: inline-block; background: #fff; border-radius: 5px; box-shadow: 1px 0 2px #ddd; } +.mage-suggest .input-text { border-radius: 5px; margin: 7px; border: 1px solid #ddd; height: 20px; padding: 3px 25px 3px 10px; line-height: 26px; background: url(images/bkg_search-magnifier.png) 98% 50% no-repeat; } +.mage-suggest-dropdown { overflow-x: hidden; position: absolute; top: 100%; margin-top:-4px; left: 0; min-width: 100%; background: #fff; border: solid #ddd; border-width: 0 1px 1px; padding: 10px 0; box-sizing: border-box; border-radius: 0 0 5px 5px; box-shadow: 1px 1px 2px #ddd; } +.mage-suggest-dropdown.overflow-y { overflow-y: scroll; } +.mage-suggest-dropdown .ui-menu-item a { display:block; padding: 0 10px; text-decoration: none; font:normal 12px/26px Arial, sans-serif; text-align: left; border-bottom: 1px solid #f2f2f2; color:#2d2d2d; } +.mage-suggest-dropdown .ui-state-active, +.mage-suggest-dropdown .ui-state-focus { background: #f2f2f2; color:#000; }*/ +.mage-suggest-inner {padding: 5px 0;} +.mage-suggest {position: relative;} +.mage-suggest-inner {position: absolute; background: #fff; top:0px; left:0px; border: 1px solid #ddd; border-radius: 5px; box-shadow: 1px 1px 2px #ddd;} +.mage-suggest-inner > input { + height: 22px; + margin: 0 5px; +} +.mage-suggest-dropdown > h2 { + font-size:0.8em; + text-transform: uppercase; + font-family:Arial, Helvetica, sans-serif; + color: #555555; + font-weight: normal; + padding: 0 8px; +} +.mage-suggest-dropdown .ui-menu-item a { display:block; padding: 0 10px; text-decoration: none; font:normal 12px/26px Arial, sans-serif; text-align: left; border-bottom: 1px solid #f2f2f2; color:#2d2d2d; } +.mage-suggest-dropdown .ui-state-active, +.mage-suggest-dropdown .ui-state-focus { background: #f2f2f2; color:#000; } +.mage-suggest-dropdown .ui-corner-all { + border-radius: 0px; +} +.mage-suggest-dropdown .ui-widget-content, .mage-suggest-dropdown .ui-menu .ui-menu-item a, .mage-suggest-dropdown .ui-menu .ui-menu-item a.ui-state-focus { + background: #ffffff; + border: none; + color: #000000; +} +.mage-suggest-dropdown .ui-menu .ui-menu-item a, .mage-suggest-dropdown .ui-menu .ui-menu-item a.ui-state-focus { + border-top: 1px solid #efefef; + margin: 0; + padding: 3px 8px; +} +.mage-suggest-dropdown .ui-menu { + padding: 0px; +} +.mage-suggest-dropdown .ui-menu .ui-menu-item a.ui-state-focus { + background: #ebebeb; +} +.mage-suggest-dropdown .show-all { + padding: 5px 8px; + color: #555555; + font-family:Arial, Helvetica, sans-serif; + font-size: 0.8em; +} +.mage-suggest-dropdown { + overflow: auto; + max-height: 500px; +} + /* Footer */ .footer .bug-report { float:left; width:35%; text-align:left; } .footer .legality { float:right; width:35%; min-height:19px; padding-left:22px; text-align:right; } @@ -846,11 +904,7 @@ div.autocomplete ul li { padding:.5em .7em; min-height:32px; cursor:pointer; tex ********************************************************************************************/ /* Content Header */ -.content-header { - margin-bottom:18px; - border-bottom:4px solid #dfdfdf; - padding-bottom:.25em; - } +.content-header { margin-bottom:18px; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; border-bottom:4px solid #dfdfdf; padding-bottom:.25em; padding-top: 6px; } .content-header table { width:100%; } .content-header h3 { float:left; margin:.3em .5em 0 0; color:#eb5e00; font-size:1.25em; line-height:1.2em; } .content-header .head h3 { float:none; } @@ -865,16 +919,12 @@ div.autocomplete ul li { padding:.5em .7em; min-height:32px; cursor:pointer; tex .left-col-block { width:200px; } -/* Floating Content Header */ /* Used to make action buttons always within reach */ -.content-header-floating { display:none; position:fixed; left:0; top:0; width:100%; border-bottom:solid 1px #988753; z-index:100; z-index:auto\9; background:#fdfaa4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"/* IE8 */; opacity:.85; } -.content-header-floating .content-header { padding:6px 8px 4px 8px; margin-bottom:0; border:0; } -.content-header-floating td { padding-right:20px; } -.content-header-floating button { margin-top:3px; } -.content-header-floating .content-buttons { float:right; /* margin:12px 25px 0 0;*/ } +.content-header.fixed { padding:6px 8px; margin-bottom:0; border:0; position:fixed; left:0; top:0; width:100%; border-bottom:solid 1px #988753; z-index:100; z-index:auto\9; background:#fdfaa4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; opacity:.85; z-index: 100; } +.content-header.fixed button { margin-top:3px; } +.content-header.fixed .content-buttons { float:right; } .content-buttons { margin-bottom:5px; float:right; display:inline; white-space:nowrap; } -.content-header-floating .form-buttons {padding-right:20px; } -.content-header-floating h3 {margin-left:20px; display:inline; } - +.content-header.fixed .form-buttons { padding-right:20px; } +.content-header.fixed h3 { margin: 0 0 0 20px; display:inline; } /* Box Head */ diff --git a/app/design/adminhtml/default/basic/images/bkg_search-magnifier.png b/app/design/adminhtml/default/basic/images/bkg_search-magnifier.png new file mode 100644 index 0000000000000000000000000000000000000000..cc7a26f8b8f7bf643a8ae437686ca8e96ded9f25 Binary files /dev/null and b/app/design/adminhtml/default/basic/images/bkg_search-magnifier.png differ diff --git a/app/design/adminhtml/default/basic/images/loader-small.gif b/app/design/adminhtml/default/basic/images/loader-small.gif new file mode 100644 index 0000000000000000000000000000000000000000..62feaa6c3c85d98a0d6f81d9a75fe837d6243bbb Binary files /dev/null and b/app/design/adminhtml/default/basic/images/loader-small.gif differ diff --git a/app/design/frontend/default/modern/Mage_Catalog/layout.xml b/app/design/frontend/default/modern/Mage_Catalog/layout.xml index 09e3f589df5e16fc01ce7ca1d099d705bae33b6a..a6be4c7d61cbeb903fe95041ca81983af638755e 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/layout.xml +++ b/app/design/frontend/default/modern/Mage_Catalog/layout.xml @@ -165,6 +165,7 @@ Product view <reference name="head"> <action method="addJs"><file>varien/product.js</file></action> <action method="addJs"><file>varien/configurable.js</file></action> + <action method="addCss"><file>Mage_Catalog::zoom.css</file></action> </reference> <update handle="page_calendar"/> <reference name="content"> @@ -194,7 +195,6 @@ Product view <block type="Mage_Core_Block_Template" name="product.info.container" as="options_container"> <block type="Mage_Catalog_Block_Product_View" name="product.info.options.wrapper" as="product_options_wrapper" template="product/view/options/wrapper.phtml" translate="label"> <label>Info Column Options Wrapper</label> - <block type="Mage_Core_Block_Template" name="options_js" template="Mage_Catalog::product/view/options/js.phtml"/> <block type="Mage_Catalog_Block_Product_View_Options" name="product.info.options" as="product_options" template="product/view/options.phtml"> <action method="addOptionRenderer"><type>text</type><block>Mage_Catalog_Block_Product_View_Options_Type_Text</block><template>product/view/options/type/text.phtml</template></action> <action method="addOptionRenderer"><type>file</type><block>Mage_Catalog_Block_Product_View_Options_Type_File</block><template>product/view/options/type/file.phtml</template></action> diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml index 87d3d35657db96fbe504efa8d64334d0bd5deb93..167550d5d8d781681c45baa80726717e81eb810d 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml @@ -96,15 +96,8 @@ $_imageSize = $this->getVar('product_list_image_size', 'Mage_Catalog'); <?php endforeach; ?> </ol> <script type="text/javascript"> - //<![CDATA[ - (function($) { - $.mage.event.observe('mage.grid.initialize', function (event, initData) { - initData.listId = '#products-list'; - }); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/grid.js') ?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); - })(jQuery); - //]]> + jQuery('#products-list').decorate('list'); + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); </script> <?php else: ?> @@ -158,16 +151,8 @@ $_imageSize = $this->getVar('product_list_image_size', 'Mage_Catalog'); <?php endif ?> <?php endforeach ?> <script type="text/javascript"> - //<![CDATA[ - (function($) { - $.mage.event.observe('mage.grid.initialize', function (event, initData) { - initData.genericSelector = 'ul.products-grid > li'; - initData.decoratorParam = ['odd', 'even', 'first', 'last']; - }); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/grid.js') ?>"); - $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); - })(jQuery); - //]]> + jQuery('ul.products-grid > li').decorate('generic', ['odd', 'even', 'first', 'last']); + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); </script> <?php endif; ?> diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/view.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/view.phtml index c1ba3a446f5ba3250d787c7e462914060248b9d9..d406dd2e0d93aed1d1ea506e10465574d83bf381 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/view.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/view.phtml @@ -34,7 +34,11 @@ <?php $_helper = $this->helper('Mage_Catalog_Helper_Output'); ?> <?php $_product = $this->getProduct(); ?> <script type="text/javascript"> - var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>); + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/price-option.js') ?>", function () { + $('#product_addtocart_form').priceOption({"priceConfig":<?php echo $this->getJsonConfig() ?>}); + }); + })(jQuery); </script> <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div> <div class="product-view"> @@ -95,57 +99,6 @@ <?php echo $this->getChildChildHtml('options_container') ?> <?php endif;?> </form> - <script type="text/javascript"> - //<![CDATA[ - var productAddToCartForm = new VarienForm('product_addtocart_form'); - productAddToCartForm.submit = function(button, url) { - if (this.validator.validate()) { - var form = this.form; - var oldUrl = form.action; - - if (url) { - form.action = url; - } - var e = null; - try { - this.form.submit(); - } catch (e) { - } - this.form.action = oldUrl; - if (e) { - throw e; - } - - if (button && button != 'undefined') { - button.disabled = true; - } - } - }.bind(productAddToCartForm); - - productAddToCartForm.submitLight = function(button, url){ - if(this.validator) { - var nv = Validation.methods; - delete Validation.methods['required-entry']; - delete Validation.methods['validate-one-required']; - delete Validation.methods['validate-one-required-by-name']; - // Remove custom datetime validators - for (var methodName in Validation.methods) { - if (methodName.match(/^validate-datetime-.*/i)) { - delete Validation.methods[methodName]; - } - } - - if (this.validator.validate()) { - if (url) { - this.form.action = url; - } - this.form.submit(); - } - Object.extend(Validation.methods, nv); - } - }.bind(productAddToCartForm); - //]]> - </script> </div> <div class="product-collateral"> diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml index 9d2fa1cb3436e151b1d42064c5e6c8843907537f..2304220d2afd66f619723c9753a62e876b98c9c2 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml @@ -41,19 +41,26 @@ echo $_helper->productAttribute($_product, $_img, 'image'); ?> </p> -<p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p> +<p class="zoom-notice" id="track-hint"><?php echo $this->__('Double click on above image to view full picture') ?></p> <div class="zoom"> - <img id="zoom_out" src="<?php echo $this->getViewFileUrl('Mage_Catalog::images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" /> + <img id="zoom-out" src="<?php echo $this->getViewFileUrl('Mage_Catalog::images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" /> <div id="track"> - <div id="handle"></div> + <div id="slider"></div> </div> - <img id="zoom_in" src="<?php echo $this->getViewFileUrl('Mage_Catalog::images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" /> + <img id="zoom-in" src="<?php echo $this->getViewFileUrl('Mage_Catalog::images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" /> </div> <script type="text/javascript"> //<![CDATA[ - Event.observe(window, 'load', function() { - product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint'); +(function ($) { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/zoom.js')?>", function() { + $('#image').zoom({ + sliderSelector: '#slider', + zoomNoticeSelector: '#track-hint', + zoomInSelector: '#zoom-in', + zoomOutSelector: '#zoom-out' + }); }); +})(jQuery); //]]> </script> <?php else: ?> @@ -71,9 +78,16 @@ <?php $_size = $this->getBaseImageIconSize()?> <?php foreach ($this->getGalleryImages() as $_image): ?> <li> - <a href="#" onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" title="<?php echo $this->escapeHtml($_image->getLabel()) ?>"><img src="<?php echo $this->helper('Mage_Catalog_Helper_Image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($_size); ?>" width="<?php echo $_size?>" height="<?php echo $_size?>" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" /></a> + <a href="#" data-mage-popwin="{windowURL:'<?php echo $this->getGalleryUrl($_image) ?>',windowName:'gallery',width:300,height:300,status:1,scrollbars:1,resizable:1}" title="<?php echo $this->escapeHtml($_image->getLabel()) ?>"><img src="<?php echo $this->helper('Mage_Catalog_Helper_Image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($_size); ?>" width="<?php echo $_size?>" height="<?php echo $_size?>" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" /></a> </li> <?php endforeach; ?> </ul> </div> +<script type="text/javascript"> + (function($) { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.popupwindow.js')?>", + "<?php echo $this->getViewFileUrl('mage/popup-window.js')?>" + ); + })(jQuery); +</script> <?php endif; ?> diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/view/tabs.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/view/tabs.phtml index 78cc691aabfefcc16d3195e569f47bc52b3968d6..42d5fa8d8cb0b7a432ffe92e4e6472301d8d3103 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/view/tabs.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/view/tabs.phtml @@ -30,49 +30,17 @@ * @see Mage_Catalog_Block_Product_View */ ?> -<ul class="product-tabs"> +<div class="c pr" data-mage-init="{tabs: []}"> + <ul> + <?php foreach ($this->getTabs() as $_index => $_tab): ?> + <?php if($this->getChildHtml($_tab['alias'])): ?> + <li><a href="#pt-<?php echo $_tab['alias'] ?>"><?php echo $_tab['title']?></a></li> + <?php endif; ?> + <?php endforeach; ?> + </ul> <?php foreach ($this->getTabs() as $_index => $_tab): ?> <?php if($this->getChildHtml($_tab['alias'])): ?> - <li id="product_tabs_<?php echo $_tab['alias'] ?>" class="<?php echo !$_index?' active first':(($_index==count($this->getTabs())-1)?' last':'')?>"><a href="#"><?php echo $_tab['title']?></a></li> + <div id="pt-<?php echo $_tab['alias'] ?>"><?php echo $this->getChildHtml($_tab['alias']) ?></div> <?php endif; ?> <?php endforeach; ?> -</ul> -<?php foreach ($this->getTabs() as $_index => $_tab): ?> - <?php if($this->getChildHtml($_tab['alias'])): ?> - <div class="product-tabs-content" id="product_tabs_<?php echo $_tab['alias'] ?>_contents"><?php echo $this->getChildHtml($_tab['alias']) ?></div> - <?php endif; ?> -<?php endforeach; ?> -<script type="text/javascript"> -//<![CDATA[ -Varien.Tabs = Class.create(); -Varien.Tabs.prototype = { - initialize: function(selector) { - var self=this; - $$(selector+' a').each(this.initTab.bind(this)); - }, - - initTab: function(el) { - el.href = 'javascript:void(0)'; - if ($(el.parentNode).hasClassName('active')) { - this.showContent(el); - } - el.observe('click', this.showContent.bind(this, el)); - }, - - showContent: function(a) { - var li = $(a.parentNode), ul = $(li.parentNode); - ul.select('li', 'ol').each(function(el){ - var contents = $(el.id+'_contents'); - if (el==li) { - el.addClassName('active'); - contents.show(); - } else { - el.removeClassName('active'); - contents.hide(); - } - }); - } -} -new Varien.Tabs('.product-tabs'); -//]]> -</script> +</div> diff --git a/app/design/frontend/default/modern/Mage_Checkout/cart.phtml b/app/design/frontend/default/modern/Mage_Checkout/cart.phtml index b33ea7f818230186ddb9519c4d5ae4366287c3a3..c765ceae7f7fe21391cb4092944fce47fc724b7f 100644 --- a/app/design/frontend/default/modern/Mage_Checkout/cart.phtml +++ b/app/design/frontend/default/modern/Mage_Checkout/cart.phtml @@ -46,7 +46,7 @@ </div> <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> <?php echo $this->getChildHtml('form_before') ?> - <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post"> + <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post" id="form-validate"> <fieldset> <table id="shopping-cart-table" class="data-table cart-table"> <col width="1" /> @@ -165,3 +165,16 @@ </div> </div> </div> + +<script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#form-validate').validation(); + }); + })(jQuery); +</script> diff --git a/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml b/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml index 6f9c84ef4536ce06e07a432a123cc9caab6f85f1..16b3fe22f7ab8c968a159038ecd26da9109f5524 100644 --- a/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml +++ b/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml @@ -33,7 +33,7 @@ <input type="text" name="email" id="newsletter" title="<?php echo $this->__('Sign up for our newsletter') ?>" value="<?php echo $this->__('Enter your email address') ?>" - class="input-text" data-validate="{required:true,validateEmail:true}"/> + class="input-text" data-validate="{required:true, 'validate-email':true}"/> </div> <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"> <span><span><?php echo $this->__('Submit') ?></span></span></button> @@ -43,10 +43,9 @@ //<![CDATA[ (function($) { head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", "<?php echo $this->getViewFileUrl('Mage_Newsletter::newsletter.js')?>", function() { $('#newsletter').newsletter({ formSelector: '#newsletter-validate-detail', diff --git a/app/design/frontend/default/modern/Mage_Page/css/tabs.css b/app/design/frontend/default/modern/Mage_Page/css/tabs.css new file mode 100644 index 0000000000000000000000000000000000000000..b0cb7237e417bed070e3c53a942ec6131eef172a --- /dev/null +++ b/app/design/frontend/default/modern/Mage_Page/css/tabs.css @@ -0,0 +1,74 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category tabs style + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +div.ui-tabs { + padding: 0 0 20px 0; +} +div.ui-tabs ul{ + border-bottom: 1px solid #666; + background: #eee; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2', endColorstr='#d7d7d7'); /* for IE */ + background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#d7d7d7)); /* for webkit browsers */ + background: -moz-linear-gradient(top, #f2f2f2, #d7d7d7); /* for firefox 3.6+ */ +} +div.ui-tabs li:first-child{ + margin-left: -1px; +} +div.ui-tabs li:last-child{ + border-right: 0 none; +} +div.ui-tabs li { + position: relative; + z-index: 98; + display: inline-block; + line-height: 25px; + border-left: 1px solid #FFFFFF; + border-right: 1px solid #A4A4A4; + margin-right: -3px; + font-size: 1.1em; +} +div.ui-tabs li.ui-tabs-active { + background-color: #666; + z-index: 100; + font-weight: bold; +} +div.ui-tabs .ui-state-hover{ + color: #444; + background-color: #ddd; +} +div.ui-tabs > ul a { + text-decoration: none; + color: #000; + padding: 5px 15px; +} +div.ui-tabs .ui-tabs-active > a { + color: #fff; + background-color: #666; +} + +div.ui-tabs > div { + position: relative; + padding: 20px 0; + z-index: 99; +} \ No newline at end of file diff --git a/dev/shell/install.php b/dev/shell/install.php index e334f5a88afe3f5f8f1d776f2fede4d026721303..f383725f2b98ac2040ef15cdfe80a998ffead578 100644 --- a/dev/shell/install.php +++ b/dev/shell/install.php @@ -63,7 +63,9 @@ if (empty($args)) { define('BARE_BOOTSTRAP', 1); require_once __DIR__ . '/../../app/bootstrap.php'; -$installer = new Mage_Install_Model_Installer_Console(); +$installer = new Mage_Install_Model_Installer_Console( + new Magento_Filesystem(new Magento_Filesystem_Adapter_Local()) +); if (isset($args['show_locales'])) { var_export($installer->getAvailableLocales()); } else if (isset($args['show_currencies'])) { diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/MatrixTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/MatrixTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5fa9669f91e74fe9cf95dd751ce4fe6bf5c83f9f --- /dev/null +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/MatrixTest.php @@ -0,0 +1,62 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_Adminhtml + * @subpackage integration_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_MatrixTest extends PHPUnit_Framework_TestCase +{ + /** + * @magentoAppIsolation enabled + * @magentoDataFixture Mage/Catalog/_files/product_configurable.php + */ + public function testGetVariations() + { + Mage::register('current_product', Mage::getModel('Mage_Catalog_Model_Product')->load(1)); + Mage::app()->getLayout()->createBlock('Mage_Core_Block_Text', 'head'); + /** @var $usedAttribute Mage_Catalog_Model_Entity_Attribute */ + $usedAttribute = Mage::getSingleton('Mage_Catalog_Model_Entity_Attribute')->loadByCode( + Mage::getSingleton('Mage_Eav_Model_Config')->getEntityType('catalog_product')->getId(), + 'test_configurable' + ); + $attributeOptions = $usedAttribute->getSource()->getAllOptions(false); + /** @var $block Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Matrix */ + $block = Mage::app()->getLayout()->createBlock(preg_replace('/Test$/', '', __CLASS__)); + + $variations = $block->getVariations(); + foreach ($variations as &$variation) { + foreach ($variation as &$row) { + unset($row['price']); + } + } + + $this->assertEquals( + array( + array($usedAttribute->getId() => $attributeOptions[0]), + array($usedAttribute->getId() => $attributeOptions[1]), + ), + $variations + ); + } +} diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/ConfigTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/ConfigTest.php index 01d9dc0018f7724580aad7ccac53e4182029bd32..2393ec422bd286e50c62b5839fd2ed1f09fbade9 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/ConfigTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/ConfigTest.php @@ -57,29 +57,4 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_ConfigTest extends PHP $selectedAttribute = reset($selectedAttributes); $this->assertEquals('test_configurable', $selectedAttribute->getAttributeCode()); } - - /** - * @magentoAppIsolation enabled - * @magentoDataFixture Mage/Catalog/_files/product_configurable.php - */ - public function testGetVariations() - { - Mage::register('current_product', Mage::getModel('Mage_Catalog_Model_Product')->load(1)); - Mage::app()->getLayout()->createBlock('Mage_Core_Block_Text', 'head'); - /** @var $usedAttribute Mage_Catalog_Model_Entity_Attribute */ - $usedAttribute = Mage::getSingleton('Mage_Catalog_Model_Entity_Attribute')->loadByCode( - Mage::getSingleton('Mage_Eav_Model_Config')->getEntityType('catalog_product')->getId(), - 'test_configurable' - ); - $attributeOptions = $usedAttribute->getSource()->getAllOptions(false); - /** @var $block Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config */ - $block = Mage::app()->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config'); - $this->assertEquals( - array( - array($usedAttribute->getId() => $attributeOptions[0]), - array($usedAttribute->getId() => $attributeOptions[1]), - ), - $block->getVariations() - ); - } } diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight/RendererTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight/RendererTest.php index 84cf8254a86edd756643f77b342566795ccaddb5..5b8322d46d8df2b51d21f8464ddbf543e6f36bd4 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight/RendererTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight/RendererTest.php @@ -34,7 +34,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight_RendererTest exten public function testIsVirtualChecked($type) { $currentProduct = Mage::getModel('Mage_Catalog_Model_Product'); - $currentProduct->setTypeInstance(new $type); + $currentProduct->setTypeInstance(Mage::getObjectManager()->create($type)); $block = new Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight_Renderer(); @@ -64,7 +64,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight_RendererTest exten public function testIsVirtualUnchecked($type) { $currentProduct = Mage::getModel('Mage_Catalog_Model_Product'); - $currentProduct->setTypeInstance(new $type); + $currentProduct->setTypeInstance(Mage::getObjectManager()->create($type)); $block = new Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight_Renderer(); diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php index 13a1c467ebd70334b6b6338f54eba2bd33279783..a5f14a8427fc970f28fa9cce56a1dc5a1e0a0478 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php @@ -48,7 +48,8 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Form_AbstractTest Mage::getObjectManager()->get('Mage_Core_Model_Session'), Mage::getObjectManager()->get('Mage_Core_Model_Store_Config'), Mage::getObjectManager()->get('Mage_Core_Controller_Varien_Front'), - Mage::getObjectManager()->get('Mage_Core_Model_Factory_Helper') + Mage::getObjectManager()->get('Mage_Core_Model_Factory_Helper'), + Mage::getObjectManager()->get('Magento_Filesystem'), ); /** @var $block Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract */ $block = $this->getMockForAbstractClass('Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract', $arguments); diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/Form/ContainerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/Form/ContainerTest.php index 3740cd845c0977bfa8fe6b8ce14662a107b588f2..a0ae7015c79748c87878785d5930645ac4e0edc5 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/Form/ContainerTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/Form/ContainerTest.php @@ -43,7 +43,8 @@ class Mage_Adminhtml_Block_Widget_Form_ContainerTest extends PHPUnit_Framework_T 'Mage_Core_Model_Session', 'Mage_Core_Model_Store_Config', 'Mage_Core_Controller_Varien_Front', - 'Mage_Core_Model_Factory_Helper' + 'Mage_Core_Model_Factory_Helper', + 'Magento_Filesystem' ); public function testGetFormHtml() diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php index 327bcfcafdaa6e34281cdf65d224409d11c9db34..9455a37c63235fad2f1a93f989947e3bee5db453 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php @@ -73,20 +73,4 @@ class Mage_Adminhtml_Catalog_ProductControllerTest extends Mage_Backend_Utility_ $this->assertEquals('Unable to save product', $errorMessages[0]->getCode()); $this->assertRedirect($this->stringContains('/backend/admin/catalog_product/edit')); } - - /** - * @magentoDataFixture Mage/Catalog/_files/product_configurable.php - */ - public function testQuickCreateActionWithDangerRequest() - { - $this->getRequest()->setPost(array( - 'simple_product' => array( - 'entity_id' => 15 - ), - 'product' => 1 - )); - $this->dispatch('backend/admin/catalog_product/quickcreate'); - $this->assertContains('"error":{"message":"Unable to create product","fields":{"sku":null}}', - $this->getResponse()->getBody()); - } } diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormStub.php b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormStub.php index 5fc1f741733a0d8703ae8bb59bc54ef87fc3b488..2062847df06f674b5831a8b4bd5fff7e589dd9b6 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormStub.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormStub.php @@ -35,6 +35,11 @@ class Mage_Backend_Block_System_Config_FormStub extends Mage_Backend_Block_Syste */ protected $_configDataStub = array(); + /** + * @var array + */ + protected $_configRootStub = array(); + /** * Sets stub config data * @@ -46,6 +51,17 @@ class Mage_Backend_Block_System_Config_FormStub extends Mage_Backend_Block_Syste $this->_configDataStub = $configData; } + /** + * Sets stub config root + * + * @param array $configRoot + * @return void + */ + public function setStubConfigRoot(array $configRoot = array()) + { + $this->_configRootStub = $configRoot; + } + /** * Initialize properties of object required for test. * @@ -55,6 +71,9 @@ class Mage_Backend_Block_System_Config_FormStub extends Mage_Backend_Block_Syste { parent::_initObjects(); $this->_configData = $this->_configDataStub; + if ($this->_configRootStub) { + $this->_configRoot = $this->_configRootStub; + } $this->_fieldRenderer = Mage::app()->getLayout()->createBlock( 'Mage_Backend_Block_System_Config_Form_Field' ); diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormTest.php b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormTest.php index 1803b2ff6810e4ba12773276d8d157594216cc7a..153d70d33b9dc24fe0950b11bdb7a40ebf0c5dfa 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormTest.php @@ -92,6 +92,38 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa } } + + /** + * @covers Mage_Backend_Block_System_Config_Form::initFields + * @param $section Mage_Backend_Model_Config_Structure_Element_Section + * @param $group Mage_Backend_Model_Config_Structure_Element_Group + * @param $field Mage_Backend_Model_Config_Structure_Element_Field + * @param array $configData + * @param bool $expectedUseDefault + * @dataProvider initFieldsInheritCheckboxDataProvider + * @magentoConfigFixture default/test_config_section/test_group_config_node/test_field_value config value + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function testInitFieldsUseConfigPath($section, $group, $field, array $configData, $expectedUseDefault) + { + Mage::getConfig()->setCurrentAreaCode('adminhtml'); + $form = new Varien_Data_Form(); + $fieldset = $form->addFieldset($section->getId() . '_' . $group->getId(), array()); + + /** @var $block Mage_Backend_Block_System_Config_FormStub */ + $block = Mage::app()->getLayout()->createBlock('Mage_Backend_Block_System_Config_FormStub'); + $block->setScope(Mage_Backend_Block_System_Config_Form::SCOPE_DEFAULT); + $block->setStubConfigData($configData); + $block->initFields($fieldset, $group, $section); + + $fieldsetSel = 'fieldset'; + $valueSel = sprintf('input#%s_%s_%s', $section->getId(), $group->getId(), $field->getId()); + $fieldsetHtml = $fieldset->getElementHtml(); + + $this->assertSelectCount($fieldsetSel, true, $fieldsetHtml, 'Fieldset HTML is invalid'); + $this->assertSelectCount($valueSel, true, $fieldsetHtml, 'Field input not found in fieldset HTML'); + } + /** * @return array */ @@ -132,11 +164,17 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa $fieldPath = $field->getConfigPath(); + /** @var Mage_Backend_Model_Config_Structure_Element_Field $field */ + $field2 = $structure->getElement('test_section/test_group/test_field_use_config'); + + $fieldPath2 = $field2->getConfigPath(); + return array( array($section, $group, $field, array(), true), array($section, $group, $field, array($fieldPath => null), false), array($section, $group, $field, array($fieldPath => ''), false), array($section, $group, $field, array($fieldPath => 'value'), false), + array($section, $group, $field2, array($fieldPath2 => 'config value'), true), ); } diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/_files/test_section_config.xml b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/_files/test_section_config.xml index 6f1240e13dddc6b1eab5575435631708efb795f3..4d75ecd176ebb561acf756b66ad2eb21891a1a25 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/_files/test_section_config.xml +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/_files/test_section_config.xml @@ -41,6 +41,10 @@ <label>Test Field</label> <config_path>test_section/test_group/test_field</config_path> </field> + <field id="test_field_use_config" translate="label comment" showInDefault="1" showInWebsite="1" showInStore="1" type="text" sortOrder="20"> + <label>Test Field</label> + <config_path>test_config_section/test_group_config_node/test_field_value</config_path> + </field> </group> </section> </system> diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php b/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php index ba82d8dde3dc5720c2d8e842ecf389fe74420aba..966e1d28ae3bda47cb0f5645995d0d81b3e70105 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php @@ -59,6 +59,7 @@ class Mage_Backend_Block_Widget_GridTest extends PHPUnit_Framework_TestCase 'Mage_Core_Model_Store_Config', 'Mage_Core_Controller_Varien_Front', 'Mage_Core_Model_Factory_Helper', + 'Magento_Filesystem', 'Mage_Backend_Helper_Data', 'Mage_Backend_Model_Widget_Grid_Row_UrlGeneratorFactory', 'Mage_Backend_Model_Widget_Grid_SubTotals', diff --git a/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Backend/Admin/RobotsTest.php b/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Backend/Admin/RobotsTest.php index 60bbaca990e287bb024f9da4c95538f942ff41b7..63335a7cfdef75d106ba78dc62c797b0cbb7f327 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Backend/Admin/RobotsTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Backend/Admin/RobotsTest.php @@ -37,7 +37,6 @@ class Mage_Backend_Model_Config_Backend_Admin_RobotsTest extends PHPUnit_Framewo */ protected function setUp() { - /** @var _model Mage_Backend_Model_Config_Backend_Admin_Robots */ $this->_model = Mage::getModel('Mage_Backend_Model_Config_Backend_Admin_Robots'); $this->_model->setPath('design/search_engine_robots/custom_instructions'); $this->_model->afterLoad(); diff --git a/dev/tests/integration/testsuite/Mage/Backend/Model/ConfigTest.php b/dev/tests/integration/testsuite/Mage/Backend/Model/ConfigTest.php index a5ab62029d262422110d74c0d06e1c7e3f1974f2..a489ee3bf575138099eb0b1b1c497be0ca39d9fb 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Model/ConfigTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Model/ConfigTest.php @@ -28,9 +28,10 @@ class Mage_Backend_Model_Config_DataTest extends PHPUnit_Framework_TestCase { /** + * @covers Mage_Backend_Model_Config::save * @param array $groups * @magentoDbIsolation enabled - * @dataProvider saveDataProvider + * @dataProvider saveWithSingleStoreModeEnabledDataProvider * @magentoConfigFixture current_store general/single_store_mode/enabled 1 */ public function testSaveWithSingleStoreModeEnabled($groups) @@ -67,8 +68,41 @@ class Mage_Backend_Model_Config_DataTest extends PHPUnit_Framework_TestCase $this->assertArrayNotHasKey('dev/debug/template_hints_blocks', $_configData); } - public function saveDataProvider() + public function saveWithSingleStoreModeEnabledDataProvider() { return require(__DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'config_groups.php'); } + + /** + * @covers Mage_Backend_Model_Config::save + * @param string $section + * @param array $groups + * @param array $expected + * @magentoDbIsolation enabled + * @dataProvider saveDataProvider + */ + public function testSave($section, $groups, $expected) + { + /** @var $_configDataObject Mage_Backend_Model_Config */ + $_configDataObject = Mage::getModel('Mage_Backend_Model_Config'); + $_configDataObject->setSection($section) + ->setGroups($groups) + ->save(); + + $_configDataObject = Mage::getModel('Mage_Backend_Model_Config'); + foreach ($expected as $group => $expectedData) { + $_configData = $_configDataObject->setSection($group) + ->load(); + if (array_key_exists('payment/payflow_link/pwd', $_configData)) { + $_configData['payment/payflow_link/pwd'] = Mage::helper('Mage_Core_Helper_Data') + ->decrypt($_configData['payment/payflow_link/pwd']); + } + $this->assertEquals($expectedData, $_configData); + } + } + + public function saveDataProvider() + { + return require(__DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'config_section.php'); + } } diff --git a/dev/tests/integration/testsuite/Mage/Backend/Model/_files/config_section.php b/dev/tests/integration/testsuite/Mage/Backend/Model/_files/config_section.php new file mode 100644 index 0000000000000000000000000000000000000000..1f9ed48d2c1adf00f2dd916bb6b295b4351d40cb --- /dev/null +++ b/dev/tests/integration/testsuite/Mage/Backend/Model/_files/config_section.php @@ -0,0 +1,62 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_Backend + * @subpackage integration_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +return array(array ('section' => 'paypal', 'groups' =>array( + 'account' => array ( + 'fields' => array ( + 'merchant_country' => array ('value' => 'US'), + 'business_account' => array ('value' => 'owner@example.com'), + ), + ), + 'global' => array ( + 'fields' => array ( + 'payflow_link' => array ('value' => '1'), + ), + ), + 'payflow_link' => array ( + 'fields' => array ( + 'partner' => array ('value' => 'link_partner'), + 'vendor' => array ('value' => 'link_vendor'), + 'user' => array ('value' => 'link_user'), + 'pwd' => array ('value' => 'password'), + ), + ), + ), + 'expected' => array( + 'paypal' => array( + 'paypal/general/business_account' => 'owner@example.com', + 'paypal/general/merchant_country' => 'US' + ), + 'payment/payflow_link' => array( + 'payment/payflow_link/active' => '1', + 'payment/payflow_link/partner' => 'link_partner', + 'payment/payflow_link/vendor' => 'link_vendor', + 'payment/payflow_link/user' => 'link_user', + 'payment/payflow_link/pwd' => 'password', + ) + ) +)); diff --git a/dev/tests/integration/testsuite/Mage/Backend/Utility/Controller.php b/dev/tests/integration/testsuite/Mage/Backend/Utility/Controller.php index 01cc6abc6b7bbde724d3880cf80d7bded0dffc35..b0191c39f97135550685d30cc9865460c9d2fbf1 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Utility/Controller.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Utility/Controller.php @@ -46,7 +46,7 @@ class Mage_Backend_Utility_Controller extends Magento_Test_TestCase_ControllerAb { parent::setUp(); - Mage::setCurrentArea('adminhtml'); + Mage::app()->loadDiConfiguration(Mage_Core_Model_App_Area::AREA_ADMINHTML); Mage::getSingleton('Mage_Backend_Model_Url')->turnOffSecretKey(); $this->_auth = Mage::getModel('Mage_Backend_Model_Auth'); diff --git a/dev/tests/integration/testsuite/Mage/Bundle/controllers/ProductControllerTest.php b/dev/tests/integration/testsuite/Mage/Bundle/controllers/ProductControllerTest.php index 04e7e2ab9f3df609c7f4de1ceecd06f18b7b080b..52e1a6d171192c5688bc93be0d4d329052932026 100644 --- a/dev/tests/integration/testsuite/Mage/Bundle/controllers/ProductControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Bundle/controllers/ProductControllerTest.php @@ -49,6 +49,6 @@ class Mage_Bundle_ProductControllerTest extends Magento_Test_TestCase_Controller $this->assertEquals(1, $actualLinkCount, 'Bundle product options should appear on the page exactly once.'); $this->assertNotContains('class="options-container-big"', $responseBody); $this->assertStringMatchesFormat('%Aclass="product-options" id="product-options-wrapper">%A' - . 'for="bundle-option-%Avar DateOption = Class.create({%A', $responseBody); + . 'for="bundle-option-%A', $responseBody); } } diff --git a/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/MediaTest.php b/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/MediaTest.php index 430948976d69dfb386c863580d24aa1a2360c51f..9f405eecb9649bf7a4ad3be0d7277f5669dfea56 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/MediaTest.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/MediaTest.php @@ -49,11 +49,15 @@ class Mage_Catalog_Model_Product_Attribute_Backend_MediaTest extends PHPUnit_Fra public static function setUpBeforeClass() { self::$_mediaTmpDir = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config')->getBaseTmpMediaPath(); - $fixtureDir = realpath(dirname(__FILE__).'/../../../../_files'); - self::$_mediaDir = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config')->getBaseMediaPath(); + $fixtureDir = realpath(dirname(__FILE__).'/../../../../_files'); + self::$_mediaDir = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config')->getBaseMediaPath(); - mkdir(self::$_mediaTmpDir, 0777, true); - mkdir(self::$_mediaDir, 0777, true); + if (!is_dir(self::$_mediaTmpDir)) { + mkdir(self::$_mediaTmpDir, 0777, true); + } + if (!is_dir(self::$_mediaDir)) { + mkdir(self::$_mediaDir, 0777, true); + } copy($fixtureDir . "/magento_image.jpg", self::$_mediaTmpDir . "/magento_image.jpg"); copy($fixtureDir . "/magento_image.jpg", self::$_mediaDir . "/magento_image.jpg"); diff --git a/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Type/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Type/AbstractTest.php index f2f7ef6e16e7c62e20388039ae0494fc86a4d7ae..6d6ec84b04d7bc4aa0da3e9bd58cf13ace943bdf 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Type/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Type/AbstractTest.php @@ -34,7 +34,9 @@ class Mage_Catalog_Model_Product_Type_AbstractTest extends PHPUnit_Framework_Tes protected function setUp() { - $this->_model = $this->getMockForAbstractClass('Mage_Catalog_Model_Product_Type_Abstract'); + $this->_model = $this->getMockBuilder('Mage_Catalog_Model_Product_Type_Abstract') + ->disableOriginalConstructor() + ->getMockForAbstractClass(); } protected function tearDown() @@ -114,16 +116,11 @@ class Mage_Catalog_Model_Product_Type_AbstractTest extends PHPUnit_Framework_Tes public function testGetAttributeById() { - $product = Mage::getModel('Mage_Catalog_Model_Product'); - $product->load(1); // fixture - $this->assertNull($this->_model->getAttributeById(-1, $product)); - - // @bug: MAGE-2831 - //$this->assertNull($this->_model->getAttributeById(null, $product)); + /** @var $product Mage_Catalog_Model_Product */ + $product = Mage::getModel('Mage_Catalog_Model_Product')->load(1); - $this->assertInstanceOf( - 'Mage_Catalog_Model_Resource_Eav_Attribute', $this->_model->getAttributeById(null, $product) - ); + $this->assertNull($this->_model->getAttributeById(-1, $product)); + $this->assertNull($this->_model->getAttributeById(null, $product)); $sku = Mage::getSingleton('Mage_Eav_Model_Config')->getAttribute('catalog_product', 'sku'); $this->assertSame($sku, $this->_model->getAttributeById($sku->getId(), $product)); diff --git a/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Type/ConfigurableTest.php b/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Type/ConfigurableTest.php index cdd90d6417d2dea001cdf21ef3212e25b3641dfd..e594e4a5f0ef5cef78f11a0441b49f8f17b87b88 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Type/ConfigurableTest.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Type/ConfigurableTest.php @@ -31,6 +31,8 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework_TestCase { /** + * Object under test + * * @var Mage_Catalog_Model_Product_Type_Configurable */ protected $_model; @@ -133,8 +135,7 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework public function testGetConfigurableAttributesAsArray() { $attributes = $this->_model->getConfigurableAttributesAsArray($this->_product); - $this->assertArrayHasKey(0, $attributes); - $attribute = $attributes[0]; + $attribute = reset($attributes); $this->assertArrayHasKey('id', $attribute); $this->assertArrayHasKey('label', $attribute); $this->assertArrayHasKey('use_default', $attribute); @@ -158,7 +159,7 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework $this->assertArrayHasKey('store_label', $attribute); $testConfigurable = $this->_getAttributeByCode('test_configurable'); - $this->assertEquals($testConfigurable->getId(), $attributes[0]['attribute_id']); + $this->assertEquals($testConfigurable->getId(), $attribute['attribute_id']); } /** @@ -167,8 +168,8 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework public function testGetParentIdsByChild() { $attributes = $this->_model->getConfigurableAttributesAsArray($this->_product); - $confAttribute = $attributes[0]; - $optionValueId = $confAttribute['values'][0]['value_index']; + $attribute = reset($attributes); + $optionValueId = $attribute['values'][0]['value_index']; $result = $this->_model->getParentIdsByChild($optionValueId * 10); // fixture $this->assertEquals(array(1), $result); } @@ -229,11 +230,11 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework public function testGetProductByAttributes() { $attributes = $this->_model->getConfigurableAttributesAsArray($this->_product); - $confAttribute = $attributes[0]; - $optionValueId = $confAttribute['values'][0]['value_index']; + $attribute = reset($attributes); + $optionValueId = $attribute['values'][0]['value_index']; $product = $this->_model->getProductByAttributes( - array($confAttribute['attribute_id'] => $optionValueId), + array($attribute['attribute_id'] => $optionValueId), $this->_product ); $this->assertInstanceOf('Mage_Catalog_Model_Product', $product); @@ -246,14 +247,22 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework public function testGetSelectedAttributesInfo() { $attributes = $this->_model->getConfigurableAttributesAsArray($this->_product); - $confAttribute = $attributes[0]; - $optionValueId = $confAttribute['values'][0]['value_index']; + $attribute = reset($attributes); + $optionValueId = $attribute['values'][0]['value_index']; $this->_product->addCustomOption( - 'attributes', serialize(array($confAttribute['attribute_id'] => $optionValueId)) + 'attributes', serialize(array($attribute['attribute_id'] => $optionValueId)) ); $info = $this->_model->getSelectedAttributesInfo($this->_product); - $this->assertEquals(array(array('label' => 'Test Configurable', 'value' => 'Option 1')), $info); + $this->assertEquals( + array( + array( + 'label' => 'Test Configurable', + 'value' => 'Option 1' + ) + ), + $info + ); } /** @@ -262,11 +271,12 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework public function testPrepareForCart() { $attributes = $this->_model->getConfigurableAttributesAsArray($this->_product); - $confAttribute = $attributes[0]; - $optionValueId = $confAttribute['values'][0]['value_index']; + $attribute = reset($attributes); + $optionValueId = $attribute['values'][0]['value_index']; $buyRequest = new Varien_Object(array( - 'qty' => 5, 'super_attribute' => array($confAttribute['attribute_id'] => $optionValueId) + 'qty' => 5, + 'super_attribute' => array($attribute['attribute_id'] => $optionValueId) )); $result = $this->_model->prepareForCart($buyRequest, $this->_product); $this->assertInternalType('array', $result); @@ -400,6 +410,57 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework ); } + /** + * @param array $productsData + * @dataProvider generateSimpleProductsDataProvider + */ + public function testGenerateSimpleProducts($productsData) + { + $this->_product->setNewVariationsAttributeSetId(4); // Default attribute set id + $generatedProducts = $this->_model->generateSimpleProducts($this->_product, $productsData); + $this->assertEquals(3, count($generatedProducts)); + foreach ($generatedProducts as $productId) { + /** @var $product Mage_Catalog_Model_Product */ + $product = Mage::getModel('Mage_Catalog_Model_Product'); + $product->load($productId); + $this->assertNotNull($product->getName()); + $this->assertNotNull($product->getSku()); + $this->assertNotNull($product->getPrice()); + $this->assertNotNull($product->getWeight()); + } + } + + /** + * @return array + */ + public static function generateSimpleProductsDataProvider() + { + return array(array(array( + 25 => array( + 'name' => '1-aaa', + 'configurable_attribute' => '{"configurable_attribute":"25"}', + 'price' => '3', + 'sku' => '1-aaa', + 'quantity_and_stock_status' => array('qty' => '5'), + 'weight' => '6'), + 24 => array( + 'name' => '1-bbb', + 'configurable_attribute' => '{"configurable_attribute":"24"}', + 'price' => '3', + 'sku' => '1-bbb', + 'quantity_and_stock_status' => array('qty' => '5'), + 'weight' => '6'), + 23 => array( + 'name' => '1-ccc', + 'configurable_attribute' => '{"configurable_attribute":"23"}', + 'price' => '3', + 'sku' => '1-ccc', + 'quantity_and_stock_status' => array('qty' => '5'), + 'weight' => '6' + ), + ))); + } + /** * Find and instantiate a catalog attribute model by attribute code * @@ -417,11 +478,12 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework protected function _prepareForCart() { $attributes = $this->_model->getConfigurableAttributesAsArray($this->_product); - $confAttribute = $attributes[0]; - $optionValueId = $confAttribute['values'][0]['value_index']; + $attribute = reset($attributes); + $optionValueId = $attribute['values'][0]['value_index']; $buyRequest = new Varien_Object(array( - 'qty' => 5, 'super_attribute' => array($confAttribute['attribute_id'] => $optionValueId) + 'qty' => 5, + 'super_attribute' => array($attribute['attribute_id'] => $optionValueId) )); $this->_model->prepareForCart($buyRequest, $this->_product); } diff --git a/dev/tests/integration/testsuite/Mage/Catalog/Model/ProductTest.php b/dev/tests/integration/testsuite/Mage/Catalog/Model/ProductTest.php index e06787fe0d7468416961bb69ae803de349a3b0d1..e498dea0576c1a6d118ee85c4a55464d3aa12dad 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/Model/ProductTest.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/Model/ProductTest.php @@ -52,10 +52,12 @@ class Mage_Catalog_Model_ProductTest extends PHPUnit_Framework_TestCase public static function tearDownAfterClass() { - /** @var $config Mage_Catalog_Model_Product_Media_Config */ + /** @var Mage_Catalog_Model_Product_Media_Config $config */ $config = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config'); - Varien_Io_File::rmdirRecursive($config->getBaseMediaPath()); - Varien_Io_File::rmdirRecursive($config->getBaseTmpMediaPath()); + + $filesystem = Mage::getObjectManager()->get('Magento_Filesystem'); + $filesystem->delete($config->getBaseMediaPath()); + $filesystem->delete($config->getBaseTmpMediaPath()); } public function testCanAffectOptions() @@ -92,14 +94,39 @@ class Mage_Catalog_Model_ProductTest extends PHPUnit_Framework_TestCase public function testAddImageToMediaGallery() { - $this->_model->addImageToMediaGallery(dirname(dirname(__FILE__)) . '/_files/magento_image.jpg'); - $gallery = $this->_model->getData('media_gallery'); - $this->assertNotEmpty($gallery); - $this->assertTrue(isset($gallery['images'][0]['file'])); - $this->assertStringStartsWith('/m/a/magento_image', $gallery['images'][0]['file']); - $this->assertTrue(isset($gallery['images'][0]['position'])); - $this->assertTrue(isset($gallery['images'][0]['disabled'])); - $this->assertArrayHasKey('label', $gallery['images'][0]); + // Model accepts only files in tmp media path, we need to copy fixture file there + $mediaFile = $this->_copyFileToBaseTmpMediaPath(dirname(dirname(__FILE__)) . '/_files/magento_image.jpg'); + + $this->_model->addImageToMediaGallery($mediaFile); + $gallery = $this->_model->getData('media_gallery'); + $this->assertNotEmpty($gallery); + $this->assertTrue(isset($gallery['images'][0]['file'])); + $this->assertStringStartsWith('/m/a/magento_image', $gallery['images'][0]['file']); + $this->assertTrue(isset($gallery['images'][0]['position'])); + $this->assertTrue(isset($gallery['images'][0]['disabled'])); + $this->assertArrayHasKey('label', $gallery['images'][0]); + } + + /** + * Copy file to media tmp directory and return it's name + * + * @param string $sourceFile + * @return string + */ + protected function _copyFileToBaseTmpMediaPath($sourceFile) + { + /** @var Mage_Catalog_Model_Product_Media_Config $config */ + $config = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config'); + $baseTmpMediaPath = $config->getBaseTmpMediaPath(); + + $targetFile = $baseTmpMediaPath . DS . basename($sourceFile); + + /** @var Magento_Filesystem $filesystem */ + $filesystem = Mage::getObjectManager()->create('Magento_Filesystem'); + $filesystem->setIsAllowCreateDirectories(true); + $filesystem->copy($sourceFile, $targetFile); + + return $targetFile; } /** @@ -388,4 +415,21 @@ class Mage_Catalog_Model_ProductTest extends PHPUnit_Framework_TestCase $this->assertInstanceOf('Varien_Object', $result); $this->assertArrayHasKey('errors', $result->getData()); } + + public function testValidate() + { + $this->_model->setTypeId('simple')->setAttributeSetId(4)->setName('Simple Product') + ->setSku(uniqid('', true) . uniqid('', true) . uniqid('', true))->setPrice(10)->setMetaTitle('meta title') + ->setMetaKeyword('meta keyword')->setMetaDescription('meta description') + ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) + ->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED) + ->setCollectExceptionMessages(true) + ; + $validationResult = $this->_model->validate(); + $this->assertEquals('SKU length should be 64 characters maximum.', $validationResult['sku']); + unset($validationResult['sku']); + foreach ($validationResult as $error) { + $this->assertTrue($error); + } + } } diff --git a/dev/tests/integration/testsuite/Mage/Catalog/controllers/_files/products.php b/dev/tests/integration/testsuite/Mage/Catalog/controllers/_files/products.php index 014db8bae63b6ef8f680e05a24dde1ea88248dc5..20caba72086ccc7259559350db31dcb389c42ffc 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/controllers/_files/products.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/controllers/_files/products.php @@ -25,6 +25,16 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +// Copy images to tmp media path +/** @var Mage_Catalog_Model_Product_Media_Config $config */ +$config = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config'); +$baseTmpMediaPath = $config->getBaseTmpMediaPath(); + +/** @var Magento_Filesystem $filesystem */ +$filesystem = Mage::getObjectManager()->create('Magento_Filesystem'); +$filesystem->setIsAllowCreateDirectories(true); +$filesystem->copy(dirname(__FILE__) . '/product_image.png', $baseTmpMediaPath . '/product_image.png'); + /** @var $productOne Mage_Catalog_Model_Product */ $productOne = Mage::getModel('Mage_Catalog_Model_Product'); $productOne->setId(1) @@ -52,7 +62,7 @@ $productOne->setId(1) ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) ->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED) - ->addImageToMediaGallery(dirname(__FILE__) . '/product_image.png', null, false, false) + ->addImageToMediaGallery($baseTmpMediaPath . '/product_image.png', null, false, false) ->save(); diff --git a/dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php index aabe61c4641958beeabc8832d516102ba5d5208b..a35eadadb08311b3c14272e06dd9004f7c13808d 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php @@ -424,11 +424,11 @@ class Mage_Core_Block_AbstractTest extends PHPUnit_Framework_TestCase public function testGetChildData() { $parent = $this->_createBlockWithLayout('parent', 'parent'); - $block = $this->_createBlockWithLayout('block', 'block', 'Mage_Core_Block_Template'); + $block = $this->_createBlockWithLayout('block', 'block', 'Mage_Core_Block_Text'); $block->setSomeValue('value'); $parent->setChild('block1', $block); $this->assertEquals( - array('type' => 'Mage_Core_Block_TemplateMock', 'some_value' => 'value'), + array('type' => 'Mage_Core_Block_TextMock', 'some_value' => 'value'), $parent->getChildData('block1') ); $this->assertEquals('value', $parent->getChildData('block1', 'some_value')); diff --git a/dev/tests/integration/testsuite/Mage/Core/Block/TemplateTest.php b/dev/tests/integration/testsuite/Mage/Core/Block/TemplateTest.php index 9e5660154e7b0e9f5bc2dfab5f28db36c997342b..d467916cd9e2e2a0feb85a60187f844d1c5e783e 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Block/TemplateTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Block/TemplateTest.php @@ -137,7 +137,7 @@ class Mage_Core_Block_TemplateTest extends PHPUnit_Framework_TestCase $this->_block->setLayout($layout); $this->assertTrue($this->_block->getDirectOutput()); - $this->assertEmpty($this->_block->fetchView(uniqid('invalid_filename.phtml'))); + $this->assertEmpty($this->_block->fetchView(__DIR__ . DS . uniqid('invalid_filename.phtml'))); } /** diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/AppTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/AppTest.php index e11ef31507f1a763bb6185dc2db6c322c940458a..394cd9a1e8ada2dcd7562b368676b1790097b1cf 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/AppTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/AppTest.php @@ -59,6 +59,12 @@ class Mage_Core_Model_AppTest extends PHPUnit_Framework_TestCase $this->_mageModel = null; } + /** + * @covers Mage_Core_Model_App::_initCache + * + * @magentoConfigFixture global/cache/id_prefix test + * @magentoAppIsolation enabled + */ public function testInit() { $this->assertNull($this->_model->getConfig()); @@ -66,6 +72,12 @@ class Mage_Core_Model_AppTest extends PHPUnit_Framework_TestCase $this->assertInstanceOf('Mage_Core_Model_Config', $this->_model->getConfig()); $this->assertNotEmpty($this->_model->getConfig()->getNode()); $this->assertContains(Mage_Core_Model_App::ADMIN_STORE_ID, array_keys($this->_model->getStores(true))); + + // Check that we have shared cache object inside of object manager + $objectManager = Mage::getObjectManager(); + /** @var $cache Mage_Core_Model_Cache */ + $cache = $objectManager->get('Mage_Core_Model_Cache'); + $this->assertAttributeEquals('test', '_idPrefix', $cache); } /** @@ -375,4 +387,17 @@ class Mage_Core_Model_AppTest extends PHPUnit_Framework_TestCase $this->assertInternalType('array', $groups); $this->assertGreaterThanOrEqual(1, count($groups)); } + + /** + * @magentoConfigFixture global/di/preferences/Mage_Core_Model_Url Mage_Backend_Model_Url + * @magentoConfigFixture frontend/di/preferences/Mage_Core_Model_Url Mage_DesignEditor_Model_Url_NavigationMode + */ + public function testLoadDiConfiguration() + { + $objectManager = Mage::getObjectManager(); + $this->_model = $objectManager->get('Mage_Core_Model_App'); + $this->_model->loadDiConfiguration('frontend'); + $testInstance = $objectManager->create('Mage_Backend_Block_Widget_Grid_ColumnSet'); + $this->assertAttributeInstanceOf('Mage_DesignEditor_Model_Url_NavigationMode', '_urlBuilder', $testInstance); + } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/FallbackTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/FallbackTest.php index 126b6a1e72d0f1fc0e1ac286b312a2471b4e03bb..1b146602498a20825a99b2c2793bdc77e354205a 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/FallbackTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/FallbackTest.php @@ -58,7 +58,7 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase 'themeModel' => $themeModel, ); - return new Mage_Core_Model_Design_Fallback($params); + return Mage::getObjectManager()->create('Mage_Core_Model_Design_Fallback', array('data' => $params)); } /** diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php index 25dc550acdd9fc8f82db3a83cbd5dc4659a666c9..e5eaf439f447cfeb6b6711381adef34b9f3db4da 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php @@ -62,14 +62,15 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'design', Mage::getModel('Mage_Core_Model_Design_Package') )); - $themeUtility->registerThemes()->setDesignTheme('package/default', 'frontend');; + $themeUtility->registerThemes()->setDesignTheme('package/default', 'frontend'); $this->_model = $themeUtility->getDesign(); } protected function tearDown() { - Varien_Io_File::rmdirRecursive(self::$_themePublicDir); - $this->_model = null; + $filesystem = Mage::getObjectManager()->create('Magento_Filesystem'); + $filesystem->delete(self::$_themePublicDir . '/frontend'); + $filesystem->delete(self::$_viewPublicMergedDir); } /** diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackagePublicationTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackagePublicationTest.php index bb91676a835e51c55f037e5e5603097dca91bb1a..47c25d82fffe6f673860a3ed818d30f16b26e2ad 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackagePublicationTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackagePublicationTest.php @@ -68,9 +68,10 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te protected function tearDown() { - Varien_Io_File::rmdirRecursive(self::$_themePublicDir); - Varien_Io_File::rmdirRecursive(self::$_fixtureTmpDir); - $this->_model = null; + $filesystem = Mage::getObjectManager()->create('Magento_Filesystem'); + $filesystem->delete(self::$_fixtureTmpDir); + $filesystem->delete(self::$_themePublicDir . '/adminhtml'); + $filesystem->delete(self::$_themePublicDir . '/frontend'); } /** @@ -265,6 +266,7 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te public function testPublishViewFile($file, $designParams, $expectedFile) { $expectedFile = self::$_themePublicDir . '/' . $expectedFile; + $this->_deleteFiles[] = $expectedFile; // test doesn't make sense if the original file doesn't exist or the target file already exists $originalFile = $this->_model->getViewFile($file, $designParams); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php index 6cfe2b1eb93412e6491bae4e5ffb4e07ec3bc759..4942ea526c7a27500046d05aa1c0cde46036930b 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php @@ -39,7 +39,10 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase public static function setUpBeforeClass() { - Varien_Io_File::rmdirRecursive(Mage::app()->getConfig()->getOptions()->getMediaDir() . '/theme'); + $mediaDir = Mage::app()->getConfig()->getOptions()->getMediaDir(); + $filesystem = Mage::getObjectManager()->create('Magento_Filesystem'); + $filesystem->delete($mediaDir . '/theme/frontend'); + $filesystem->delete($mediaDir . '/theme/_merged'); $ioAdapter = new Varien_Io_File(); $ioAdapter->cp( diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Email/TemplateTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Email/TemplateTest.php index 6cbbb5f1a8c90b79bb381c8c0983ca213a009d6e..ababfcca6e8077358bc99d8250785b8cebcca95f 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Email/TemplateTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Email/TemplateTest.php @@ -44,7 +44,14 @@ class Mage_Core_Model_Email_TemplateTest extends PHPUnit_Framework_TestCase $this->_mail = $this->getMock( 'Zend_Mail', array('send', 'addTo', 'addBcc', 'setReturnPath', 'setReplyTo'), array('utf-8') ); - $this->_model = $this->getMock('Mage_Core_Model_Email_Template', array('_getMail'), array(), '', false); + $this->_model = $this->getMockBuilder('Mage_Core_Model_Email_Template') + ->setMethods(array('_getMail')) + ->setConstructorArgs(array( + $this->getMockBuilder('Mage_Core_Model_Event_Manager')->disableOriginalConstructor()->getMock(), + $this->getMockBuilder('Mage_Core_Model_Cache')->disableOriginalConstructor()->getMock(), + Mage::getObjectManager()->create('Magento_Filesystem') + )) + ->getMock(); $this->_model->expects($this->any())->method('_getMail')->will($this->returnCallback(array($this, 'getMail'))); $this->_model->setSenderName('sender')->setSenderEmail('sender@example.com')->setTemplateSubject('Subject'); } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php index c1e901dd57041c5f1290753ee8df89402e4fbc70..8f8c2df0b0458b1a111ac33f594ff352e46e4ec2 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php @@ -51,7 +51,7 @@ class Mage_Core_Model_Layout_MergeTest extends PHPUnit_Framework_TestCase /* Disable loading and saving layout cache */ Mage::app()->getCacheInstance()->banUse('layout'); $this->_model = Mage::getModel('Mage_Core_Model_Layout_Merge', array( - 'arguments' => array('area' => 'frontend', 'themeId' => Mage::getDesign()->getDesignTheme()->getId()) + 'arguments' => array('area' => 'frontend', 'theme' => Mage::getDesign()->getDesignTheme()->getId()) )); } @@ -224,7 +224,7 @@ class Mage_Core_Model_Layout_MergeTest extends PHPUnit_Framework_TestCase /** @var $model Mage_Core_Model_Layout_Merge */ $model = Mage::getModel('Mage_Core_Model_Layout_Merge', array('arguments' => array( 'area' => 'frontend', - 'themeId' => $this->_themeUtility->getThemeByParams('test/test_theme', 'frontend')->getId() + 'theme' => $this->_themeUtility->getThemeByParams('test/test_theme', 'frontend')->getId() ))); $this->assertNotContains($layoutHandle, $model->getHandles()); $this->assertNotContains($expectedText, $model->asString()); @@ -246,7 +246,7 @@ class Mage_Core_Model_Layout_MergeTest extends PHPUnit_Framework_TestCase $model = Mage::getModel('Mage_Core_Model_Layout_Merge', array('arguments' => array( 'area' => 'frontend', - 'themeId' => $this->_themeUtility->getThemeByParams('test/test_theme', 'frontend')->getId() + 'theme' => $this->_themeUtility->getThemeByParams('test/test_theme', 'frontend')->getId() ))); $model->load($layoutHandle); $this->assertContains($expectedTextThemeOne, $model->asString()); @@ -254,7 +254,7 @@ class Mage_Core_Model_Layout_MergeTest extends PHPUnit_Framework_TestCase $model = Mage::getModel('Mage_Core_Model_Layout_Merge', array('arguments' => array( 'area' => 'frontend', - 'themeId' => $this->_themeUtility->getThemeByParams('test/cache_test_theme', 'frontend')->getId() + 'theme' => $this->_themeUtility->getThemeByParams('test/cache_test_theme', 'frontend')->getId() ))); $model->load($layoutHandle); $this->assertContains($expectedTextThemeTwo, $model->asString()); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Resource/Layout/UpdateTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Resource/Layout/UpdateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..42dd868a124ed3a0da13f466bb9ad6c9b978cc53 --- /dev/null +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Resource/Layout/UpdateTest.php @@ -0,0 +1,72 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_Core + * @subpackage integration_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Core_Model_Resource_Layout_UpdateTest extends PHPUnit_Framework_TestCase +{ + /* + * Test theme id + */ + protected $_themeId; + + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * @var Mage_Core_Model_Design_Package + */ + protected $_designPackage; + + protected function setUp() + { + $this->_objectManager = Mage::getObjectManager(); + $this->_designPackage = $this->_objectManager->get('Mage_Core_Model_Design_Package'); + + $this->_themeId = $this->_designPackage->getDesignTheme()->getThemeId(); + /** @var $theme Mage_Core_Model_Theme */ + $theme = $this->_objectManager->create('Mage_Core_Model_Theme'); + $theme->load('Test Theme', 'theme_title'); + $this->_designPackage->getDesignTheme()->setThemeId($theme->getId()); + } + + protected function tearDown() + { + $this->_designPackage->getDesignTheme()->setThemeId($this->_themeId); + } + + /** + * @magentoDataFixture Mage/Core/_files/layout_update.php + */ + public function testFetchUpdatesByHandle() + { + /** @var $resourceLayoutUpdate Mage_Core_Model_Resource_Layout_Update */ + $resourceLayoutUpdate = $this->_objectManager->create('Mage_Core_Model_Resource_Layout_Update'); + $result = $resourceLayoutUpdate->fetchUpdatesByHandle('test_handle'); + $this->assertEquals('not_temporary', $result); + } +} diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Theme/FilesTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Theme/FilesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dede908f68f5de77837e2844814082d0c8d62377 --- /dev/null +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Theme/FilesTest.php @@ -0,0 +1,65 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_Core + * @subpackage integration_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Core_Model_Theme_FilesTest extends PHPUnit_Framework_TestCase +{ + /** + * Test crud operations for theme files model using valid data + */ + public function testCrud() + { + /** @var $themeModel Mage_Core_Model_Theme_Files */ + $filesModel = Mage::getObjectManager()->create('Mage_Core_Model_Theme_Files'); + $filesData = $this->_getThemeFilesValidData(); + + /** @var $themeModel Mage_Core_Model_Theme */ + $themeModel = Mage::getObjectManager()->create('Mage_Core_Model_Theme'); + $theme = $themeModel->getCollection()->getFirstItem(); + + $filesData['theme_id'] = $theme->getId(); + $filesModel->setData($filesData); + + $crud = new Magento_Test_Entity($filesModel, array('file_name' => 'rename.css')); + $crud->testCrud(); + } + + /** + * Get theme files valid data + * + * @return array + */ + protected function _getThemeFilesValidData() + { + return array( + 'file_name' => 'main.css', + 'file_type' => 'css', + 'content' => 'content files', + 'order' => 0, + ); + } + +} diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/TranslateTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/TranslateTest.php index dfbff8d3d9372577a80ba3171111288737a05862..d2a16de7ec3bb9921eba0615479f4b1a37c69e11 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/TranslateTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/TranslateTest.php @@ -96,6 +96,7 @@ class Mage_Core_Model_TranslateTest extends PHPUnit_Framework_TestCase public function testGetData() { + $this->markTestIncomplete('Bug MAGETWO-6986'); $expectedData = include(dirname(__FILE__) . '/Translate/_files/_translation_data.php'); $this->assertEquals($expectedData, $this->_model->getData()); } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/UrlTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/UrlTest.php index 47df06849bc60da16bc12a47a72efa4afdb84e1e..d3869c0467622f42263015582464592015b4daac 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/UrlTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/UrlTest.php @@ -148,20 +148,39 @@ class Mage_Core_Model_UrlTest extends PHPUnit_Framework_TestCase /** * Note: isolation flushes the URL memory cache * @magentoAppIsolation enabled + * + * @dataProvider getBaseUrlConfiguredDataProvider + * * @magentoConfigFixture current_store web/secure/base_url http://sample.com/base_path/ + * @magentoConfigFixture current_store web/unsecure/base_link_url http://sample.com/base_link_path/ * @magentoConfigFixture current_store web/secure/base_link_url https://sample.com/base_link_path/ * @magentoConfigFixture current_store web/secure/use_in_frontend 1 + * + * @param array $params + * @param string $expectedUrl */ - public function testGetBaseUrlConfigured() - { - $actualUrl = $this->_model->getBaseUrl(array('_type' => Mage_Core_Model_Store::URL_TYPE_WEB)); - $this->assertEquals('http://sample.com/base_path/', $actualUrl); - - $actualUrl = $this->_model->getBaseUrl(array('_type' => Mage_Core_Model_Store::URL_TYPE_LINK)); - $this->assertEquals('https://sample.com/base_link_path/index.php/', $actualUrl); - - $actualUrl = $this->_model->getBaseUrl(array('_type' => Mage_Core_Model_Store::URL_TYPE_LINK, '_secure' => 1)); - $this->assertEquals('https://sample.com/base_link_path/index.php/', $actualUrl); + public function testGetBaseUrlConfigured($params, $expectedUrl) + { + $actualUrl = $this->_model->getBaseUrl($params); + $this->assertEquals($expectedUrl, $actualUrl); + } + + public function getBaseUrlConfiguredDataProvider() + { + return array( + array( + array('_type' => Mage_Core_Model_Store::URL_TYPE_WEB), + 'http://sample.com/base_path/' + ), + array( + array('_type' => Mage_Core_Model_Store::URL_TYPE_LINK), + 'http://sample.com/base_link_path/index.php/' + ), + array( + array('_type' => Mage_Core_Model_Store::URL_TYPE_LINK, '_secure' => 1), + 'https://sample.com/base_link_path/index.php/' + ), + ); } public function testSetRoutePath() @@ -203,6 +222,14 @@ class Mage_Core_Model_UrlTest extends PHPUnit_Framework_TestCase $this->_model->setRoutePath('catalog/product/view/id/50'); $this->assertEquals('catalog/product/view/id/50/', $this->_model->getRoutePath()); + + $this->_model->setRoutePath('catalog/product/view'); + $this->_model->setRouteParams(array('id' => 50)); + $this->assertEquals('catalog/product/view/id/50/', $this->_model->getRoutePath()); + + $this->_model->setRoutePath('adminhtml/system_config/edit'); + $this->_model->setRouteParams(array('section' => 'design', 'key' => '123')); + $this->assertEquals('admin/system_config/edit/section/design/key/123/', $this->_model->getRoutePath()); } public function testSetGetRouteName() @@ -342,6 +369,187 @@ class Mage_Core_Model_UrlTest extends PHPUnit_Framework_TestCase $this->assertEquals('http://localhost/index.php/catalog/product/view/', $result); } + /** + * Note: isolation flushes the URL memory cache + * @magentoAppIsolation enabled + * @covers Mage_Core_Model_Url::getUrl + */ + public function testGetUrlDoesntAddFragmentOnConsequentCalls() + { + $result = $this->_model->getUrl('catalog/product/view', array( + '_nosid' => 1, + '_fragment' => 'section' + )); + $this->assertEquals('http://localhost/index.php/catalog/product/view/#section', $result); + $result = $this->_model->getUrl('catalog/product/view', array( + '_nosid' => 1, + )); + $this->assertEquals('http://localhost/index.php/catalog/product/view/', $result); + } + + /** + * Note: isolation flushes the URL memory cache + * @magentoAppIsolation enabled + * + * @dataProvider consequentCallsDataProvider + * + * @param string $firstCallUrl + * @param string $secondCallUrl + * @param array $firstRouteParams + * @param array $secondRouteParams + * @param string $firstExpectedUrl + * @param string $secondExpectedUrl + * @covers Mage_Core_Model_Url::getUrl + */ + public function testGetUrlOnConsequentCalls($firstCallUrl, $secondCallUrl, $firstRouteParams, $secondRouteParams, + $firstExpectedUrl, $secondExpectedUrl + ) { + $result = $this->_model->getUrl($firstCallUrl, $firstRouteParams); + $this->assertEquals($firstExpectedUrl, $result); + + $result = $this->_model->getUrl($secondCallUrl, $secondRouteParams); + $this->assertEquals($secondExpectedUrl, $result); + } + + /** + * Data provider for testGetUrlOnConsequentCalls() + * + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @return array + */ + public function consequentCallsDataProvider() + { + return array( + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1/a_1/p_1/v_1', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/' + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1/a_1/p_1/v_2', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_2/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1/a_1/p_1', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/c_1/a_1/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1/a_1/p_2/v_2', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/c_1/a_1/p_2/v_2/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1/a_1', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/c_1/a_1/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1/a_2', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/c_1/a_2/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/c_1/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_2', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/c_2/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_1/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_2', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/r_2/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + null, + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + 'http://localhost/index.php/', + ), + array( + 'r_1/c_1/a_1', + 'r_1/c_1/a_1/p_1/v_1', + null, + null, + 'http://localhost/index.php/r_1/c_1/a_1/', + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/', + ), + array( + null, + 'r_1/c_1/a_1', + null, + null, + 'http://localhost/index.php/', + 'http://localhost/index.php/r_1/c_1/a_1/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1/a_1/p_1/v_1', + array('p_2' => 'v_2'), + array('p_2' => 'v_2'), + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/p_2/v_2/', + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/p_2/v_2/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + 'r_1/c_1/a_1', + array('p_2' => 'v_2'), + array('p_2' => 'v_2'), + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/p_2/v_2/', + 'http://localhost/index.php/r_1/c_1/a_1/p_2/v_2/', + ), + array( + 'r_1/c_1/a_1/p_1/v_1', + null, + array('p_2' => 'v_2'), + array('p_1' => 'v_1', 'p_2' => 'v_2'), + 'http://localhost/index.php/r_1/c_1/a_1/p_1/v_1/p_2/v_2/', + 'http://localhost/index.php/p_1/v_1/p_2/v_2/', + ), + ); + } public function testEscape() { @@ -354,9 +562,8 @@ class Mage_Core_Model_UrlTest extends PHPUnit_Framework_TestCase */ public function testGetDirectUrl() { - $this->assertEquals('http://localhost/index.php/fancy_uri?foo=bar', - $this->_model->getDirectUrl('fancy_uri', array('_query' => array('foo' => 'bar'))) - ); + $directUrl = $this->_model->getDirectUrl('fancy_uri', array('_query' => array('foo' => 'bar'))); + $this->assertEquals('http://localhost/index.php/fancy_uri?foo=bar', $directUrl); } /** @@ -369,8 +576,9 @@ class Mage_Core_Model_UrlTest extends PHPUnit_Framework_TestCase public function testSessionUrlVar() { $sessionId = Mage::getSingleton('Mage_Core_Model_Session')->getEncryptedSessionId(); + $sessionUrl = $this->_model->sessionUrlVar('<a href="http://example.com/?___SID=U">www.example.com</a>'); $this->assertEquals('<a href="http://example.com/?SID=' . $sessionId . '">www.example.com</a>', - $this->_model->sessionUrlVar('<a href="http://example.com/?___SID=U">www.example.com</a>') + $sessionUrl ); } diff --git a/dev/tests/integration/testsuite/Mage/Core/Utility/Theme.php b/dev/tests/integration/testsuite/Mage/Core/Utility/Theme.php index 244f54035031b0e970bc652e0b0b06c2a31e8832..28f449b2d6eb703b071d2bc1fbb6c6b7b56b4e56 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Utility/Theme.php +++ b/dev/tests/integration/testsuite/Mage/Core/Utility/Theme.php @@ -90,9 +90,10 @@ class Mage_Core_Utility_Theme { /** @var $packageMock Mage_Core_Model_Design_Package|PHPUnit_Framework_MockObject_MockObject */ $packageMock = PHPUnit_Framework_MockObject_Generator::getMock( - 'Mage_Core_Model_Design_Package', array('getConfigurationDesignTheme') + 'Mage_Core_Model_Design_Package', array('getConfigurationDesignTheme'), + array(self::_createFilesystem()) ); - $package = Mage::getModel('Mage_Core_Model_Design_Package'); + $package = Mage::getModel('Mage_Core_Model_Design_Package', array('filesystem' => self::_createFilesystem())); $callBackFixture = function ($area, $params) use ($package, $packageMock) { $area = $area ? $area : $packageMock->getArea(); @@ -115,6 +116,15 @@ class Mage_Core_Utility_Theme $objectManager->addSharedInstance($packageMock, 'Mage_Core_Model_Design_Package'); } + + /** + * @return Magento_Filesystem + */ + protected static function _createFilesystem() + { + return new Magento_Filesystem(new Magento_Filesystem_Adapter_Local()); + } + /** * @return Mage_Core_Utility_Theme */ diff --git a/dev/tests/integration/testsuite/Mage/Core/_files/layout_update.php b/dev/tests/integration/testsuite/Mage/Core/_files/layout_update.php new file mode 100644 index 0000000000000000000000000000000000000000..096118ec0ce059bc0c9e54dc2a73ca6153e660a9 --- /dev/null +++ b/dev/tests/integration/testsuite/Mage/Core/_files/layout_update.php @@ -0,0 +1,56 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_Core + * @subpackage integration_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** @var $objectManager Magento_ObjectManager */ +$objectManager = Mage::getObjectManager(); + +/** @var $theme Mage_Core_Model_Theme */ +$theme = $objectManager->create('Mage_Core_Model_Theme'); +$theme->setThemePath('test/test') + ->setThemeVersion('2.0.0.0') + ->setArea('frontend') + ->setThemeTitle('Test Theme') + ->setMagentoVersionFrom('2.0.0.0') + ->setMagentoVersionTo('*') + ->save(); + +/** @var $updateNotTemporary Mage_Core_Model_Layout_Update */ +$updateNotTemporary = $objectManager->create('Mage_Core_Model_Layout_Update'); +$updateNotTemporary->setHandle('test_handle') + ->setXml('not_temporary') + ->setStoreId(0) + ->setThemeId($theme->getId()) + ->save(); + +/** @var $updateTemporary Mage_Core_Model_Layout_Update */ +$updateTemporary = $objectManager->create('Mage_Core_Model_Layout_Update'); +$updateTemporary->setHandle('test_handle') + ->setIsTemporary(1) + ->setXml('temporary') + ->setStoreId(0) + ->setThemeId($theme->getId()) + ->save(); diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/Model/HistoryTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/HistoryTest.php index 48cc77a8dafc1fd87b8d56d42f41e87196f34eda..011a95708f02fac0d686ebc47bb8d26c38605bee 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/Model/HistoryTest.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/HistoryTest.php @@ -103,6 +103,22 @@ class Mage_DesignEditor_Model_HistoryTest extends PHPUnit_Framework_TestCase ); } + /** + * Add Xml changes test + * + * @dataProvider getXmlChanges + * @param string $changes + * @param array $result + */ + public function testAddXmlChanges($changes, $result) + { + $historyModel = $this->getClearHistoryModel(); + $collection = $historyModel->addXmlChanges($changes)->getChanges(); + + $this->assertEquals($result, $collection->toArray()); + + } + /** * Get change * @@ -191,4 +207,72 @@ class Mage_DesignEditor_Model_HistoryTest extends PHPUnit_Framework_TestCase ), ))); } + + /** + * Get xml changes data provider + * + * @return array + */ + public function getXmlChanges() + { + return array( + array( + 'xml' => '<move element="customer_account_navigation" after="-" destination="right"/>', + 'expected result' => array(array( + 'element_name' => 'customer_account_navigation', + 'destination_order' => '-', + 'origin_order' => '-', + 'destination_container' => 'right', + 'origin_container' => 'right', + 'type' => 'layout', + 'action_name' => 'move', + 'element' => 'customer_account_navigation', + 'after' => '-', + 'destination' => 'right', + 'id' => 'customer_account_navigation', + 'system' => '1' + )) + ), + array( + 'xml' => '<remove name="category.products"/>', + 'expected result' => array(array( + 'element_name' => 'category.products', + 'type' => 'layout', + 'action_name' => 'remove', + 'name' => 'category.products', + 'id' => 'category.products', + 'system' => '1' + )) + ), + array( + 'xml' => '<move element="customer_account_navigation" after="-" destination="right"/> + <remove name="category.products"/>', + 'expected result' => array( + array( + 'element_name' => 'customer_account_navigation', + 'destination_order' => '-', + 'origin_order' => '-', + 'destination_container' => 'right', + 'origin_container' => 'right', + 'type' => 'layout', + 'action_name' => 'move', + 'element' => 'customer_account_navigation', + 'after' => '-', + 'destination' => 'right', + 'id' => 'customer_account_navigation', + 'system' => '1' + ), + array( + 'element_name' => 'category.products', + 'type' => 'layout', + 'action_name' => 'remove', + 'name' => 'category.products', + 'id' => 'category.products', + 'system' => '1' + ) + ) + + ) + ); + } } diff --git a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/Shipment/TrackTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/Layout/UpdateTest.php similarity index 53% rename from dev/tests/integration/testsuite/Mage/Sales/Model/Order/Shipment/TrackTest.php rename to dev/tests/integration/testsuite/Mage/DesignEditor/Model/Layout/UpdateTest.php index a39e3054dbbcf87007e4e10cd01c410ce9aaf50a..277192736693dcd47b3a400ea0734ae879a42eeb 100644 --- a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/Shipment/TrackTest.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/Layout/UpdateTest.php @@ -19,43 +19,27 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Mage_Sale + * @package Mage_DesignEditor * @subpackage integration_tests * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Sales_Model_Order_Shipment_TrackTest extends PHPUnit_Framework_TestCase +class Mage_DesignEditor_Model_Layout_UpdateTest extends PHPUnit_Framework_TestCase { /** - * @var Mage_Sales_Model_Order_Shipment_Track + * @covers Mage_DesignEditor_Model_Layout_Update::__beforeSave + * @magentoDbIsolation enabled */ - protected $_model; - - protected function setUp() - { - $this->_model = Mage::getModel('Mage_Sales_Model_Order_Shipment_Track'); - } - - protected function tearDown() - { - $this->_model = null; - } - - public function testSetGetNumber() - { - $this->assertNull($this->_model->getNumber()); - - $this->_model->setNumber('test'); - $this->assertEquals('test', $this->_model->getNumber()); - $this->assertEquals('test', $this->_model->getTrackNumber()); - } - - public function testIsCustom() + public function testBeforeSave() { - $this->_model->setCarrierCode('ups'); - $this->assertFalse($this->_model->isCustom()); - $this->_model->setCarrierCode('custom'); - $this->assertTrue($this->_model->isCustom()); + /** @var $model Mage_DesignEditor_Model_Layout_Update */ + $model = Mage::getObjectManager()->get('Mage_DesignEditor_Model_Layout_Update'); + $model->setData(array( + 'handle' => 'layout_update_test' + )); + $model->save(); + $this->assertTrue($model->getIsVde()); + $model->delete(); } } diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/Model/Resource/Layout/UpdateTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/Resource/Layout/UpdateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c00793f30715dbe563cb3adf4731d8037182a22f --- /dev/null +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/Resource/Layout/UpdateTest.php @@ -0,0 +1,92 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_Core + * @subpackage integration_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_DesignEditor_Model_Resource_Layout_UpdateTest extends PHPUnit_Framework_TestCase +{ + /* + * Test theme id + */ + protected $_themeId; + + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * @var Mage_Core_Model_Design_Package + */ + protected $_design; + + protected function setUp() + { + $this->_objectManager = Mage::getObjectManager(); + $this->_design = $this->_objectManager->get('Mage_Core_Model_Design_Package'); + + $this->_themeId = $this->_design->getDesignTheme()->getThemeId(); + /** @var $theme Mage_Core_Model_Theme */ + $theme = $this->_objectManager->create('Mage_Core_Model_Theme'); + $theme->load('Test Theme', 'theme_title'); + $this->_design->getDesignTheme()->setThemeId($theme->getId()); + } + + protected function tearDown() + { + $this->_design->getDesignTheme()->setThemeId($this->_themeId); + } + + /** + * @magentoDataFixture Mage/Core/_files/layout_update.php + */ + public function testFetchUpdatesByHandle() + { + /** @var $resourceLayoutUpdate Mage_DesignEditor_Model_Resource_Layout_Update */ + $resourceLayoutUpdate = $this->_objectManager->create('Mage_DesignEditor_Model_Resource_Layout_Update'); + $result = $resourceLayoutUpdate->fetchUpdatesByHandle('test_handle'); + $this->assertEquals('not_temporarytemporary', $result); + } + + /** + * @magentoDataFixture Mage/Core/_files/layout_update.php + */ + public function testMakeTemporaryLayoutUpdatesPermanent() + { + /** @var $coreLayoutUpdate Mage_Core_Model_Resource_Layout_Update */ + $coreLayoutUpdate = $this->_objectManager->create('Mage_Core_Model_Resource_Layout_Update'); + $resultBefore = $coreLayoutUpdate->fetchUpdatesByHandle('test_handle'); + $this->assertEquals('not_temporary', $resultBefore); + + /** @var $vdeLayoutUpdate Mage_DesignEditor_Model_Resource_Layout_Update */ + $vdeLayoutUpdate = $this->_objectManager->create('Mage_DesignEditor_Model_Resource_Layout_Update'); + $vdeLayoutUpdate->makeTemporaryLayoutUpdatesPermanent($this->_design->getDesignTheme()->getThemeId(), + array(Mage_Core_Model_App::ADMIN_STORE_ID) + ); + + $resultAfter = $coreLayoutUpdate->fetchUpdatesByHandle('test_handle'); + $this->assertEquals('not_temporarytemporary', $resultAfter); + } +} diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php index 95290b88624510f4f573832cb178bdad43d3e8d1..134e5405af4bbd449db205f5cac33ef87c21a78f 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php @@ -53,6 +53,7 @@ class Mage_DesignEditor_PageControllerTest extends Mage_Backend_Utility_Controll protected $_testHandles = array( 'incorrect' => '123!@#', 'not_existing' => 'not_existing_handle', + 'default' => 'default', 'correct' => 'cms_index_index', ); @@ -78,63 +79,36 @@ class Mage_DesignEditor_PageControllerTest extends Mage_Backend_Utility_Controll /** * Exception cases in typeAction method * - * @param string $url - * @param string $handle - * @param string $expectedMessage - * - * @dataProvider typeActionErrorsDataProvider * @magentoConfigFixture vde/design_editor/frontName vde_front_name */ - public function testTypeActionErrors($url, $handle, $expectedMessage) + public function testTypeActionIncorrectLayout() { - $this->getRequest()->setParam('handle', $handle); - $this->dispatch($url); + $this->getRequest()->setParam('handle', $this->_testHandles['correct']); + $this->dispatch(self::PAGE_TYPE_URL); $response = $this->getResponse(); $this->assertEquals(503, $response->getHttpResponseCode()); - $this->assertEquals($expectedMessage, $response->getBody()); + $this->assertEquals('Incorrect Design Editor layout.', $response->getBody()); } /** - * Data provider for testTypeActionErrors + * @param $actualHandle + * @param $expectedHandle * - * @return array - */ - public function typeActionErrorsDataProvider() - { - return array( - 'invalid_handle' => array( - '$url' => self::PAGE_TYPE_URL, - '$handle' => $this->_testHandles['incorrect'], - '$expectedMessage' => 'Invalid page handle specified.', - ), - 'incorrect_layout' => array( - '$url' => self::PAGE_TYPE_URL, - '$handle' => $this->_testHandles['correct'], - '$expectedMessage' => 'Incorrect Design Editor layout.', - ), - 'not_existing_handle' => array( - '$url' => self::VDE_FRONT_NAME . '/' . self::PAGE_TYPE_URL, - '$handle' => $this->_testHandles['not_existing'], - '$expectedMessage' => 'Specified page type or page fragment type doesn\'t exist: "' - . $this->_testHandles['not_existing'] . '".', - ), - ); - } - - /** + * @dataProvider typeActionDataProvider * @magentoConfigFixture vde/design_editor/frontName vde_front_name + * @magentoConfigFixture vde/design_editor/defaultHandle default */ - public function testTypeAction() + public function testTypeAction($actualHandle, $expectedHandle) { - $this->getRequest()->setParam('handle', $this->_testHandles['correct']); + $this->getRequest()->setParam('handle', $actualHandle); $this->dispatch(self::VDE_FRONT_NAME . '/' . self::PAGE_TYPE_URL); // assert layout data /** @var $layout Mage_Core_Model_Layout */ $layout = $this->_objectManager->get('Mage_Core_Model_Layout'); $handles = $layout->getUpdate()->getHandles(); - $this->assertContains($this->_testHandles['correct'], $handles); + $this->assertContains($expectedHandle, $handles); $this->assertContains('designeditor_page_type', $handles); $this->assertAttributeSame(true, '_sanitationEnabled', $layout); $this->assertAttributeSame(true, '_wrappingEnabled', $layout); @@ -144,4 +118,27 @@ class Mage_DesignEditor_PageControllerTest extends Mage_Backend_Utility_Controll $this->assertContains('class="vde_element_wrapper', $responseBody); // enabled wrapper $this->assertContains('/css/design.css', $responseBody); // included wrapper CSS } + + /** + * Data provider for testTypeAction + * + * @return array + */ + public function typeActionDataProvider() + { + return array( + 'invalid_handle' => array( + '$actualHandle' => $this->_testHandles['incorrect'], + '$expectedHandle' => $this->_testHandles['default'], + ), + 'not_existing_handle' => array( + '$actualHandle' => $this->_testHandles['not_existing'], + '$expectedHandle' => $this->_testHandles['default'], + ), + 'correct_handle' => array( + '$actualHandle' => $this->_testHandles['correct'], + '$expectedHandle' => $this->_testHandles['correct'], + ), + ); + } } diff --git a/dev/tests/integration/testsuite/Mage/Downloadable/Model/Product/TypeTest.php b/dev/tests/integration/testsuite/Mage/Downloadable/Model/Product/TypeTest.php index 8a70d842aaa02cd117bc8f54013e0ca569eddffa..2de79e238914ec8e11d45dbceda5960dfb60f9f9 100644 --- a/dev/tests/integration/testsuite/Mage/Downloadable/Model/Product/TypeTest.php +++ b/dev/tests/integration/testsuite/Mage/Downloadable/Model/Product/TypeTest.php @@ -37,7 +37,7 @@ class Mage_Downloadable_Model_Product_TypeTest extends PHPUnit_Framework_TestCas protected function setUp() { - $this->_model = new Mage_Downloadable_Model_Product_Type(); + $this->_model = Mage::getObjectManager()->create('Mage_Downloadable_Model_Product_Type'); } /** diff --git a/dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php index 69121db00d6c8afa8b405401d1bb09f721df3bb7..17bb6ebd4da974e8c0210157fddea8975ad6649b 100644 --- a/dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php @@ -53,7 +53,8 @@ class Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_AbstractTest Mage::getObjectManager()->get('Mage_Core_Model_Session'), Mage::getObjectManager()->get('Mage_Core_Model_Store_Config'), Mage::getObjectManager()->get('Mage_Core_Controller_Varien_Front'), - Mage::getObjectManager()->get('Mage_Core_Model_Factory_Helper') + Mage::getObjectManager()->get('Mage_Core_Model_Factory_Helper'), + Mage::getObjectManager()->get('Magento_Filesystem'), ); $block = $this->getMockForAbstractClass('Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract', $arguments) ->setLayout(Mage::getObjectManager()->create('Mage_Core_Model_Layout')); diff --git a/dev/tests/integration/testsuite/Mage/Sitemap/_files/sitemap_products.php b/dev/tests/integration/testsuite/Mage/Sitemap/_files/sitemap_products.php index 29dc96e4dcfe246e60178d6419e2158d30feb6b6..d97515f9a91702ab4d46c3693bc8fc1960793285 100644 --- a/dev/tests/integration/testsuite/Mage/Sitemap/_files/sitemap_products.php +++ b/dev/tests/integration/testsuite/Mage/Sitemap/_files/sitemap_products.php @@ -25,6 +25,17 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +// Copy images to tmp media path +/** @var Mage_Catalog_Model_Product_Media_Config $config */ +$config = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config'); +$baseTmpMediaPath = $config->getBaseTmpMediaPath(); + +/** @var Magento_Filesystem $filesystem */ +$filesystem = Mage::getObjectManager()->create('Magento_Filesystem'); +$filesystem->setIsAllowCreateDirectories(true); +$filesystem->copy(dirname(__FILE__) . '/magento_image_sitemap.png', $baseTmpMediaPath . '/magento_image_sitemap.png'); +$filesystem->copy(dirname(__FILE__) . '/second_image.png', $baseTmpMediaPath . '/second_image.png'); + $product = Mage::getModel('Mage_Catalog_Model_Product'); $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) ->setId(1) @@ -78,8 +89,8 @@ $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) ->setImage('/s/e/second_image.png') ->setSmallImage('/m/a/magento_image_sitemap.png') ->setThumbnail('/m/a/magento_image_sitemap.png') - ->addImageToMediaGallery(dirname(__FILE__) . '/magento_image_sitemap.png', null, false, false) - ->addImageToMediaGallery(dirname(__FILE__) . '/second_image.png', null, false, false) + ->addImageToMediaGallery($baseTmpMediaPath . '/magento_image_sitemap.png', null, false, false) + ->addImageToMediaGallery($baseTmpMediaPath . '/second_image.png', null, false, false) ->setWebsiteIds(array(1)) ->setStockData(array('qty' => 100, 'is_in_stock' => 1)) ->setRelatedLinkData(array(1 => array('position' => 1))) @@ -97,7 +108,7 @@ $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) ->setImage('no_selection') ->setSmallImage('/m/a/magento_image_sitemap.png') ->setThumbnail('no_selection') - ->addImageToMediaGallery(dirname(__FILE__) . '/second_image.png', null, false, false) + ->addImageToMediaGallery($baseTmpMediaPath . '/second_image.png', null, false, false) ->setWebsiteIds(array(1)) ->setStockData(array('qty' => 100, 'is_in_stock' => 1)) ->setRelatedLinkData(array(1 => array('position' => 1))) diff --git a/dev/tests/integration/testsuite/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php b/dev/tests/integration/testsuite/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php index 5d0cd35c02ec5ffc6fade314c21dd07bbabfe98a..671315b6237e3080e69484241efb1ce54b1edf44 100644 --- a/dev/tests/integration/testsuite/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php +++ b/dev/tests/integration/testsuite/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php @@ -58,11 +58,11 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_LayoutTest extend ))); $this->_block = $this->getMock( 'Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Layout', - array('_getLayoutUpdate'), $args + array('_getLayoutMerge'), $args ); $this->_block ->expects($this->any()) - ->method('_getLayoutUpdate') + ->method('_getLayoutMerge') ->will($this->returnValue($layoutUtility->getLayoutUpdateFromFixture( $pageTypesFixture, $layoutUtility->getLayoutDependencies() diff --git a/dev/tests/integration/testsuite/Mage/Wishlist/Block/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Wishlist/Block/AbstractTest.php index 5b9b2d1069e9067646c24985d3921ccbb801c979..95a608042c314115f2de5985d08d1b62fcdf9762 100644 --- a/dev/tests/integration/testsuite/Mage/Wishlist/Block/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Wishlist/Block/AbstractTest.php @@ -44,6 +44,7 @@ class Mage_Wishlist_Block_AbstractTest extends PHPUnit_Framework_TestCase 'Mage_Core_Model_Store_Config', 'Mage_Core_Controller_Varien_Front', 'Mage_Core_Model_Factory_Helper', + 'Magento_Filesystem', ); protected function setUp() diff --git a/dev/tests/integration/testsuite/Mage/Wishlist/controllers/IndexControllerTest.php b/dev/tests/integration/testsuite/Mage/Wishlist/controllers/IndexControllerTest.php index 8a9684c7d70bd9fa8968fe6da2801f90ccd36f0a..e661e44dba9482d6d7b9e1fa7e47ea15d4452a39 100644 --- a/dev/tests/integration/testsuite/Mage/Wishlist/controllers/IndexControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Wishlist/controllers/IndexControllerTest.php @@ -66,10 +66,7 @@ class Mage_Wishlist_IndexControllerTest extends Magento_Test_TestCase_Controller $this->dispatch('wishlist/index/index'); $body = $this->getResponse()->getBody(); $this->assertStringMatchesFormat('%A<img src="%Asmall_image.jpg" %A alt="Simple Product"%A/>%A', $body); - $this->assertStringMatchesFormat('%Afunction addWItemToCart(itemId)%A', $body); - $this->assertStringMatchesFormat('%Aonclick="addWItemToCart(%d);"%A', $body); $this->assertStringMatchesFormat('%A<textarea name="description[%d]"%A', $body); - $this->assertStringMatchesFormat('%A<button%Aonclick="addAllWItemsToCart()"%A', $body); } /** diff --git a/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/ParentClassWithNamespace.php b/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/ParentClassWithNamespace.php new file mode 100644 index 0000000000000000000000000000000000000000..4efe23e62688a8a90d23f48769bbe12eddc6e5f7 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/ParentClassWithNamespace.php @@ -0,0 +1,93 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Di\Generator\TestAsset; +use Zend\Code\Generator\DocBlockGenerator; + +class ParentClassWithNamespace +{ + /** + * Public parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + /** + * Protected parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _protectedParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + /** + * Private parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + private function _privateParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + public function publicParentWithoutParameters() + { + } + + public static function publicParentStatic() + { + } + + final public function publicParentFinal() + { + } +} diff --git a/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/ParentClassWithoutNamespace.php b/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/ParentClassWithoutNamespace.php new file mode 100644 index 0000000000000000000000000000000000000000..16c0fb409d0179343603528e198b9368092c4977 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/ParentClassWithoutNamespace.php @@ -0,0 +1,92 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +use Zend\Code\Generator\DocBlockGenerator; + +class Magento_Di_Generator_TestAsset_ParentClassWithoutNamespace +{ + /** + * Public parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + /** + * Protected parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _protectedParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + /** + * Private parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + private function _privateParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + public function publicParentWithoutParameters() + { + } + + public static function publicParentStatic() + { + } + + final public function publicParentFinal() + { + } +} diff --git a/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/SourceClassWithNamespace.php b/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/SourceClassWithNamespace.php new file mode 100644 index 0000000000000000000000000000000000000000..99f089ad7a2873d947867d44895f3c5bcb8eb471 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/SourceClassWithNamespace.php @@ -0,0 +1,120 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Di\Generator\TestAsset; +use Zend\Code\Generator\ClassGenerator; + +class SourceClassWithNamespace extends ParentClassWithNamespace +{ + /** + * Public child constructor + * + * @param string $param1 + * @param string $param2 + * @param string $param3 + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function __construct($param1 = '', $param2 = '\\', $param3 = '\'') + { + } + + /** + * Public child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * @return void + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', $param3 = '\'', + array $array = array() + ) { + } + + /** + * Public child method with reference + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicMethodWithReference(ClassGenerator &$classGenerator, &$param1 = "'", array &$array) + { + } + + /** + * Protected child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _protectedChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'' + ) { + } + + /** + * Private child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * @return void + * + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + private function _privateChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + public function publicChildWithoutParameters() + { + } + + public static function publicChildStatic() + { + } + + final public function publicChildFinal() + { + } +} diff --git a/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/SourceClassWithoutNamespace.php b/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/SourceClassWithoutNamespace.php new file mode 100644 index 0000000000000000000000000000000000000000..421066cb24aa11f7ee258f763d90b19fa2d184ca --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Di/Generator/TestAsset/SourceClassWithoutNamespace.php @@ -0,0 +1,120 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +use Zend\Code\Generator\ClassGenerator; + +class Magento_Di_Generator_TestAsset_SourceClassWithoutNamespace + extends Magento_Di_Generator_TestAsset_ParentClassWithoutNamespace +{ + /** + * Public child constructor + * + * @param string $param1 + * @param string $param2 + * @param string $param3 + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function __construct($param1 = '', $param2 = '\\', $param3 = '\'') + { + } + + /** + * Public child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * @return void + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', $param3 = '\'', + array $array = array() + ) { + } + + /** + * Public child method with reference + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicMethodWithReference(ClassGenerator &$classGenerator, &$param1 = "'", array &$array) + { + } + + /** + * Protected child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _protectedChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'' + ) { + } + + /** + * Private child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * @return void + * + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + private function _privateChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + public function publicChildWithoutParameters() + { + } + + public static function publicChildStatic() + { + } + + final public function publicChildFinal() + { + } +} diff --git a/dev/tests/integration/testsuite/Magento/Di/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Di/GeneratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..971b60ea01e52a6e5602c7c64f0da272bfffc703 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Di/GeneratorTest.php @@ -0,0 +1,149 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage integration_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * @magentoAppIsolation enabled + */ +class Magento_Di_GeneratorTest extends PHPUnit_Framework_TestCase +{ + const CLASS_NAME_WITHOUT_NAMESPACE = 'Magento_Di_Generator_TestAsset_SourceClassWithoutNamespace'; + const CLASS_NAME_WITH_NAMESPACE = 'Magento\Di\Generator\TestAsset\SourceClassWithNamespace'; + + /** + * @var string + */ + protected $_includePath; + + /** + * @var Magento_Di_Generator + */ + protected $_generator; + + protected function setUp() + { + $this->_includePath = get_include_path(); + + /** @var $config Mage_Core_Model_Config */ + $config = Mage::getObjectManager()->get('Mage_Core_Model_Config'); + $generationDirectory = $config->getVarDir() . '/generation'; + + Magento_Autoload_IncludePath::addIncludePath($generationDirectory); + + $ioObject = new Magento_Di_Generator_Io( + new Varien_Io_File(), + new Magento_Autoload_IncludePath(), + $generationDirectory + ); + $this->_generator = Mage::getObjectManager()->get('Magento_Di_Generator', array('ioObject' => $ioObject)); + } + + protected function tearDown() + { + /** @var $config Mage_Core_Model_Config */ + $config = Mage::getObjectManager()->get('Mage_Core_Model_Config'); + $generationDirectory = $config->getVarDir() . '/generation'; + Varien_Io_File::rmdirRecursive($generationDirectory); + + set_include_path($this->_includePath); + unset($this->_generator); + } + + public function testGenerateClassFactoryWithoutNamespace() + { + $factoryClassName = self::CLASS_NAME_WITHOUT_NAMESPACE . 'Factory'; + $this->assertTrue($this->_generator->generateClass($factoryClassName)); + + /** @var $factory Magento_ObjectManager_Factory */ + $factory = Mage::getObjectManager()->create($factoryClassName); + $this->assertInstanceOf('Magento_ObjectManager_Factory', $factory); + + $object = $factory->createFromArray(); + $this->assertInstanceOf(self::CLASS_NAME_WITHOUT_NAMESPACE, $object); + } + + public function testGenerateClassFactoryWithNamespace() + { + $factoryClassName = self::CLASS_NAME_WITH_NAMESPACE . 'Factory'; + $this->assertTrue($this->_generator->generateClass($factoryClassName)); + + /** @var $factory Magento_ObjectManager_Factory */ + $factory = Mage::getObjectManager()->create($factoryClassName); + $this->assertInstanceOf('Magento_ObjectManager_Factory', $factory); + + $object = $factory->createFromArray(); + $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE, $object); + } + + public function testGenerateClassProxyWithoutNamespace() + { + $factoryClassName = self::CLASS_NAME_WITHOUT_NAMESPACE . 'Proxy'; + $this->assertTrue($this->_generator->generateClass($factoryClassName)); + + $proxy = Mage::getObjectManager()->create($factoryClassName); + $this->assertInstanceOf(self::CLASS_NAME_WITHOUT_NAMESPACE, $proxy); + + $this->_verifyProxyMethods(self::CLASS_NAME_WITHOUT_NAMESPACE, $proxy); + } + + public function testGenerateClassProxyWithNamespace() + { + $factoryClassName = self::CLASS_NAME_WITH_NAMESPACE . 'Proxy'; + $this->assertTrue($this->_generator->generateClass($factoryClassName)); + + $proxy = Mage::getObjectManager()->create($factoryClassName); + $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE, $proxy); + + $this->_verifyProxyMethods(self::CLASS_NAME_WITH_NAMESPACE, $proxy); + } + + /** + * @param string $class + * @param object $proxy + */ + protected function _verifyProxyMethods($class, $proxy) + { + $expectedMethods = array(); + $reflectionObject = new ReflectionClass(new $class()); + $publicMethods = $reflectionObject->getMethods(ReflectionMethod::IS_PUBLIC); + foreach ($publicMethods as $method) { + if (!($method->isConstructor() || $method->isFinal() || $method->isStatic())) { + $expectedMethods[$method->getName()] = $method->getParameters(); + } + } + + $actualMethods = array(); + $reflectionObject = new ReflectionClass($proxy); + $publicMethods = $reflectionObject->getMethods(ReflectionMethod::IS_PUBLIC); + foreach ($publicMethods as $method) { + if (!($method->isConstructor() || $method->isFinal() || $method->isStatic())) { + $actualMethods[$method->getName()] = $method->getParameters(); + } + } + + $this->assertEquals($expectedMethods, $actualMethods); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorOneArgument.php b/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorOneArgument.php index 61259eb6e1906c027cf0b1847a0ac74c855a08c4..10cc9bf9cdfcc080e9525f5d805f52bf6addc9a6 100644 --- a/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorOneArgument.php +++ b/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorOneArgument.php @@ -47,4 +47,3 @@ class Magento_Di_TestAsset_ConstructorOneArgument $this->_one = $one; } } - diff --git a/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorThreeArguments.php b/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorThreeArguments.php index 58c0036c0478505dd3b824e024c56ff3bb29cc9a..bac64b11432aab9b4d2a0b7e206ae8b74faf1966 100644 --- a/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorThreeArguments.php +++ b/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorThreeArguments.php @@ -48,4 +48,3 @@ class Magento_Di_TestAsset_ConstructorThreeArguments extends Magento_Di_TestAsse $this->_three = $three; } } - diff --git a/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorTwoArguments.php b/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorTwoArguments.php index a44d1d1e6cc11f292b9b267b71f9ab251a87b0e6..2553b4281e364fbc6c7e1cf9472cd866efcff392 100644 --- a/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorTwoArguments.php +++ b/dev/tests/integration/testsuite/Magento/Di/TestAsset/ConstructorTwoArguments.php @@ -46,4 +46,3 @@ class Magento_Di_TestAsset_ConstructorTwoArguments extends Magento_Di_TestAsset_ $this->_two = $two; } } - diff --git a/dev/tests/integration/testsuite/Mage/Core/Helper/File/StorageTest.php b/dev/tests/integration/testsuite/Magento/File/SizeTest.php similarity index 63% rename from dev/tests/integration/testsuite/Mage/Core/Helper/File/StorageTest.php rename to dev/tests/integration/testsuite/Magento/File/SizeTest.php index 842b796faaf9d16b4a6827ea48e86d022691f57e..5d54d8ab9bda3d621d6bb5156fb6edbb904b4bfb 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Helper/File/StorageTest.php +++ b/dev/tests/integration/testsuite/Magento/File/SizeTest.php @@ -25,21 +25,24 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Core_Helper_File_StorageTest extends PHPUnit_Framework_TestCase +/** + * Magento file size test + */ +class Magento_File_SizeTest extends PHPUnit_Framework_TestCase { /** - * @var Mage_Core_Helper_File_Storage + * @var Magento_File_Size */ - protected $_helper; + protected $_fileSize; public function setUp() { - $this->_helper = Mage::helper('Mage_Core_Helper_File_Storage'); + $this->_fileSize = Mage::getObjectManager()->get('Magento_File_Size'); } protected function tearDown() { - $this->_helper = null; + $this->_fileSize = null; } /** @@ -48,29 +51,26 @@ class Mage_Core_Helper_File_StorageTest extends PHPUnit_Framework_TestCase */ public function testGetMaxFileSize() { - $this->assertGreaterThanOrEqual(0, $this->_helper->getMaxFileSize()); - $this->assertGreaterThanOrEqual(0, $this->_helper->getMaxFileSizeInMb()); + $this->assertGreaterThanOrEqual(0, $this->_fileSize->getMaxFileSize()); + $this->assertGreaterThanOrEqual(0, $this->_fileSize->getMaxFileSizeInMb()); } /** - * @covers Mage_Core_Helper_File_Storage::_convertIniToInteger - * @dataProvider getConvertIniToIntegerDataProvider + * @covers Mage_Core_Helper_File_Storage::convertSizeToInteger + * @dataProvider getConvertSizeToIntegerDataProvider * @backupStaticAttributes - * @param string $arguments + * @param string $value * @param int $expected */ - public function testConvertIniToInteger($arguments, $expected) + public function testConvertSizeToInteger($value, $expected) { - $class = new ReflectionClass('Mage_Core_Helper_File_Storage'); - $method = $class->getMethod('_convertIniToInteger'); - $method->setAccessible(true); - $this->assertEquals($expected, $method->invokeArgs($this->_helper, array($arguments))); + $this->assertEquals($expected, $this->_fileSize->convertSizeToInteger($value)); } /** * @return array */ - public function getConvertIniToIntegerDataProvider() + public function getConvertSizeToIntegerDataProvider() { return array( array('0K', 0), diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/LocalTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/LocalTest.php index 4cd95105afa4de520b11896277879ac9e36cef50..029feab6d87f5f2cc0b3e19e14188857a96fce67 100644 --- a/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/LocalTest.php +++ b/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/LocalTest.php @@ -169,6 +169,9 @@ class Magento_Filesystem_Adapter_LocalTest extends PHPUnit_Framework_TestCase public function testChangePermissionsDir() { + if (substr(PHP_OS, 0, 3) == 'WIN') { + $this->markTestSkipped("chmod may not work for Windows"); + } $fileName = $this->_getFixturesPath() . 'new_directory2' . DS . 'tempFile3.css'; $dirName = $this->_getFixturesPath() . 'new_directory2'; $this->_deleteFiles[] = $fileName; @@ -180,6 +183,21 @@ class Magento_Filesystem_Adapter_LocalTest extends PHPUnit_Framework_TestCase $this->assertEquals(0755, fileperms($fileName) & 0777); } + public function testGetFileMd5() + { + $this->assertEquals('e5f30e10b8965645d5f8ed5999d88600', + $this->_adapter->getFileMd5($this->_getFixturesPath() . 'popup.csv')); + } + + /** + * @expectedException Magento_Filesystem_Exception + * @expectedExceptionMessage Unable to get file hash + */ + public function testGetFileMd5Exception() + { + $this->_adapter->getFileMd5($this->_getFixturesPath() . 'invalid.csv'); + } + public function testIsFile() { $this->assertTrue($this->_adapter->isFile($this->_getFixturesPath() . 'popup.csv')); @@ -298,4 +316,96 @@ class Magento_Filesystem_Adapter_LocalTest extends PHPUnit_Framework_TestCase $this->assertEquals($testData, file_get_contents($targetName)); $this->assertEquals($testData, file_get_contents($targetName)); } + + public function testGetMTime() + { + $filePath = $this->_getFixturesPath() . 'mtime.txt'; + $this->_deleteFiles[] = $filePath; + $this->_adapter->write($filePath, 'Test'); + $this->assertFileExists($filePath); + $this->assertGreaterThan(0, $this->_adapter->getMTime($filePath)); + } + + public function testGetFileSize() + { + $filePath = $this->_getFixturesPath() . 'filesize.txt'; + $this->_deleteFiles[] = $filePath; + $this->_adapter->write($filePath, '1234'); + $this->assertFileExists($filePath); + $this->assertEquals(4, $this->_adapter->getFileSize($filePath)); + } + + /** + * @dataProvider getNestedKeysDataProvider + * @param string $path + * @param array $expectedKeys + */ + public function testGetNestedKeys($path, $expectedKeys) + { + $this->assertEquals($expectedKeys, $this->_adapter->getNestedKeys($path)); + } + + /** + * @return array + */ + public function getNestedKeysDataProvider() + { + return array( + array( + $this->_getFixturesPath() . 'foo', + array( + $this->_getFixturesPath() . 'foo' . DS . 'bar' . DS . 'baz' . DS . 'file_one.txt', + $this->_getFixturesPath() . 'foo' . DS . 'bar' . DS . 'baz', + $this->_getFixturesPath() . 'foo' . DS . 'bar' . DS . 'file_two.txt', + $this->_getFixturesPath() . 'foo' . DS . 'bar', + $this->_getFixturesPath() . 'foo' . DS . 'file_three.txt', + ) + ), + array( + $this->_getFixturesPath() . 'foo' . DS . 'bar' . DS . 'baz', + array($this->_getFixturesPath() . 'foo' . DS . 'bar' . DS . 'baz' . DS . 'file_one.txt') + ) + ); + } + + /** + * @expectedException Magento_Filesystem_Exception + * @expectedExceptionMessage The directory "/unknown_directory" does not exist. + */ + public function testGetNestedKeysInUnknownDirectory() + { + $this->_adapter->getNestedKeys('/unknown_directory'); + } + + /** + * @dataProvider getNestedFilesDataProvider + * @param string $pattern + * @param array $expectedKeys + */ + public function testSearchKeys($pattern, $expectedKeys) + { + $this->assertEquals($expectedKeys, $this->_adapter->searchKeys($pattern)); + } + + /** + * @return array + */ + public function getNestedFilesDataProvider() + { + return array( + array( + $this->_getFixturesPath() . 'foo/*', + array( + $this->_getFixturesPath() . 'foo' . DS . 'bar', + $this->_getFixturesPath() . 'foo' . DS . 'file_three.txt', + ) + ), + array( + $this->_getFixturesPath() . 'foo/*/file_*', + array( + $this->_getFixturesPath() . 'foo' . DS . 'bar' . DS . 'file_two.txt', + ) + ) + ); + } } diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/ZlibTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/ZlibTest.php new file mode 100644 index 0000000000000000000000000000000000000000..90b6d033dcab114955ccf0d2f78ceda4573ee336 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/ZlibTest.php @@ -0,0 +1,76 @@ +<?php +/** + * Test for Magento_Filesystem_Adapter_Zlib + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Magento_Filesystem_Adapter_ZlibTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Magento_Filesystem_Adapter_Zlib + */ + protected $_adapter; + + /** + * @var array + */ + protected $_deleteFiles = array(); + + protected function setUp() + { + $this->_adapter = new Magento_Filesystem_Adapter_Zlib(); + } + + protected function tearDown() + { + foreach ($this->_deleteFiles as $fileName) { + if (is_dir($fileName)) { + rmdir($fileName); + } elseif (is_file($fileName)) { + unlink($fileName); + } + } + } + + public function testCreateStream() + { + $file = $this->_getFixturesPath() . 'data.csv'; + $this->assertInstanceOf('Magento_Filesystem_Stream_Zlib', $this->_adapter->createStream($file)); + } + + public function testRW() + { + $file = $this->_getFixturesPath() . 'compressed.tgz'; + $this->_adapter->write($file, 'Test string'); + $this->assertFileExists($file); + $this->_deleteFiles[] = $file; + $this->assertEquals('Test string', $this->_adapter->read($file)); + } + + /** + * @return string + */ + protected function _getFixturesPath() + { + return __DIR__ . DS . '..' . DS . '_files' . DS; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Sream/LocalTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/Sream/LocalTest.php index 9f5ead81bcf7af834ee1533625f66cf6a2c04fbb..cf9c779c3b2ff506824d64511ce855097bba1c44 100644 --- a/dev/tests/integration/testsuite/Magento/Filesystem/Sream/LocalTest.php +++ b/dev/tests/integration/testsuite/Magento/Filesystem/Sream/LocalTest.php @@ -35,9 +35,15 @@ class Magento_Filesystem_Stream_LocalTest extends PHPUnit_Framework_TestCase */ protected $_writeFileName; + /** + * @var string + */ + protected $_openedFile; + protected function setUp() { - $this->_stream = new Magento_Filesystem_Stream_Local(__DIR__ . DS . '..' . DS . '_files' . DS . 'popup.csv'); + $this->_openedFile = __DIR__ . DS . '..' . DS . '_files' . DS . 'popup.csv'; + $this->_stream = new Magento_Filesystem_Stream_Local($this->_openedFile); $this->_writeFileName = __DIR__ . DS . '..' . DS . '_files' . DS . 'new.css'; } @@ -108,11 +114,23 @@ class Magento_Filesystem_Stream_LocalTest extends PHPUnit_Framework_TestCase public function testClose() { $this->_stream->open(new Magento_Filesystem_Stream_Mode('r')); + $this->_stream->lock(); + $this->assertAttributeEquals(true, '_isLocked', $this->_stream); $this->_stream->close(); + $this->assertAttributeEquals(false, '_isLocked', $this->_stream); $this->assertAttributeEquals(null, '_mode', $this->_stream); $this->assertAttributeEquals(null, '_fileHandle', $this->_stream); } + public function testLock() + { + $this->_stream->open(new Magento_Filesystem_Stream_Mode('r')); + $this->_stream->lock(true); + $this->assertAttributeEquals(true, '_isLocked', $this->_stream); + $this->_stream->unlock(); + $this->assertAttributeEquals(false, '_isLocked', $this->_stream); + } + public function testFlush() { $stream = new Magento_Filesystem_Stream_Local($this->_writeFileName); diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Sream/ZlibTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/Sream/ZlibTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0bf3e6c9049b36dedae37ae0d89d0650349b4ec5 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Filesystem/Sream/ZlibTest.php @@ -0,0 +1,34 @@ +<?php +/** + * Test for Magento_Filesystem_Stream_Zlib + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Magento_Filesystem_Stream_ZlibTest extends PHPUnit_Framework_TestCase +{ + public function testOpen() + { + $stream = new Magento_Filesystem_Stream_Zlib(__DIR__ . DS . '..' . DS . '_files' . DS . 'popup.csv'); + $stream->open('rw+9f'); + $this->assertAttributeInstanceOf('Magento_Filesystem_Stream_Mode_Zlib', '_mode', $stream); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/bar/baz/file_one.txt b/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/bar/baz/file_one.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/bar/file_two.txt b/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/bar/file_two.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/file_three.txt b/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/file_three.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/dev/tests/integration/testsuite/integrity/theme/TemplateFilesTest.php b/dev/tests/integration/testsuite/integrity/theme/TemplateFilesTest.php index d40c2f6b8a5016a4d7631a02f77a6dd614d935d8..a42d7e17e2cdc38bed11ebe767975bebeb712948 100644 --- a/dev/tests/integration/testsuite/integrity/theme/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/integrity/theme/TemplateFilesTest.php @@ -60,7 +60,7 @@ class Integrity_Theme_TemplateFilesTest extends Magento_Test_TestCase_IntegrityA foreach ($themes as $theme) { $layoutUpdate = Mage::getModel( 'Mage_Core_Model_Layout_Merge', - array('arguments' => array('area' => $theme->getArea(), 'themeId' => $theme->getId())) + array('arguments' => array('area' => $theme->getArea(), 'theme' => $theme->getId())) ); $layoutTemplates = $this->_getLayoutTemplates($layoutUpdate->getFileLayoutUpdatesXml()); foreach ($layoutTemplates as $templateData) { diff --git a/dev/tests/integration/testsuite/integrity/theme/ViewFilesTest.php b/dev/tests/integration/testsuite/integrity/theme/ViewFilesTest.php index 9efe5fb9e4d12dfaba9fd61b7edc15e713cd4a1e..9cfbfffeb045be6dcdc1eebab4a329f05f8aaf0a 100644 --- a/dev/tests/integration/testsuite/integrity/theme/ViewFilesTest.php +++ b/dev/tests/integration/testsuite/integrity/theme/ViewFilesTest.php @@ -147,7 +147,7 @@ class Integrity_Theme_ViewFilesTest extends Magento_Test_TestCase_IntegrityAbstr // Collect "addCss" and "addJs" from theme layout $layoutUpdate = Mage::getModel('Mage_Core_Model_Layout_Merge', - array('arguments' => array('area' => $theme->getArea(), 'themeId' => $theme->getId())) + array('arguments' => array('area' => $theme->getArea(), 'theme' => $theme->getId())) ); $fileLayoutUpdates = $layoutUpdate->getFileLayoutUpdatesXml(); $elements = $fileLayoutUpdates->xpath('//action[@method="addCss" or @method="addJs"]/*[1]'); diff --git a/dev/tests/js/jsTestDriver.php.dist b/dev/tests/js/jsTestDriver.php.dist index a5143d3647550c1718cf47d0137e475394f8da42..ffdca0837731a8a4d9b3639c5121c1d2ecef4b65 100644 --- a/dev/tests/js/jsTestDriver.php.dist +++ b/dev/tests/js/jsTestDriver.php.dist @@ -30,32 +30,30 @@ */ return array( 'server' => 'http://localhost:9876', - 'proxy' => array(array('matcher' => '/pub/lib/*', 'server' => '%s/test/%s/pub/lib/')), 'load' => array( - '/pub/lib/globalize', - '/pub/lib/mage/localization', - '/pub/lib/mage/validation', - '/pub/lib/jquery/jquery-ui.min.js', - '/pub/lib/jquery/ui/i18n', + '/pub/lib/mage/translate.js', '/pub/lib/jquery/jquery-ui-timepicker-addon.js', '/pub/lib/jquery/jquery.tmpl.min.js', '/app/code/core/Mage/DesignEditor/view/adminhtml/js/base.js', '/app/code/core/Mage/DesignEditor/view/adminhtml/js/design_editor.js', + '/app/code/core/Mage/DesignEditor/view/frontend/js/change/layout.js', '/app/code/core/Mage/DesignEditor/view/frontend/js/design_editor.js', + '/app/code/core/Mage/DesignEditor/view/frontend/js/form_deactivation.js', '/app/code/core/Mage/DesignEditor/view/adminhtml/js/infinitescroll.js', '/pub/lib/jquery/jstree/jquery.jstree.js', '/pub/lib/jquery/slimScroll/slimScroll.min.js', - '/app/code/core/Mage/Page/view/frontend/js/cookies.js', - '/app/code/core/Mage/DesignEditor/view/adminhtml/css/styles.css', + '/app/code/core/Mage/DesignEditor/view/frontend/css/styles.css', + '/pub/lib/mage/cookies.js', '/pub/lib/mage/calendar.js', - '/pub/lib/mage/translate.js', '/pub/lib/mage/loader.js', '/pub/lib/mage/edit-trigger.js', '/pub/lib/mage/translate-inline.js', '/pub/lib/mage/backend/form.js', + '/pub/lib/mage/backend/button.js', '/pub/lib/mage/backend/tabs.js', + '/pub/lib/mage/validation.js', + '/pub/lib/mage/validation/validation.js' ), 'test' => array('/dev/tests/js/testsuite'), - 'serve' => array('/pub/lib/mage/calendar'), 'JsTestDriver' => '{{path_to_jstestdriver_jar}}' ); diff --git a/dev/tests/js/jsTestDriverOrder.php b/dev/tests/js/jsTestDriverOrder.php index ba60648c5c2beaa6eeb9631519a63e35caf02775..d7b445faa905a49b6b398e1569f682483b6b4a44 100644 --- a/dev/tests/js/jsTestDriverOrder.php +++ b/dev/tests/js/jsTestDriverOrder.php @@ -29,15 +29,12 @@ * @return array */ return array( - '/pub/lib/globalize/globalize.js', '/pub/lib/jquery/jquery.min.js', + '/pub/lib/jquery/jquery-ui.custom.min.js', '/pub/lib/jquery/jquery.cookie.js', - '/pub/lib/jquery/head.js', + '/pub/lib/head.load.min.js', '/pub/lib/mage/mage.js', '/pub/lib/mage/decorate.js', '/pub/lib/jquery/jquery.validate.js', - '/pub/lib/jquery/jquery.metadata.js', - '/pub/lib/jquery/additional-methods.js', - '/pub/lib/jquery/jquery.hook.js', - '/pub/lib/mage/translate.js' + '/pub/lib/jquery/jquery.metadata.js' ); diff --git a/dev/tests/js/testsuite/mage/button/button-test.js b/dev/tests/js/testsuite/mage/button/button-test.js index ac66dd3f7dc58457a453ce6a86ac02761ee4e8c4..768c2c02c6e1305e2d711f3d2c6340253fe208fe 100644 --- a/dev/tests/js/testsuite/mage/button/button-test.js +++ b/dev/tests/js/testsuite/mage/button/button-test.js @@ -24,24 +24,18 @@ */ ButtonTest = TestCase('ButtonTest'); ButtonTest.prototype.testInit = function() { - /*:DOC += <button id="test-button"></button><div id="event-target"></div>*/ + /*:DOC += <button id="test-button"></button>*/ assertTrue(jQuery('#test-button').button().is(':ui-button')); }; -ButtonTest.prototype.testProcessDataAttr = function() { - /*:DOC += <button id="test-button" data-widget-button="{"event":"testEvent","related":"#event-target"}"></button> - <div id="event-target"></div>*/ - var button = jQuery('#test-button').button(); - assertEquals('testEvent', button.button('option', 'event')); - assertEquals('#event-target', button.button('option', 'related')); -}; ButtonTest.prototype.testBind = function() { - /*:DOC += <button id="test-button" data-widget-button="{"event":"testEvent","related":"#event-target"}"></button> - <div id="event-target"></div>*/ + /*:DOC += <button id="test-button"></button><div id="event-target"></div>*/ var testEventTriggered = false; jQuery('#event-target').on('testEvent', function(e) { testEventTriggered = true; }); - jQuery('#test-button').button().click(); - + jQuery('#test-button').button({ + event: 'testEvent', + target: '#event-target' + }).click(); assertTrue(testEventTriggered); }; diff --git a/app/code/core/Mage/Page/view/frontend/js/cookie.js b/dev/tests/js/testsuite/mage/design_editor/form-deactivation-test.js similarity index 66% rename from app/code/core/Mage/Page/view/frontend/js/cookie.js rename to dev/tests/js/testsuite/mage/design_editor/form-deactivation-test.js index e69b214bc83bd9179babe6af84820ed3f7e7fd3c..769ae055cbe2031f0fd1ff2742ceb0cbf3ec77d4 100644 --- a/app/code/core/Mage/Page/view/frontend/js/cookie.js +++ b/dev/tests/js/testsuite/mage/design_editor/form-deactivation-test.js @@ -17,21 +17,18 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category cookie - * @package js + * @category mage.design_editor + * @package test * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/*jshint browser:true jquery:true*/ -(function ($) { - $(document).ready(function () { - var cookieInit = { - expires: null, - path: '/', - domain: document.domain, - secure: false - }; - $.mage.event.trigger('mage.cookie.init', cookieInit); - $.extend($.cookie.defaults, cookieInit); + +FormDeactivationTest = TestCase('DesignEditor_FormDeactivationTest'); +FormDeactivationTest.prototype.testInit = function() { + /*:DOC += <form id="test_design_editor_form" /><input type="submit" value="test button" /></form> */ + jQuery(document).vde_formDeactivation(); + jQuery('form').submit(function(e) { + assertTrue(e.isDefaultPrevented()); }); -})(jQuery); \ No newline at end of file + jQuery('#test_design_editor_form').submit(); +}; diff --git a/dev/tests/js/testsuite/mage/design_editor/panel-test.js b/dev/tests/js/testsuite/mage/design_editor/panel-test.js index 3cef38c0560110e3e08d87609beb61dfa30c03a9..9b7476c3d24b2847c50464d3455874e21628b2fc 100644 --- a/dev/tests/js/testsuite/mage/design_editor/panel-test.js +++ b/dev/tests/js/testsuite/mage/design_editor/panel-test.js @@ -69,3 +69,83 @@ PanelTest.prototype.testInitHandlesHierarchy = function() { assertEquals(true, handlesHierarchy.vde_menu('option', 'slimScroll')); panel.vde_panel('destroy'); }; +PanelTest.prototype.testBind = function() { + /*:DOC += <div id="panel"></div> */ + + var panel = jQuery('#panel').vde_panel(); + + var switchModeEventHandlers = $._data($('body').get(0), "events").switchMode; + var expectedGuid = jQuery('#panel').data("vde_panel")._onSwitchMode.guid; + var switchModeEventHandlerFound = false; + for (var arrayIndex in switchModeEventHandlers) { + if (typeof switchModeEventHandlers[arrayIndex] === 'object' + && 'handler' in switchModeEventHandlers[arrayIndex] + && typeof switchModeEventHandlers[arrayIndex].handler === 'function' + && switchModeEventHandlers[arrayIndex].handler.guid == expectedGuid + ) { + switchModeEventHandlerFound = true; + } + } + + assertTrue(switchModeEventHandlerFound); + + panel.vde_panel('destroy'); +}; +PanelTest.prototype.testSaveTemporaryLayoutChanges = function() { + /*:DOC += + <div id="panel"></div> + <iframe name="vde_container_frame" id="vde_container_frame" class="vde_container_frame"></iframe> + */ + /*:DOC iframeContent = + <div> + <div id="vde_element_1" class="vde_element_wrapper vde_container"> + <div class="vde_element_title">Title 1</div> + </div> + </div> + */ + var page = jQuery(window).vde_page(); + var frameSelector = page.vde_page('option', 'frameSelector'); + jQuery(frameSelector).contents().find("body:first").html(this.iframeContent); + + var panel = jQuery('#panel').vde_panel({editorFrameSelector: frameSelector}); + var history = jQuery(window).vde_history(); + jQuery(frameSelector).get(0).contentWindow.vdeHistoryObject = history.data('vde_history'); + + var saveChangesUrl = 'test_saveChangesUrl'; + var modeUrl = 'test_modeUrl'; + var historyItem = $.fn.changeFactory.getInstance('layout'); + historyItem.setData({ + action: 'move', + block: 'test_block_name', + origin: { + container: 'test_origin_container', + order: 'test_origin_position' + }, + destination: { + container: 'test_destination_container', + order: 'test_destination_position' + } + }); + var testHandle = 'test_handle'; + jQuery(frameSelector).attr('src', 'http://m2.local/index.php/vde/design/page/type/handle/' + testHandle); + + var expectedPostData = 'theme_id=1&layoutUpdate%5B0%5D%5Bhandle%5D=current_handle&layoutUpdate%5B0%5D%5Btype%5D=layout&layoutUpdate%5B0%5D%5Belement_name%5D=test_block_name&layoutUpdate%5B0%5D%5Baction_name%5D=move&layoutUpdate%5B0%5D%5Bdestination_container%5D=test_destination_container&layoutUpdate%5B0%5D%5Bdestination_order%5D=test_destination_position&layoutUpdate%5B0%5D%5Borigin_container%5D=test_origin_container&layoutUpdate%5B0%5D%5Borigin_order%5D=test_origin_position&handle=test_handle'; + jQuery(frameSelector).get(0).contentWindow.vdeHistoryObject.addItem(historyItem); + + jQuery(document).on('ajaxSend', function(e, jqXHR, settings) { + jqXHR.abort(); + assertEquals(expectedPostData, settings.data); + }); + jQuery(window).on('beforeunload', function(e) { + e.stopImmediatePropagation(); + assertEquals(modeUrl, document.location); + }); + + jQuery('#panel').data("vde_panel").saveTemporaryLayoutChanges(1, saveChangesUrl, modeUrl); + + jQuery(document).off('ajaxSend'); + jQuery(document).off('beforeunload'); + page.vde_page('destroy'); + panel.vde_panel('destroy'); + history.vde_history('destroy'); +}; diff --git a/dev/tests/js/testsuite/mage/form/form-test.js b/dev/tests/js/testsuite/mage/form/form-test.js index 036831ca4f298159089d4cbbe0041b50b7d143e0..e1c6ed046b627eb51b0a62ffa01ff32fa9287136 100644 --- a/dev/tests/js/testsuite/mage/form/form-test.js +++ b/dev/tests/js/testsuite/mage/form/form-test.js @@ -94,6 +94,7 @@ FormTest.prototype.testBind = function() { assertTrue(submitted); submitted = false; }); + form.off('submit'); }; FormTest.prototype.testGetActionUrl = function() { /*:DOC += <form id="form" action="action/url/"></form>*/ @@ -215,6 +216,7 @@ FormTest.prototype.testSubmit = function() { .on('submit', function(e) { e.preventDefault(); e.stopImmediatePropagation(); + e.preventDefault(); formSubmitted = true; }) .prop({ @@ -229,6 +231,7 @@ FormTest.prototype.testSubmit = function() { assertEquals(form.prop('target'), form.data("form").oldAttributes.target); assertEquals(form.prop('method'), form.data("form").oldAttributes.method); assertTrue(formSubmitted); + form.off('submit'); }; FormTest.prototype.testBuildURL = function() { var dataProvider = [ diff --git a/dev/tests/js/testsuite/mage/loader/loader-test.js b/dev/tests/js/testsuite/mage/loader/loader-test.js index 17df897a4f51ced43d79b3605dc4f07ded362ae4..00ddded23c8e4b3354684c976054daa84705ce6f 100644 --- a/dev/tests/js/testsuite/mage/loader/loader-test.js +++ b/dev/tests/js/testsuite/mage/loader/loader-test.js @@ -30,12 +30,12 @@ LoaderTest.prototype.testInit = function() { loader.loader('destroy'); }; // @TODO Need to be fixed to avoid errors on the bamboo server in context of MAGETWO-5085 ticket -LoaderTest.prototype._testCreateOnBeforeSend = function() { +/*LoaderTest.prototype._testCreateOnBeforeSend = function() { /*:DOC += <div id="loader"></div> */ - var loader = jQuery('#loader').trigger('ajaxSend'); +/* var loader = jQuery('#loader').trigger('ajaxSend'); assertEquals(true, loader.is(':mage-loader')); loader.loader('destroy'); -}; +};*/ LoaderTest.prototype.testLoaderOnBody = function() { jQuery('body').loader(); assertEquals(true, jQuery('body div:first').is('.loading-mask')); diff --git a/dev/tests/js/testsuite/mage/localization/localize-test.js b/dev/tests/js/testsuite/mage/localization/localize-test.js deleted file mode 100644 index 0d3e8dcf2d98e3da4c1df2e3064f940a81e61f3d..0000000000000000000000000000000000000000 --- a/dev/tests/js/testsuite/mage/localization/localize-test.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category mage.localization - * @package test - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -LocalizeTest = TestCase('LocalizeTest'); - -LocalizeTest.prototype.testInit = function () { - $.mage.locale('fr'); - assertEquals('fr', $.mage.localize.name()); -}; - -LocalizeTest.prototype.testDate = function () { - $.mage.locale(); - assertEquals('6/7/2012', $.mage.localize.date('06/07/2012 3:30 PM', 'd')); - assertEquals('Thursday, June 07, 2012', $.mage.localize.date('06/07/2012 3:30 PM', 'D')); - assertEquals('Thursday, June 07, 2012 3:30 PM', $.mage.localize.date('6/7/2012 3:30 PM', 'f')); - assertEquals('Thursday, June 07, 2012 3:30:00 PM', $.mage.localize.date('6/7/2012 3:30 PM', 'F')); - assertEquals('June 07', $.mage.localize.date('6/7/2012 3:30 PM', 'M')); - assertEquals('2012-06-07T15:30:00', $.mage.localize.date('6/7/2012 3:30 PM', 'S')); - assertEquals('3:30 PM', $.mage.localize.date('6/7/2012 3:30 PM', 't')); - assertEquals('3:30:00 PM', $.mage.localize.date('6/7/2012 3:30 PM', 'T')); - assertEquals('2012 June', $.mage.localize.date('6/7/2012 3:30 PM', 'Y')); - assertEquals('Invalid date formatter', $.mage.localize.date('06/07/2012 3:30 PM', 'x')); - assertEquals('Invalid date formatter', $.mage.localize.date('06/07/2012 3:30 PM', '2')); - -}; - -LocalizeTest.prototype.testNumber = function () { - $.mage.locale(); - assertEquals('0.00', $.mage.localize.number('0', 'n')); - assertEquals('Invalid number formatter', $.mage.localize.number('0', 'x')); -}; - -LocalizeTest.prototype.testCurrency = function () { - $.mage.locale(); - assertEquals('$0.00', $.mage.localize.currency('0')); -}; diff --git a/dev/tests/js/testsuite/mage/mage-test.js b/dev/tests/js/testsuite/mage/mage-test.js index 0c2cd551e50e7e6ba7bea93ff7c937afa89e10b9..aa2f810934a556dbcaa32fa25f52b5ffa10c3860 100644 --- a/dev/tests/js/testsuite/mage/mage-test.js +++ b/dev/tests/js/testsuite/mage/mage-test.js @@ -23,41 +23,141 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ MageTest = TestCase('MageTest'); -MageTest.prototype.testTrigger = function () { - var observeFunc = function (e, o) { - o.status = true; - }; - $.mage.event.observe('mage.test.event', observeFunc); - var obj = {status: false}; - assertEquals(false, obj.status); - $.mage.event.trigger('mage.test.event', obj); - assertEquals(true, obj.status); - // Test removeObserver - obj.status = false; - assertEquals(false, obj.status); - $.mage.event.removeObserver('mage.test.event', observeFunc); - $.mage.event.trigger('mage.test.event', obj); - assertEquals(false, obj.status); -}; - -MageTest.prototype.testLoad = function () { - // Because the window load evnt already happened, syncQueue size already have 1 elements(the asyncLoad function) - assertEquals(1, $.mage.load.js('test1')); - assertEquals(1, $.mage.load.jsSync('test2')); - assertEquals(1, $.mage.load.js('test1')); - assertEquals(1, $.mage.load.jsSync('test2')); -}; - -MageTest.prototype.testLoadLanguage = function () { - var mapping = { - 'localize': ['/pub/lib/mage/globalize/globalize.js', - '/pub/lib/mage/globalize/cultures/globalize.culture.de.js', - '/pub/lib/mage/localization/json/translate_de.js', - '/pub/lib/mage/localization/localize.js'] - }; - assertEquals(1, $.mage.load.language('en', mapping)); - assertEquals(1, $.mage.load.language()); - assertEquals(5, $.mage.load.language('de', mapping)); + +MageTest.prototype.setUp = function() { + /*:DOC += <button id="save"></button>*/ +}; + +MageTest.prototype.tearDown = function() { + jQuery(jQuery.mage).off('buttoninit'); + jQuery('body').off('contentUpdated'); + jQuery.mage + .component('tabs', null) + .component('baseButton', null) + .component('button', null); +}; + +MageTest.prototype.testInit = function() { + /*:DOC += <button id="reset"></button>*/ + jQuery.mage.component('button', []); + jQuery('button').mage('button'); + assertTrue(!!jQuery('#save').data('button')); + assertTrue(!!jQuery('#reset').data('button')); +}; + +MageTest.prototype.testCustomizeOptions = function() { + /*:DOC += <button id="reset"></button>*/ + jQuery.mage + .component('button', []) + .onInit('button', '#save', function(options) { + options.disabled = false; + }); + jQuery('button').mage('button', {disabled: true}); + assertTrue(!jQuery('#save').is(':disabled')); + assertTrue(jQuery('#reset').is(':disabled')); +}; + +MageTest.prototype.testDataAttribute = function() { + /*:DOC += <div id="main" data-mage-init="{button: [], tabs: []}"></div>*/ + jQuery.mage + .component('button', []) + .component('tabs', []) + .init(); + assertTrue(!!jQuery('#main').data('button')); + assertTrue(!!jQuery('#main').data('tabs')); }; +MageTest.prototype.testRejectComponent = function() { + jQuery.mage + .component('button', []) + .onInit('button', function() { + this.name = null; + }); + jQuery('button').mage('button'); + assertTrue(!jQuery('#save').data('button')); +}; + +MageTest.prototype.testSubstituteComponent = function() { + jQuery.mage + .component('button', []) + .component('tabs', []) + .onInit('button', function() { + this.name = 'tabs'; + }); + jQuery('button').mage('button'); + assertTrue(!jQuery('#save').data('button')); + assertTrue(!!jQuery('#save').data('tabs')); +}; +MageTest.prototype.testAddComponent = function() { + expectAsserts(4); + var resources = ['test1.js', 'test2.js']; + jQuery.mage + .component('button', resources) + .onInit('button', '#save', function() { + assertNotSame(resources, this.resources); + assertEquals(resources.length, this.resources.length); + jQuery.each(resources, jQuery.proxy(function(i, resource) { + assertEquals(resource, this.resources[i]); + }, this)); + this.name = null; + }); + jQuery('button').mage('button'); +}; + +MageTest.prototype.testExtendComponent = function() { + expectAsserts(6); + var baseButtonResources = ['test1.js', 'test2.js'], + buttonResources = ['test3.js', 'test4.js'], + resources = []; + jQuery.merge(resources, baseButtonResources); + jQuery.merge(resources, buttonResources); + jQuery.mage + .component('baseButton', baseButtonResources) + .extend('button', 'baseButton', buttonResources) + .onInit('button', '#save', function() { + assertNotSame(resources, this.resources); + assertEquals(resources.length, this.resources.length); + jQuery.each(resources, jQuery.proxy(function(i, resource) { + assertEquals(resource, this.resources[i]); + }, this)); + this.name = null; + }); + jQuery('button').mage('button'); +}; + +MageTest.prototype.testContentUpdated = function() { + jQuery.mage + .component('tabs', []) + .component('button', []) + .init(); + jQuery('body') + .append('<div id="test" data-mage-init="{tabs: []}">' + + '<button data-mage-init="{button: []}"></button>' + + '</div>'); + jQuery('#test').trigger('contentUpdated'); + assertTrue(!!jQuery('#test').data('tabs')); + assertTrue(!!jQuery('#test button').data('button')); +}; + +MageTest.prototype.testArgumentsModification = function() { + expectAsserts(3); + var expected = ['some string', 5, true]; + jQuery.fn.testPlugin = function() { + jQuery.each(arguments, function(i) { + assertEquals(expected[i], this); + }); + return this; + }; + jQuery.mage + .component('testPlugin', []) + .onInit('testPlugin', function() { + for (var i = this.args.length - 1; i >= 0; i--) { + this.args[i] = expected[i]; + } + }); + jQuery('#save').mage('testPlugin', 'test', 3, false); + // teardown + jQuery(jQuery.mage).off('testPlugininit'); + jQuery.mage.component('testPlugin', null); +}; diff --git a/dev/tests/js/testsuite/mage/tabs/tabs-test.js b/dev/tests/js/testsuite/mage/tabs/tabs-test.js index 60496d55b8155f056793d4faa65d25249bb53969..1cfb5687818af2c572efd89d1231181cd40c6112 100644 --- a/dev/tests/js/testsuite/mage/tabs/tabs-test.js +++ b/dev/tests/js/testsuite/mage/tabs/tabs-test.js @@ -115,16 +115,6 @@ TabsTest.prototype.testMovePanelsInDestination = function() { assertTrue(panel.parents('#tabs').length > 0); }; -TabsTest.prototype.testAjaxBeforeLoad = function() { - /*:DOC += <div id="tabs"></div>*/ - var tabs = jQuery('#tabs').tabs(), - processStart = false; - - jQuery('body').off().on('processStart', function(){processStart = true;}); - tabs.tabs('option', 'beforeLoad')(); - assertTrue(processStart); -}; - TabsTest.prototype.testAjaxLoad = function() { /*:DOC += <div id="tabs"><ul> <li> @@ -134,15 +124,11 @@ TabsTest.prototype.testAjaxLoad = function() { </ul></div> */ var tabs = jQuery('#tabs').tabs(), - processStop = false, ui = { tab: jQuery('#tab1'), panel: jQuery('#tab1_content') }; - jQuery('body').off().on('processStop', function(){processStop = true;}); tabs.tabs('option', 'load')({}, ui); - - assertTrue(processStop); assertEquals(jQuery('#tab1').attr('href'), '#tab1_content'); }; diff --git a/dev/tests/js/testsuite/mage/translate_inline/translate-inline-test.js b/dev/tests/js/testsuite/mage/translate_inline/translate-inline-test.js index 899c7c10121617e73ce6db5de637ce8b1a184dfb..b72ad74a8f739ce3c4c640bc5a7a553577594652 100644 --- a/dev/tests/js/testsuite/mage/translate_inline/translate-inline-test.js +++ b/dev/tests/js/testsuite/mage/translate_inline/translate-inline-test.js @@ -80,7 +80,7 @@ TranslateInlineTest.prototype.testTranslationFormTemplate = function() { translateInline.translateInline('destroy'); }; // @TODO Need to be fixed to avoid errors on the bamboo server in context of MAGETWO-5085 ticket -TranslateInlineTest.prototype._testTranslateFormSubmit = function() { +/*TranslateInlineTest.prototype._testTranslateFormSubmit = function() { FORM_KEY = 'form_key'; var options = { ajaxUrl: 'www.test.com', @@ -120,7 +120,7 @@ TranslateInlineTest.prototype._testTranslateFormSubmit = function() { assertEquals(true, ajaxParametersCorrect); assertEquals(true, dialog.is(':hidden')); translateInline.translateInline('destroy'); -}; +};*/ TranslateInlineTest.prototype.testDestroy = function() { var options = { translateForm: { diff --git a/dev/tests/js/testsuite/mage/validation/validate-test.js b/dev/tests/js/testsuite/mage/validation/validate-test.js index 35a0f376899b193fa31070b9d7f007e264d61c3a..04ada0019ab465e4b291ef2c9569348105e213e8 100644 --- a/dev/tests/js/testsuite/mage/validation/validate-test.js +++ b/dev/tests/js/testsuite/mage/validation/validate-test.js @@ -25,277 +25,380 @@ MageValidationTest = TestCase('MageValidationTest'); MageValidationTest.prototype.testValidateNoHtmlTags = function () { - assertEquals(true, $.validator.methods.validateNoHtmlTags("")); - assertEquals(true, $.validator.methods.validateNoHtmlTags(null)); - assertEquals(true, $.validator.methods.validateNoHtmlTags("abc")); - assertEquals(false, $.validator.methods.validateNoHtmlTags("<div>abc</div>")); + assertEquals(true, $.validator.methods['validate-no-html-tags'].call(this, "")); + assertEquals(true, $.validator.methods['validate-no-html-tags'].call(this, null)); + assertEquals(true, $.validator.methods['validate-no-html-tags'].call(this, "abc")); + assertEquals(false, $.validator.methods['validate-no-html-tags'].call(this, "<div>abc</div>")); }; MageValidationTest.prototype.testAllowContainerClassName = function () { /*:DOC radio = <input type="radio" class="change-container-classname"/>*/ - assertEquals(true, $.validator.methods.allowContainerClassName(this.radio)); + assertEquals(true, $.validator.methods['allow-container-className'].call(this, this.radio)); /*:DOC checkbox = <input type="checkbox" class="change-container-classname"/>*/ - assertEquals(true, $.validator.methods.allowContainerClassName(this.checkbox)); + assertEquals(true, $.validator.methods['allow-container-className'].call(this, this.checkbox)); /*:DOC radio2 = <input type="radio"/>*/ - assertEquals(false, $.validator.methods.allowContainerClassName(this.radio2)); + assertEquals(false, $.validator.methods['allow-container-className'].call(this, this.radio2)); /*:DOC checkbox2 = <input type="checkbox"/>*/ - assertEquals(false, $.validator.methods.allowContainerClassName(this.checkbox2)); + assertEquals(false, $.validator.methods['allow-container-className'].call(this, this.checkbox2)); }; MageValidationTest.prototype.testValidateSelect = function () { - assertEquals(false, $.validator.methods.validateSelect("")); - assertEquals(false, $.validator.methods.validateSelect("none")); - assertEquals(false, $.validator.methods.validateSelect(null)); - assertEquals(false, $.validator.methods.validateSelect(undefined)); - assertEquals(true, $.validator.methods.validateSelect("abc")); + assertEquals(false, $.validator.methods['validate-select'].call(this, "")); + assertEquals(false, $.validator.methods['validate-select'].call(this, "none")); + assertEquals(false, $.validator.methods['validate-select'].call(this, null)); + assertEquals(false, $.validator.methods['validate-select'].call(this, undefined)); + assertEquals(true, $.validator.methods['validate-select'].call(this, "abc")); }; -MageValidationTest.prototype.testIsEmpty = function () { - assertEquals(true, $.validator.methods.isEmpty("")); - assertEquals(true, $.validator.methods.isEmpty(null)); - assertEquals(true, $.validator.methods.isEmpty(undefined)); - assertEquals(true, $.validator.methods.isEmpty(" ")); +MageValidationTest.prototype.testValidateNotEmpty = function () { + assertEquals(true, $.validator.methods['validate-no-empty'].call(this, "")); + assertEquals(true, $.validator.methods['validate-no-empty'].call(this, null)); + assertEquals(true, $.validator.methods['validate-no-empty'].call(this, undefined)); + assertEquals(true, $.validator.methods['validate-no-empty'].call(this, " ")); }; MageValidationTest.prototype.testValidateAlphanumWithSpaces = function () { - assertEquals(true, $.validator.methods.validateAlphanumWithSpaces("")); - assertEquals(true, $.validator.methods.validateAlphanumWithSpaces(null)); - assertEquals(true, $.validator.methods.validateAlphanumWithSpaces(undefined)); - assertEquals(true, $.validator.methods.validateAlphanumWithSpaces(" ")); - assertEquals(true, $.validator.methods.validateAlphanumWithSpaces("abc ")); - assertEquals(true, $.validator.methods.validateAlphanumWithSpaces(" 123 ")); - assertEquals(true, $.validator.methods.validateAlphanumWithSpaces(" abc123 ")); - assertEquals(false, $.validator.methods.validateAlphanumWithSpaces(" !@# ")); - assertEquals(false, $.validator.methods.validateAlphanumWithSpaces(" abc.123 ")); + assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, "")); + assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, null)); + assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, undefined)); + assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, "abc ")); + assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, " 123 ")); + assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, " abc123 ")); + assertEquals(false, $.validator.methods['validate-alphanum-with-spaces'].call(this, " !@# ")); + assertEquals(false, $.validator.methods['validate-alphanum-with-spaces'].call(this, " abc.123 ")); }; MageValidationTest.prototype.testValidateStreet = function () { - assertEquals(true, $.validator.methods.validateStreet("")); - assertEquals(true, $.validator.methods.validateStreet(null)); - assertEquals(true, $.validator.methods.validateStreet(undefined)); - assertEquals(false, $.validator.methods.validateStreet(" ")); - assertEquals(true, $.validator.methods.validateStreet("1234 main st")); - assertEquals(true, $.validator.methods.validateStreet("7700 w parmer ln")); - assertEquals(true, $.validator.methods.validateStreet("7700 w parmer ln #125")); - assertEquals(false, $.validator.methods.validateStreet("!@# w parmer ln $125")); + assertEquals(true, $.validator.methods['validate-street'].call(this, "")); + assertEquals(true, $.validator.methods['validate-street'].call(this, null)); + assertEquals(true, $.validator.methods['validate-street'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-street'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-street'].call(this, "1234 main st")); + assertEquals(true, $.validator.methods['validate-street'].call(this, "7700 w parmer ln")); + assertEquals(true, $.validator.methods['validate-street'].call(this, "7700 w parmer ln #125")); + assertEquals(false, $.validator.methods['validate-street'].call(this, "!@# w parmer ln $125")); }; MageValidationTest.prototype.testValidatePhoneStrict = function () { - assertEquals(true, $.validator.methods.validatePhoneStrict("")); - assertEquals(true, $.validator.methods.validatePhoneStrict(null)); - assertEquals(true, $.validator.methods.validatePhoneStrict(undefined)); - assertEquals(false, $.validator.methods.validatePhoneStrict(" ")); - assertEquals(false, $.validator.methods.validatePhoneStrict("5121231234")); - assertEquals(false, $.validator.methods.validatePhoneStrict("512.123.1234")); - assertEquals(true, $.validator.methods.validatePhoneStrict("512-123-1234")); - assertEquals(true, $.validator.methods.validatePhoneStrict("(512)123-1234")); - assertEquals(true, $.validator.methods.validatePhoneStrict("(512) 123-1234")); + assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, "")); + assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, null)); + assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-phoneStrict'].call(this, " ")); + assertEquals(false, $.validator.methods['validate-phoneStrict'].call(this, "5121231234")); + assertEquals(false, $.validator.methods['validate-phoneStrict'].call(this, "512.123.1234")); + assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, "512-123-1234")); + assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, "(512)123-1234")); + assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, "(512) 123-1234")); }; MageValidationTest.prototype.testValidatePhoneLax = function () { - assertEquals(true, $.validator.methods.validatePhoneLax("")); - assertEquals(true, $.validator.methods.validatePhoneLax(null)); - assertEquals(true, $.validator.methods.validatePhoneLax(undefined)); - assertEquals(false, $.validator.methods.validatePhoneLax(" ")); - assertEquals(true, $.validator.methods.validatePhoneLax("5121231234")); - assertEquals(true, $.validator.methods.validatePhoneLax("512.123.1234")); - assertEquals(true, $.validator.methods.validatePhoneLax("512-123-1234")); - assertEquals(true, $.validator.methods.validatePhoneLax("(512)123-1234")); - assertEquals(true, $.validator.methods.validatePhoneLax("(512) 123-1234")); - assertEquals(true, $.validator.methods.validatePhoneLax("(512)1231234")); - assertEquals(false, $.validator.methods.validatePhoneLax("(512)_123_1234")); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "")); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, null)); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-phoneLax'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "5121231234")); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "512.123.1234")); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "512-123-1234")); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "(512)123-1234")); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "(512) 123-1234")); + assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "(512)1231234")); + assertEquals(false, $.validator.methods['validate-phoneLax'].call(this, "(512)_123_1234")); }; MageValidationTest.prototype.testValidateFax = function () { - assertEquals(true, $.validator.methods.validateFax("")); - assertEquals(true, $.validator.methods.validateFax(null)); - assertEquals(true, $.validator.methods.validateFax(undefined)); - assertEquals(false, $.validator.methods.validateFax(" ")); - assertEquals(false, $.validator.methods.validateFax("5121231234")); - assertEquals(false, $.validator.methods.validateFax("512.123.1234")); - assertEquals(true, $.validator.methods.validateFax("512-123-1234")); - assertEquals(true, $.validator.methods.validateFax("(512)123-1234")); - assertEquals(true, $.validator.methods.validateFax("(512) 123-1234")); + assertEquals(true, $.validator.methods['validate-fax'].call(this, "")); + assertEquals(true, $.validator.methods['validate-fax'].call(this, null)); + assertEquals(true, $.validator.methods['validate-fax'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-fax'].call(this, " ")); + assertEquals(false, $.validator.methods['validate-fax'].call(this, "5121231234")); + assertEquals(false, $.validator.methods['validate-fax'].call(this, "512.123.1234")); + assertEquals(true, $.validator.methods['validate-fax'].call(this, "512-123-1234")); + assertEquals(true, $.validator.methods['validate-fax'].call(this, "(512)123-1234")); + assertEquals(true, $.validator.methods['validate-fax'].call(this, "(512) 123-1234")); }; MageValidationTest.prototype.testValidateEmail = function () { - assertEquals(true, $.validator.methods.validateEmail("")); - assertEquals(true, $.validator.methods.validateEmail(null)); - assertEquals(true, $.validator.methods.validateEmail(undefined)); - assertEquals(false, $.validator.methods.validateEmail(" ")); - assertEquals(true, $.validator.methods.validateEmail("123@123.com")); - assertEquals(true, $.validator.methods.validateEmail("abc@124.en")); - assertEquals(true, $.validator.methods.validateEmail("abc@abc.commmmm")); - assertEquals(true, $.validator.methods.validateEmail("abc.abc.abc@abc.commmmm")); - assertEquals(true, $.validator.methods.validateEmail("abc.abc-abc@abc.commmmm")); - assertEquals(true, $.validator.methods.validateEmail("abc.abc_abc@abc.commmmm")); - assertEquals(false, $.validator.methods.validateEmail("abc.abc_abc@abc")); + assertEquals(true, $.validator.methods['validate-email'].call(this, "")); + assertEquals(true, $.validator.methods['validate-email'].call(this, null)); + assertEquals(true, $.validator.methods['validate-email'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-email'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-email'].call(this, "123@123.com")); + assertEquals(true, $.validator.methods['validate-email'].call(this, "abc@124.en")); + assertEquals(true, $.validator.methods['validate-email'].call(this, "abc@abc.commmmm")); + assertEquals(true, $.validator.methods['validate-email'].call(this, "abc.abc.abc@abc.commmmm")); + assertEquals(true, $.validator.methods['validate-email'].call(this, "abc.abc-abc@abc.commmmm")); + assertEquals(true, $.validator.methods['validate-email'].call(this, "abc.abc_abc@abc.commmmm")); + assertEquals(false, $.validator.methods['validate-email'].call(this, "abc.abc_abc@abc")); }; MageValidationTest.prototype.testValidateEmailSender = function () { - assertEquals(true, $.validator.methods.validateEmailSender("")); - assertEquals(true, $.validator.methods.validateEmailSender(null)); - assertEquals(true, $.validator.methods.validateEmailSender(undefined)); - assertEquals(true, $.validator.methods.validateEmailSender(" ")); - assertEquals(true, $.validator.methods.validateEmailSender("123@123.com")); - assertEquals(true, $.validator.methods.validateEmailSender("abc@124.en")); - assertEquals(true, $.validator.methods.validateEmailSender("abc@abc.commmmm")); - assertEquals(true, $.validator.methods.validateEmailSender("abc.abc.abc@abc.commmmm")); - assertEquals(true, $.validator.methods.validateEmailSender("abc.abc-abc@abc.commmmm")); - assertEquals(true, $.validator.methods.validateEmailSender("abc.abc_abc@abc.commmmm")); + assertEquals(true, $.validator.methods['validate-emailSender'].call(this, "")); + assertEquals(true, $.validator.methods['validate-emailSender'].call(null)); + assertEquals(true, $.validator.methods['validate-emailSender'].call(undefined)); + assertEquals(true, $.validator.methods['validate-emailSender'].call(" ")); + assertEquals(true, $.validator.methods['validate-emailSender'].call("123@123.com")); + assertEquals(true, $.validator.methods['validate-emailSender'].call("abc@124.en")); + assertEquals(true, $.validator.methods['validate-emailSender'].call("abc@abc.commmmm")); + assertEquals(true, $.validator.methods['validate-emailSender'].call("abc.abc.abc@abc.commmmm")); + assertEquals(true, $.validator.methods['validate-emailSender'].call("abc.abc-abc@abc.commmmm")); + assertEquals(true, $.validator.methods['validate-emailSender'].call("abc.abc_abc@abc.commmmm")); }; MageValidationTest.prototype.testValidatePassword = function () { - assertEquals(true, $.validator.methods.validatePassword("")); - assertEquals(false, $.validator.methods.validatePassword(null)); - assertEquals(false, $.validator.methods.validatePassword(undefined)); - assertEquals(true, $.validator.methods.validatePassword(" ")); - assertEquals(true, $.validator.methods.validatePassword("123@123.com")); - assertEquals(false, $.validator.methods.validatePassword("abc")); - assertEquals(false, $.validator.methods.validatePassword("abc ")); - assertEquals(false, $.validator.methods.validatePassword(" abc ")); - assertEquals(false, $.validator.methods.validatePassword("dddd")); + assertEquals(true, $.validator.methods['validate-password'].call(this, "")); + assertEquals(false, $.validator.methods['validate-password'].call(this, null)); + assertEquals(false, $.validator.methods['validate-password'].call(this, undefined)); + assertEquals(true, $.validator.methods['validate-password'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-password'].call(this, "123@123.com")); + assertEquals(false, $.validator.methods['validate-password'].call(this, "abc")); + assertEquals(false, $.validator.methods['validate-password'].call(this, "abc ")); + assertEquals(false, $.validator.methods['validate-password'].call(this, " abc ")); + assertEquals(false, $.validator.methods['validate-password'].call(this, "dddd")); }; MageValidationTest.prototype.testValidateAdminPassword = function () { - assertEquals(true, $.validator.methods.validateAdminPassword("")); - assertEquals(false, $.validator.methods.validateAdminPassword(null)); - assertEquals(false, $.validator.methods.validateAdminPassword(undefined)); - assertEquals(true, $.validator.methods.validateAdminPassword(" ")); - assertEquals(true, $.validator.methods.validateAdminPassword("123@123.com")); - assertEquals(false, $.validator.methods.validateAdminPassword("abc")); - assertEquals(false, $.validator.methods.validateAdminPassword("abc ")); - assertEquals(false, $.validator.methods.validateAdminPassword(" abc ")); - assertEquals(false, $.validator.methods.validateAdminPassword("dddd")); + assertEquals(true, $.validator.methods['validate-admin-password'].call(this, "")); + assertEquals(false, $.validator.methods['validate-admin-password'].call(this, null)); + assertEquals(false, $.validator.methods['validate-admin-password'].call(this, undefined)); + assertEquals(true, $.validator.methods['validate-admin-password'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-admin-password'].call(this, "123@123.com")); + assertEquals(false, $.validator.methods['validate-admin-password'].call(this, "abc")); + assertEquals(false, $.validator.methods['validate-admin-password'].call(this, "abc ")); + assertEquals(false, $.validator.methods['validate-admin-password'].call(this, " abc ")); + assertEquals(false, $.validator.methods['validate-admin-password'].call(this, "dddd")); }; MageValidationTest.prototype.testValidateUrl = function () { - assertEquals(true, $.validator.methods.validateUrl("")); - assertEquals(true, $.validator.methods.validateUrl(null)); - assertEquals(true, $.validator.methods.validateUrl(undefined)); - assertEquals(false, $.validator.methods.validateUrl(" ")); - assertEquals(true, $.validator.methods.validateUrl("http://www.google.com")); - assertEquals(true, $.validator.methods.validateUrl("http://127.0.0.1:8080/index.php")); - assertEquals(true, $.validator.methods.validateUrl("http://app-spot.com/index.php")); - assertEquals(true, $.validator.methods.validateUrl("http://app-spot_space.com/index.php")); + assertEquals(true, $.validator.methods['validate-url'].call(this, "")); + assertEquals(true, $.validator.methods['validate-url'].call(this, null)); + assertEquals(true, $.validator.methods['validate-url'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-url'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-url'].call(this, "http://www.google.com")); + assertEquals(true, $.validator.methods['validate-url'].call(this, "http://127.0.0.1:8080/index.php")); + assertEquals(true, $.validator.methods['validate-url'].call(this, "http://app-spot.com/index.php")); + assertEquals(true, $.validator.methods['validate-url'].call(this, "http://app-spot_space.com/index.php")); }; MageValidationTest.prototype.testValidateCleanUrl = function () { - assertEquals(true, $.validator.methods.validateCleanUrl("")); - assertEquals(true, $.validator.methods.validateCleanUrl(null)); - assertEquals(true, $.validator.methods.validateCleanUrl(undefined)); - assertEquals(false, $.validator.methods.validateCleanUrl(" ")); - assertEquals(true, $.validator.methods.validateCleanUrl("http://www.google.com")); - assertEquals(false, $.validator.methods.validateCleanUrl("http://127.0.0.1:8080/index.php")); - assertEquals(false, $.validator.methods.validateCleanUrl("http://127.0.0.1:8080")); - assertEquals(false, $.validator.methods.validateCleanUrl("http://127.0.0.1")); + assertEquals(true, $.validator.methods['validate-clean-url'].call(this, "")); + assertEquals(true, $.validator.methods['validate-clean-url'].call(this, null)); + assertEquals(true, $.validator.methods['validate-clean-url'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-clean-url'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-clean-url'].call(this, "http://www.google.com")); + assertEquals(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1:8080/index.php")); + assertEquals(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1:8080")); + assertEquals(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1")); }; MageValidationTest.prototype.testValidateXmlIdentifier = function () { - assertEquals(true, $.validator.methods.validateXmlIdentifier("")); - assertEquals(true, $.validator.methods.validateXmlIdentifier(null)); - assertEquals(true, $.validator.methods.validateXmlIdentifier(undefined)); - assertEquals(false, $.validator.methods.validateXmlIdentifier(" ")); - assertEquals(true, $.validator.methods.validateXmlIdentifier("abc")); - assertEquals(true, $.validator.methods.validateXmlIdentifier("abc_123")); - assertEquals(true, $.validator.methods.validateXmlIdentifier("abc-123")); - assertEquals(false, $.validator.methods.validateXmlIdentifier("123-abc")); + assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, "")); + assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, null)); + assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-xml-identifier'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, "abc")); + assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, "abc_123")); + assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, "abc-123")); + assertEquals(false, $.validator.methods['validate-xml-identifier'].call(this, "123-abc")); }; MageValidationTest.prototype.testValidateSsn = function () { - assertEquals(true, $.validator.methods.validateSsn("")); - assertEquals(true, $.validator.methods.validateSsn(null)); - assertEquals(true, $.validator.methods.validateSsn(undefined)); - assertEquals(false, $.validator.methods.validateSsn(" ")); - assertEquals(false, $.validator.methods.validateSsn("abc")); - assertEquals(true, $.validator.methods.validateSsn("123-13-1234")); - assertEquals(true, $.validator.methods.validateSsn("012-12-1234")); - assertEquals(false, $.validator.methods.validateSsn("23-12-1234")); + assertEquals(true, $.validator.methods['validate-ssn'].call(this, "")); + assertEquals(true, $.validator.methods['validate-ssn'].call(this, null)); + assertEquals(true, $.validator.methods['validate-ssn'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-ssn'].call(this, " ")); + assertEquals(false, $.validator.methods['validate-ssn'].call(this, "abc")); + assertEquals(true, $.validator.methods['validate-ssn'].call(this, "123-13-1234")); + assertEquals(true, $.validator.methods['validate-ssn'].call(this, "012-12-1234")); + assertEquals(false, $.validator.methods['validate-ssn'].call(this, "23-12-1234")); }; MageValidationTest.prototype.testValidateZip = function () { - assertEquals(true, $.validator.methods.validateZip("")); - assertEquals(true, $.validator.methods.validateZip(null)); - assertEquals(true, $.validator.methods.validateZip(undefined)); - assertEquals(false, $.validator.methods.validateZip(" ")); - assertEquals(true, $.validator.methods.validateZip("12345-1234")); - assertEquals(true, $.validator.methods.validateZip("02345")); - assertEquals(false, $.validator.methods.validateZip("1234")); - assertEquals(false, $.validator.methods.validateZip("1234-1234")); + assertEquals(true, $.validator.methods['validate-zip'].call(this, "")); + assertEquals(true, $.validator.methods['validate-zip'].call(this, null)); + assertEquals(true, $.validator.methods['validate-zip'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-zip'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-zip'].call(this, "12345-1234")); + assertEquals(true, $.validator.methods['validate-zip'].call(this, "02345")); + assertEquals(false, $.validator.methods['validate-zip'].call(this, "1234")); + assertEquals(false, $.validator.methods['validate-zip'].call(this, "1234-1234")); }; MageValidationTest.prototype.testValidateDateAu = function () { - assertEquals(true, $.validator.methods.validateDateAu("")); - assertEquals(true, $.validator.methods.validateDateAu(null)); - assertEquals(true, $.validator.methods.validateDateAu(undefined)); - assertEquals(false, $.validator.methods.validateDateAu(" ")); - assertEquals(true, $.validator.methods.validateDateAu("01/01/2012")); - assertEquals(true, $.validator.methods.validateDateAu("30/01/2012")); - assertEquals(false, $.validator.methods.validateDateAu("01/30/2012")); - assertEquals(false, $.validator.methods.validateDateAu("1/1/2012")); + assertEquals(true, $.validator.methods['validate-date-au'].call(this, "")); + assertEquals(true, $.validator.methods['validate-date-au'].call(this, null)); + assertEquals(true, $.validator.methods['validate-date-au'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-date-au'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-date-au'].call(this, "01/01/2012")); + assertEquals(true, $.validator.methods['validate-date-au'].call(this, "30/01/2012")); + assertEquals(false, $.validator.methods['validate-date-au'].call(this, "01/30/2012")); + assertEquals(false, $.validator.methods['validate-date-au'].call(this, "1/1/2012")); }; MageValidationTest.prototype.testValidateCurrencyDollar = function () { - assertEquals(true, $.validator.methods.validateCurrencyDollar("")); - assertEquals(true, $.validator.methods.validateCurrencyDollar(null)); - assertEquals(true, $.validator.methods.validateCurrencyDollar(undefined)); - assertEquals(false, $.validator.methods.validateCurrencyDollar(" ")); - assertEquals(true, $.validator.methods.validateCurrencyDollar("$123")); - assertEquals(true, $.validator.methods.validateCurrencyDollar("$1,123.00")); - assertEquals(true, $.validator.methods.validateCurrencyDollar("$1234")); - assertEquals(false, $.validator.methods.validateCurrencyDollar("$1234.1234")); + assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, "")); + assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, null)); + assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-currency-dollar'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, "$123")); + assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, "$1,123.00")); + assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, "$1234")); + assertEquals(false, $.validator.methods['validate-currency-dollar'].call(this, "$1234.1234")); }; MageValidationTest.prototype.testValidateNotNegativeNumber = function () { - assertEquals(true, $.validator.methods.validateNotNegativeNumber("")); - assertEquals(true, $.validator.methods.validateNotNegativeNumber(null)); - assertEquals(true, $.validator.methods.validateNotNegativeNumber(undefined)); - assertEquals(false, $.validator.methods.validateNotNegativeNumber(" ")); - assertEquals(true, $.validator.methods.validateNotNegativeNumber("0")); - assertEquals(true, $.validator.methods.validateNotNegativeNumber("1")); - assertEquals(true, $.validator.methods.validateNotNegativeNumber("1234")); - assertEquals(true, $.validator.methods.validateNotNegativeNumber("1,234.1234")); - assertEquals(false, $.validator.methods.validateNotNegativeNumber("-1")); - assertEquals(false, $.validator.methods.validateNotNegativeNumber("-1e")); - assertEquals(false, $.validator.methods.validateNotNegativeNumber("-1,234.1234")); + assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "")); + assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, null)); + assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-not-negative-number'].call(this, " ")); + assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "0")); + assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "1")); + assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "1234")); + assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "1,234.1234")); + assertEquals(false, $.validator.methods['validate-not-negative-number'].call(this, "-1")); + assertEquals(false, $.validator.methods['validate-not-negative-number'].call(this, "-1e")); + assertEquals(false, $.validator.methods['validate-not-negative-number'].call(this, "-1,234.1234")); }; MageValidationTest.prototype.testValidateGreaterThanZero = function () { - assertEquals(true, $.validator.methods.validateGreaterThanZero("")); - assertEquals(true, $.validator.methods.validateGreaterThanZero(null)); - assertEquals(true, $.validator.methods.validateGreaterThanZero(undefined)); - assertEquals(false, $.validator.methods.validateGreaterThanZero(" ")); - assertEquals(false, $.validator.methods.validateGreaterThanZero("0")); - assertEquals(true, $.validator.methods.validateGreaterThanZero("1")); - assertEquals(true, $.validator.methods.validateGreaterThanZero("1234")); - assertEquals(true, $.validator.methods.validateGreaterThanZero("1,234.1234")); - assertEquals(false, $.validator.methods.validateGreaterThanZero("-1")); - assertEquals(false, $.validator.methods.validateGreaterThanZero("-1e")); - assertEquals(false, $.validator.methods.validateGreaterThanZero("-1,234.1234")); + assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, "")); + assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, null)); + assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, " ")); + assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, "0")); + assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, "1")); + assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, "1234")); + assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, "1,234.1234")); + assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1")); + assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1e")); + assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1,234.1234")); }; MageValidationTest.prototype.testValidateCssLength = function () { - assertEquals(true, $.validator.methods.validateCssLength("")); - assertEquals(true, $.validator.methods.validateCssLength(null)); - assertEquals(true, $.validator.methods.validateCssLength(undefined)); - assertEquals(false, $.validator.methods.validateCssLength(" ")); - assertEquals(false, $.validator.methods.validateCssLength("0")); - assertEquals(true, $.validator.methods.validateCssLength("1")); - assertEquals(true, $.validator.methods.validateCssLength("1234")); - assertEquals(true, $.validator.methods.validateCssLength("1,234.1234")); - assertEquals(false, $.validator.methods.validateCssLength("-1")); - assertEquals(false, $.validator.methods.validateCssLength("-1e")); - assertEquals(false, $.validator.methods.validateCssLength("-1,234.1234")); + assertEquals(true, $.validator.methods['validate-css-length'].call(this, "")); + assertEquals(true, $.validator.methods['validate-css-length'].call(this, null)); + assertEquals(true, $.validator.methods['validate-css-length'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-css-length'].call(this, " ")); + assertEquals(false, $.validator.methods['validate-css-length'].call(this, "0")); + assertEquals(true, $.validator.methods['validate-css-length'].call(this, "1")); + assertEquals(true, $.validator.methods['validate-css-length'].call(this, "1234")); + assertEquals(true, $.validator.methods['validate-css-length'].call(this, "1,234.1234")); + assertEquals(false, $.validator.methods['validate-css-length'].call(this, "-1")); + assertEquals(false, $.validator.methods['validate-css-length'].call(this, "-1e")); + assertEquals(false, $.validator.methods['validate-css-length'].call(this, "-1,234.1234")); }; MageValidationTest.prototype.testValidateData = function () { - assertEquals(true, $.validator.methods.validateData("")); - assertEquals(true, $.validator.methods.validateData(null)); - assertEquals(true, $.validator.methods.validateData(undefined)); - assertEquals(false, $.validator.methods.validateData(" ")); - assertEquals(false, $.validator.methods.validateData("123abc")); - assertEquals(true, $.validator.methods.validateData("abc")); - assertEquals(false, $.validator.methods.validateData(" abc")); - assertEquals(true, $.validator.methods.validateData("abc123")); - assertEquals(false, $.validator.methods.validateData("abc-123")); -}; \ No newline at end of file + assertEquals(true, $.validator.methods['validate-data'].call(this, "")); + assertEquals(true, $.validator.methods['validate-data'].call(this, null)); + assertEquals(true, $.validator.methods['validate-data'].call(this, undefined)); + assertEquals(false, $.validator.methods['validate-data'].call(this, " ")); + assertEquals(false, $.validator.methods['validate-data'].call(this, "123abc")); + assertEquals(true, $.validator.methods['validate-data'].call(this, "abc")); + assertEquals(false, $.validator.methods['validate-data'].call(this, " abc")); + assertEquals(true, $.validator.methods['validate-data'].call(this, "abc123")); + assertEquals(false, $.validator.methods['validate-data'].call(this, "abc-123")); +}; + +MageValidationTest.prototype.testValidateOneRequiredByName = function () { + /*:DOC += <input type="radio" name="radio" id="radio"/> */ + /*:DOC += <input type="radio" name="radio"/> */ + assertFalse($.validator.methods['validate-one-required-by-name'].call(this, + null, document.getElementById('radio'))); + /*:DOC += <input type="radio" name="radio" checked/> */ + assertTrue($.validator.methods['validate-one-required-by-name'].call(this, + null, document.getElementById('radio'))); + + /*:DOC += <input type="checkbox" name="checkbox" id="checkbox"/> */ + /*:DOC += <input type="checkbox" name="checkbox"/> */ + assertFalse($.validator.methods['validate-one-required-by-name'].call(this, + null, document.getElementById('checkbox'))); + /*:DOC += <input type="checkbox" name="checkbox" checked/> */ + assertTrue($.validator.methods['validate-one-required-by-name'].call(this, + null, document.getElementById('checkbox'))); +}; + +MageValidationTest.prototype.testLessThanEqualsTo = function () { + /*:DOC += <input type="text" value=6 id="element1" />*/ + /*:DOC += <input type="text" value=5 id="element2" />*/ + var element1 = document.getElementById('element1'); + assertFalse($.validator.methods['less-than-equals-to'].call(this, element1.value, + element1, '#element2')); + element1.value = 4; + assertTrue($.validator.methods['less-than-equals-to'].call(this, element1.value, + element1, '#element2')); + + /*:DOC += <input type="text" id="element3" />*/ + /*:DOC += <input type="text" value=5 id="element4" />*/ + var element3 = document.getElementById('element3'); + assertTrue($.validator.methods['less-than-equals-to'].call(this, element3.value, + element3, '#element4')); + + /*:DOC += <input type="text" value=6 id="element5" />*/ + /*:DOC += <input type="text" id="element6" />*/ + var element5 = document.getElementById('element5'); + assertTrue($.validator.methods['less-than-equals-to'].call(this, element5.value, + element5, '#element6')); +}; + +MageValidationTest.prototype.testGreaterThanEqualsTo = function () { + /*:DOC += <input type="text" value=6 id="element1" />*/ + /*:DOC += <input type="text" value=7 id="element2" />*/ + var element1 = document.getElementById('element1'); + assertFalse($.validator.methods['greater-than-equals-to'].call(this, element1.value, + element1, '#element2')); + element1.value = 9; + assertTrue($.validator.methods['greater-than-equals-to'].call(this, element1.value, + element1, '#element2')); + + /*:DOC += <input type="text" id="element3" />*/ + /*:DOC += <input type="text" value=5 id="element4" />*/ + var element3 = document.getElementById('element3'); + assertTrue($.validator.methods['greater-than-equals-to'].call(this, element3.value, + element3, '#element4')); + + /*:DOC += <input type="text" value=6 id="element5" />*/ + /*:DOC += <input type="text" id="element6" />*/ + var element5 = document.getElementById('element5'); + assertTrue($.validator.methods['greater-than-equals-to'].call(this, element5.value, + element5, '#element6')); +}; + +MageValidationTest.prototype.testValidateGroupedQty = function () { + /*:DOC += <div id="div1"> + <input type="text" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text"/> + </div> + */ + assertFalse($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div1')); + /*:DOC += <div id="div2"> + <input type="text" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text" value="a" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text"/> + </div> + */ + assertFalse($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div2')); + /*:DOC += <div id="div3"> + <input type="text" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text" value="-6" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text"/> + </div> + */ + assertFalse($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div3')); + /*:DOC += <div id="div4"> + <input type="text" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text" value="6" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text"/> + </div> + */ + assertTrue($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div4')); + /*:DOC += <div id="div5"> + <input type="text" value="1" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text" value="6" data-validate="{'validate-grouped-qty':'#super-product-table'}"/> + <input type="text"/> + </div> + */ + assertTrue($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div5')); + +}; diff --git a/dev/tests/static/framework/CodingStandard/Tool/CodeMessDetector.php b/dev/tests/static/framework/CodingStandard/Tool/CodeMessDetector.php new file mode 100644 index 0000000000000000000000000000000000000000..42f2395f09d66129ef49b52c2003472a4a1ec6f1 --- /dev/null +++ b/dev/tests/static/framework/CodingStandard/Tool/CodeMessDetector.php @@ -0,0 +1,95 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento + * @subpackage static_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * PHP Code Mess v1.3.3 tool wrapper + */ +class CodingStandard_Tool_CodeMessDetector implements CodingStandard_ToolInterface +{ + /** + * Ruleset directory + * + * @var string + */ + protected $_rulesetFile; + + /** + * Report file + * + * @var string + */ + protected $_reportFile; + + /** + * Constructor + * + * @param string $rulesetDir Directory that locates the inspection rules + * @param string $reportFile Destination file to write inspection report to + */ + public function __construct($rulesetFile, $reportFile) + { + $this->_reportFile = $reportFile; + $this->_rulesetFile = $rulesetFile; + } + + /** + * Whether the tool can be ran on the current environment + * + * @return bool + */ + public function canRun() + { + return class_exists('PHP_PMD_TextUI_Command'); + } + + /** + * Run tool for files specified + * + * @param array $whiteList Files/directories to be inspected + * @param array $blackList Files/directories to be excluded from the inspection + * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... + * + * @return int + */ + public function run(array $whiteList, array $blackList = array(), array $extensions = array()) + { + $commandLineArguments = array('run_file_mock', //emulate script name in console arguments + implode(',', $whiteList), + 'xml', //report format + $this->_rulesetFile, + '--exclude' , str_replace('/', DIRECTORY_SEPARATOR, implode(',', $blackList)), + '--reportfile' , $this->_reportFile + ); + + $options = new PHP_PMD_TextUI_CommandLineOptions($commandLineArguments); + + $command = new PHP_PMD_TextUI_Command(); + + return $command->run($options); + } + +} diff --git a/dev/tests/static/framework/CodingStandard/Tool/CodeSniffer.php b/dev/tests/static/framework/CodingStandard/Tool/CodeSniffer.php index 52b0f13994549bfcb9f7c1c1e080f15fda461285..a2d11e997c3c745abb904e5179cd98ffae73e3b8 100644 --- a/dev/tests/static/framework/CodingStandard/Tool/CodeSniffer.php +++ b/dev/tests/static/framework/CodingStandard/Tool/CodeSniffer.php @@ -93,7 +93,6 @@ class CodingStandard_Tool_CodeSniffer implements CodingStandard_ToolInterface return preg_quote(str_replace('/', DIRECTORY_SEPARATOR, $item)); }, $blackList); - $this->_wrapper->checkRequirements(); $settings = $this->_wrapper->getDefaults(); $settings['files'] = $whiteList; diff --git a/dev/tests/static/framework/CodingStandard/Tool/CopyPasteDetector.php b/dev/tests/static/framework/CodingStandard/Tool/CopyPasteDetector.php new file mode 100644 index 0000000000000000000000000000000000000000..a678fb3d8784fce008fb1e6e81d991d493e93705 --- /dev/null +++ b/dev/tests/static/framework/CodingStandard/Tool/CopyPasteDetector.php @@ -0,0 +1,93 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento + * @subpackage static_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * PHP Copy Paste Detector v1.4.0 tool wrapper + */ +class CodingStandard_Tool_CopyPasteDetector implements CodingStandard_ToolInterface +{ + /** + * Report file + * + * @var string + */ + protected $_reportFile; + + /** + * Constructor + * + * @param string $reportFile Destination file to write inspection report to + */ + public function __construct($reportFile) + { + $this->_reportFile = $reportFile; + } + + /** + * Whether the tool can be ran on the current environment + * + * @return bool + */ + public function canRun() + { + return (bool)@include 'SebastianBergmann/PHPCPD/autoload.php'; + } + + /** + * Run tool for files specified + * + * @param array $whiteList Files/directories to be inspected + * @param array $blackList Files/directories to be excluded from the inspection + * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... + * + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + * + * @return int + */ + public function run(array $whiteList, array $blackList = array(), array $extensions = array()) + { + $blackListStr = ' '; + foreach ($blackList as $file) { + $file = escapeshellarg(trim($file)); + if (!$file) { + continue; + } + $blackListStr .= '--exclude ' . $file . ' '; + } + + $command = 'phpcpd' + . ' --log-pmd ' . escapeshellarg($this->_reportFile) + . ' --min-lines 7' + . $blackListStr + . ' ' .realpath(__DIR__ . '/../../../../../../'); + + exec($command, $output, $exitCode); + + return !(bool)$exitCode; + } + +} diff --git a/dev/tests/static/framework/Inspection/CopyPasteDetector/Command.php b/dev/tests/static/framework/Inspection/CopyPasteDetector/Command.php deleted file mode 100644 index 80a1c01710de4babad89e024f2a703c7e4bb32cc..0000000000000000000000000000000000000000 --- a/dev/tests/static/framework/Inspection/CopyPasteDetector/Command.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category Magento - * @package Magento - * @subpackage static_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * PHP Copy/Paste Detector shell command - */ -class Inspection_CopyPasteDetector_Command extends Inspection_CommandAbstract -{ - /** - * @var int|null - */ - protected $_minLines; - - /** - * @var int|null - */ - protected $_minTokens; - - /** - * Constructor - * - * @param string $reportFile Destination file to write inspection report to - * @param int|null $minLines Minimum number of identical lines - * @param int|null $minTokens Minimum number of identical tokens - */ - public function __construct($reportFile, $minLines = null, $minTokens = null) - { - parent::__construct($reportFile); - $this->_minLines = $minLines; - $this->_minTokens = $minTokens; - } - - /** - * @return string - */ - public function _buildVersionShellCmd() - { - return 'phpcpd --version'; - } - - /** - * @param array $whiteList - * @param array $blackList - * @return string - */ - protected function _buildShellCmd($whiteList, $blackList) - { - $whiteList = array_map('escapeshellarg', $whiteList); - $whiteList = implode(' ', $whiteList); - - if ($blackList) { - $blackList = array_map('escapeshellarg', $blackList); - $blackList = '--exclude ' . implode(' --exclude ', $blackList); - } else { - $blackList = ''; - } - - return 'phpcpd' - . ' --log-pmd ' . escapeshellarg($this->_reportFile) - . ($blackList ? ' ' . $blackList : '') - . ($this->_minLines ? ' --min-lines ' . $this->_minLines : '') - . ($this->_minTokens ? ' --min-tokens ' . $this->_minTokens : '') - . ' ' . $whiteList - ; - } -} diff --git a/dev/tests/static/framework/Inspection/JsHint/Command.php b/dev/tests/static/framework/Inspection/JsHint/Command.php new file mode 100644 index 0000000000000000000000000000000000000000..b886aa578d34bcf0e0334e12bc1ad7744f9d2b79 --- /dev/null +++ b/dev/tests/static/framework/Inspection/JsHint/Command.php @@ -0,0 +1,218 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento + * @subpackage static_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +/** + * PHP JsHint shell command + */ +class Inspection_JsHint_Command extends Inspection_CommandAbstract +{ + + /** + * @var string + */ + protected $_fileName; + /** + * @var string + */ + protected $_reportFile; + + /** + * Constructor + * + * @param string $fileName js file name + * @param string $reportFile Destination file to write JsHint report to + */ + public function __construct($fileName, $reportFile) + { + $this->_fileName = $fileName; + $this->_reportFile = $reportFile; + } + + /** + * Method return instant variable fileName + * @return string + */ + public function getFileName() + { + return $this->_fileName; + } + + /** + * Unable to get JsHint version from command line + * @return string + */ + protected function _buildVersionShellCmd() + { + return null; + } + + /** + * Method return HostScript cscript for windows and rhino for linux + * $isRunCmd specify if method is called by runCmd in linux or by canRun method + * @return string + */ + protected function _getHostScript($isRunCmd = false) + { + if ($this->_isOsWin()) { + return 'cscript '; + } else { + return $isRunCmd ? 'rhino ' : 'which rhino &> /dev/null'; + } + } + + /** + * Overwirte parent method, $whiteList and $blackList are not used in this implementation + * @param array $whiteList + * @param array $blackList + * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _buildShellCmd($whiteList, $blackList) + { + return $this->_getHostScript(true) . ' ' + . '"' . $this->_getJsHintPath() . '" ' + . '"' . $this->getFileName() . '" ' + . $this->_getJsHintOptions(); + } + + /** + * Overwrite parent method, keep report file, Build and execute the shell command + * + * @param array $whiteList Files/directories to be inspected + * @param array $blackList Files/directories to be excluded from the inspection + * @return bool + */ + public function run(array $whiteList, array $blackList = array()) + { + $shellCmd = $this->_buildShellCmd($whiteList, $blackList); + $result = $this->_execShellCmd($shellCmd); + $this->_generateLastRunMessage(); + return $result !== false; + } + + /** + * Check if OS is windows + * @return boolean + */ + protected function _isOsWin() + { + return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; + } + + /** + * Return default JsHintOptions and format it based on OS + * @return string + */ + protected function _getJsHintOptions() + { + $jsHintOptionsArray = array('eqnull' => 'true', 'browser' => 'true', 'jquery' => 'true'); + $jsHintOptions = null; + if ($this->_isOsWin()) { + foreach ($jsHintOptionsArray as $key => $value) { + $jsHintOptions .= "/$key:$value "; + } + } else { + foreach ($jsHintOptionsArray as $key => $value) { + $jsHintOptions .= "$key=$value,"; + } + } + return trim(rtrim($jsHintOptions, ",")); + } + + /** + * Execute a shell command on the current environment and return its output or FALSE on failure + * + * @param string $shellCmd + * @return string|false + */ + protected function _execShellCmd($shellCmd) + { + $retArray = $this->_executeCommand($shellCmd); + $this->_lastOutput = implode(PHP_EOL, $retArray[0]); + $this->_lastExitCode = $retArray[1]; + if ($this->_lastExitCode == 0) { + return $this->_lastOutput; + } + if ($this->_isOsWin()) { + $output = array_slice($retArray[0], 2); + } + $output[] = ''; //empty line to separate each file output + file_put_contents($this->_reportFile, $this->_lastOutput, FILE_APPEND); + return false; + + } + + /** + * Return JsHintPath + * @return string + */ + protected function _getJsHintPath() + { + return TESTS_JSHINT_PATH; + } + + /** + * Check is file exists + * @param string $fileName + * @return string + */ + protected function _fileExists($fileName) + { + return is_file($fileName); + } + + /** + * Execute command and return command output and system status + * @param string $cmd + * @return array + */ + protected function _executeCommand($cmd) + { + exec(trim($cmd), $output, $retVal); + return array($output, $retVal); + } + + /** + * Check if JsHint is runnable + * @throws Exception + * @return boolean + */ + public function canRun() + { + $retArray = $this->_executeCommand($this->_getHostScript()); + if ($retArray[1] != 0) { + throw new Exception($this->_getHostScript() . ' does not exist.'); + } + if (!$this->_fileExists($this->_getJsHintPath())) { + throw new Exception($this->_getJsHintPath() . ' does not exist.'); + } + if (!$this->_fileExists($this->getFileName())) { + throw new Exception($this->getFileName() . ' does not exist.'); + } + return true; + } + +} diff --git a/dev/tests/static/framework/Inspection/MessDetector/Command.php b/dev/tests/static/framework/Inspection/MessDetector/Command.php deleted file mode 100644 index 57140c61ac2af416e74f429cfa6d4c6221136788..0000000000000000000000000000000000000000 --- a/dev/tests/static/framework/Inspection/MessDetector/Command.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category Magento - * @package Magento - * @subpackage static_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * PHP Mess Detector shell command - */ -class Inspection_MessDetector_Command extends Inspection_CommandAbstract -{ - /** - * @var string - */ - protected $_rulesetFile; - - /** - * Constructor - * - * @param string $rulesetFile File that declares the inspection rules - * @param string $reportFile Destination file to write inspection report to - */ - public function __construct($rulesetFile, $reportFile) - { - parent::__construct($reportFile); - $this->_rulesetFile = $rulesetFile; - } - - /** - * Get path to the ruleset file - * - * @return string - */ - public function getRulesetFile() - { - return $this->_rulesetFile; - } - - /** - * @return string - */ - public function _buildVersionShellCmd() - { - return 'phpmd --version'; - } - - /** - * @param array $whiteList - * @param array $blackList - * @return string - */ - protected function _buildShellCmd($whiteList, $blackList) - { - $whiteList = implode(',', $whiteList); - $whiteList = escapeshellarg($whiteList); - - $blackListStr = ''; - if ($blackList) { - foreach ($blackList as $fileOrDir) { - $fileOrDir = str_replace('/', DIRECTORY_SEPARATOR, $fileOrDir); - $blackListStr .= ($blackListStr ? ',' : '') . $fileOrDir; - } - $blackListStr = '--exclude ' . escapeshellarg($blackListStr); - } - - return 'phpmd' - . ' ' . $whiteList - . ' xml' - . ' ' . escapeshellarg($this->_rulesetFile) - . ($blackListStr ? ' ' . $blackListStr : '') - . ' --reportfile ' . escapeshellarg($this->_reportFile) - ; - } -} diff --git a/dev/tests/static/framework/tests/unit/testsuite/CodingStandard/Tool/CodeMessDetectorTest.php b/dev/tests/static/framework/tests/unit/testsuite/CodingStandard/Tool/CodeMessDetectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..be533994a3bb349afaffe36aac9167717cec34c5 --- /dev/null +++ b/dev/tests/static/framework/tests/unit/testsuite/CodingStandard/Tool/CodeMessDetectorTest.php @@ -0,0 +1,35 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento + * @subpackage static_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class CodingStandard_Tool_CodeMessDetectorTest extends PHPUnit_Framework_TestCase +{ + public function testCanRun() + { + $messDetector = new CodingStandard_Tool_CodeMessDetector('some/ruleset/file.xml', 'some/report/file.xml'); + $this->assertEquals(class_exists('PHP_PMD_TextUI_Command'), $messDetector->canRun()); + } +} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Inspection/CopyPasteDetector/CommandTest.php b/dev/tests/static/framework/tests/unit/testsuite/Inspection/CopyPasteDetector/CommandTest.php deleted file mode 100644 index 6577a51235393fcfb90e2a2578de5c8648a345f9..0000000000000000000000000000000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Inspection/CopyPasteDetector/CommandTest.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category Magento - * @package Magento - * @subpackage static_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -class Inspection_CopyPasteDetector_CommandTest extends PHPUnit_Framework_TestCase -{ - /** - * @var Inspection_CopyPasteDetector_Command|PHPUnit_Framework_MockObject_MockObject - */ - protected $_cmd; - - protected function setUp() - { - $this->_cmd = $this->getMock( - 'Inspection_CopyPasteDetector_Command', - array('_execShellCmd'), - array('some/report/file.xml', 5, 50) - ); - } - - /** - * @dataProvider canRunDataProvider - */ - public function testCanRun($cmdOutput, $expectedResult) - { - $this->_cmd - ->expects($this->once()) - ->method('_execShellCmd') - ->with($this->stringContains('phpcpd')) - ->will($this->returnValue($cmdOutput)) - ; - $this->assertEquals($expectedResult, $this->_cmd->canRun()); - } - - public function canRunDataProvider() - { - return array( - 'success' => array('phpcpd X.Y.Z', true), - 'failure' => array(false, false), - ); - } - - /** - * @dataProvider getVersionDataProvider - */ - public function testGetVersion($versionCmdOutput, $expectedVersion) - { - $this->_cmd - ->expects($this->once()) - ->method('_execShellCmd') - ->with($this->stringContains('phpcpd')) - ->will($this->returnValue($versionCmdOutput)) - ; - $this->assertEquals($expectedVersion, $this->_cmd->getVersion()); - } - - public function getVersionDataProvider() - { - return array( - array('phpcpd 1.3.2 by Sebastian Bergmann.', '1.3.2'), - ); - } - - public function testRun() - { - $expectedQuoteChar = substr(escapeshellarg(' '), 0, 1); - $expectedCmd = 'phpcpd' - . ' --log-pmd "some/report/file.xml"' - . ' --min-lines 5' - . ' --min-tokens 50' - . ' "some/test/dir with space" "some/test/file with space.php"' - ; - $expectedCmd = str_replace('"', $expectedQuoteChar, $expectedCmd); - $this->_cmd - ->expects($this->at(0)) - ->method('_execShellCmd') - ->with($expectedCmd) - ; - $this->_cmd->run(array('some/test/dir with space', 'some/test/file with space.php')); - } -} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Inspection/JsHint/CommandTest.php b/dev/tests/static/framework/tests/unit/testsuite/Inspection/JsHint/CommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3fc23194b703d0ad19511df540c7b2fbd30e5bbf --- /dev/null +++ b/dev/tests/static/framework/tests/unit/testsuite/Inspection/JsHint/CommandTest.php @@ -0,0 +1,114 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento + * @subpackage static_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Inspection_JsHint_CommandTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Inspection_JsHint_Command|PHPUnit_Framework_MockObject_MockObject + */ + protected $_cmd; + + protected function setUp() + { + $this->_cmd = $this->getMock( + 'Inspection_JsHint_Command', + array('_getHostScript', '_fileExists', '_getJsHintPath', + '_executeCommand', 'getFileName', '_execShellCmd', '_getJsHintOptions'), + array('mage.js', 'report.xml') + ); + } + + public function testCanRun() + { + $this->_cmd->expects($this->any())->method('_getHostScript')->will($this->returnValue('cscript')); + $this->_cmd->expects($this->any())->method('_executeCommand')->with($this->stringContains('cscript')) + ->will($this->returnValue(array('output', 0))); + $this->_cmd->expects($this->any())->method('_getJsHintPath')->will($this->returnValue('jshint-path')); + $this->_cmd->expects($this->any())->method('_fileExists')->with($this->isType('string')) + ->will($this->returnValue(true)); + $this->_cmd->expects($this->any())->method('getFileName')->will($this->returnValue('mage.js')); + $this->assertEquals(true, $this->_cmd->canRun()); + } + + public function testCanRunHostScriptDoesNotExistException() + { + $this->_cmd->expects($this->any())->method('_getHostScript')->will($this->returnValue('cscript')); + $this->_cmd->expects($this->any())->method('_executeCommand')->with($this->stringContains('cscript')) + ->will($this->returnValue(array('output', 1))); + try { + $this->_cmd->canRun(); + } catch(Exception $e){ + $this->assertEquals('cscript does not exist.', $e->getMessage()); + } + } + + public function testCanRunJsHintPathDoesNotExistException() + { + $this->_cmd->expects($this->any())->method('_getHostScript')->will($this->returnValue('cscript')); + $this->_cmd->expects($this->any())->method('_executeCommand')->with($this->stringContains('cscript')) + ->will($this->returnValue(array('output', 0))); + $this->_cmd->expects($this->any())->method('_getJsHintPath')->will($this->returnValue('jshint-path')); + $this->_cmd->expects($this->any())->method('_fileExists')->with('jshint-path')->will($this->returnValue(false)); + try { + $this->_cmd->canRun(); + } catch(Exception $e){ + $this->assertEquals('jshint-path does not exist.', $e->getMessage()); + } + } + + public function testCanRunJsFileDoesNotExistException() + { + $this->_cmd->expects($this->any())->method('_getHostScript')->will($this->returnValue('cscript')); + $this->_cmd->expects($this->any())->method('_executeCommand')->with($this->stringContains('cscript')) + ->will($this->returnValue(array('output', 0))); + $this->_cmd->expects($this->any())->method('_getJsHintPath')->will($this->returnValue('jshint-path')); + $this->_cmd->expects($this->any())->method('_fileExists')->will($this->returnCallback(function() { + $arg = func_get_arg(0); + if ($arg == 'jshint-path') { + return true; + } + if ($arg == 'mage.js') { + return false; + } + })); + $this->_cmd->expects($this->any())->method('getFileName')->will($this->returnValue('mage.js')); + try { + $this->_cmd->canRun(); + } catch(Exception $e){ + $this->assertEquals('mage.js does not exist.', $e->getMessage()); + } + } + + public function testRun() + { + $this->_cmd->expects($this->any())->method('_getHostScript')->will($this->returnValue('cscript')); + $this->_cmd->expects($this->any())->method('_getJsHintPath')->will($this->returnValue('jshint-path')); + $this->_cmd->expects($this->any())->method('getFileName')->will($this->returnValue('mage.js')); + $this->_cmd->expects($this->once())->method('_execShellCmd')->with('cscript "jshint-path" "mage.js" '); + $this->_cmd->run(array()); + } +} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Inspection/MessDetector/CommandTest.php b/dev/tests/static/framework/tests/unit/testsuite/Inspection/MessDetector/CommandTest.php deleted file mode 100644 index cb3641a7fae73ad9ba8e265644b28ebf22058529..0000000000000000000000000000000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Inspection/MessDetector/CommandTest.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category Magento - * @package Magento - * @subpackage static_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -class Inspection_MessDetector_CommandTest extends PHPUnit_Framework_TestCase -{ - /** - * @var Inspection_MessDetector_Command|PHPUnit_Framework_MockObject_MockObject - */ - protected $_cmd; - - protected function setUp() - { - $this->_cmd = $this->getMock( - 'Inspection_MessDetector_Command', - array('_execShellCmd'), - array('some/ruleset/file.xml', 'some/report/file.xml') - ); - } - - public function testGetRulesetFile() - { - $this->assertEquals('some/ruleset/file.xml', $this->_cmd->getRulesetFile()); - } - - /** - * @dataProvider canTestDataProvider - */ - public function testCanRun($cmdOutput, $expectedResult) - { - $this->_cmd - ->expects($this->once()) - ->method('_execShellCmd') - ->with($this->stringContains('phpmd')) - ->will($this->returnValue($cmdOutput)) - ; - $this->assertEquals($expectedResult, $this->_cmd->canRun()); - } - - public function canTestDataProvider() - { - return array( - 'success' => array('PHPMD X.Y.Z', true), - 'failure' => array(false, false), - ); - } - - /** - * @dataProvider getVersionDataProvider - */ - public function testGetVersion($versionCmdOutput, $expectedVersion) - { - $this->_cmd - ->expects($this->once()) - ->method('_execShellCmd') - ->with($this->stringContains('phpmd')) - ->will($this->returnValue($versionCmdOutput)) - ; - $this->assertEquals($expectedVersion, $this->_cmd->getVersion()); - } - - public function getVersionDataProvider() - { - return array( - array('PHPMD 0.2.8RC1 by Manuel Pichler', '0.2.8RC1'), - array('PHPMD 1.1.1 by Manuel Pichler', '1.1.1'), - ); - } - - public function testRun() - { - $expectedQuoteChar = substr(escapeshellarg(' '), 0, 1); - $expectedCmd = 'phpmd' - . ' "some/test/dir with space,some/test/file with space.php"' - . ' xml' - . ' "some/ruleset/file.xml"' - . ' --reportfile "some/report/file.xml"' - ; - $expectedCmd = str_replace('"', $expectedQuoteChar, $expectedCmd); - $this->_cmd - ->expects($this->once()) - ->method('_execShellCmd') - ->with($expectedCmd) - ; - $this->_cmd->run(array('some/test/dir with space', 'some/test/file with space.php')); - } -} diff --git a/dev/tests/static/phpunit.xml.dist b/dev/tests/static/phpunit.xml.dist index 9b0a35a5ced17036767754867d67a4ef485952f2..f1ea9d92e83bb773a2bb564a987f3edbedbf5023 100644 --- a/dev/tests/static/phpunit.xml.dist +++ b/dev/tests/static/phpunit.xml.dist @@ -42,8 +42,6 @@ <php> <ini name="date.timezone" value="America/Los_Angeles"/> <!-- TESTS_JSHINT_PATH specify the path to wsh.js on Windows and jshint-rhino.js on Linux --> - <const name="TESTS_JSHINT_PATH" value="path_to_jshint_javascript"/> - <!-- JSHint global options for code verification. See: http://www.jshint.com/docs/ --> - <const name="TESTS_JSHINT_OPTIONS" value=""/> + <const name="TESTS_JSHINT_PATH" value=""/> </php> </phpunit> diff --git a/dev/tests/static/testsuite/Js/Exemplar/JsHintTest.php b/dev/tests/static/testsuite/Js/Exemplar/JsHintTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f7b83adeeb7d69e05ef292ecc60cb58f102d0f4a --- /dev/null +++ b/dev/tests/static/testsuite/Js/Exemplar/JsHintTest.php @@ -0,0 +1,76 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category tests + * @package static + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Class to test composed JsHint test. + * Used to ensure, that Magento coding standard rules (sniffs) really do what they are intended to do. + * + * @category Magento + * @package Magento + * @subpackage static_tests + */ +class Js_Exemplar_JsHintTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Inspection_JsHint_Command + */ + protected static $_cmd = null; + + public static function setUpBeforeClass() + { + $reportFile = __DIR__ . '/../../../tmp/js_report.txt'; + $fileName = __DIR__ . '/../../../../../../pub/lib/mage/mage.js'; + self::$_cmd = new Inspection_JsHint_Command($fileName, $reportFile); + } + + protected function setUp() + { + $reportFile = self::$_cmd->getReportFile(); + if (!is_dir(dirname($reportFile))) { + mkdir(dirname($reportFile), 0777); + } + } + + protected function tearDown() + { + $reportFile = self::$_cmd->getReportFile(); + if (file_exists($reportFile)) { + unlink($reportFile); + } + rmdir(dirname($reportFile)); + } + + public function testCanRun() + { + $result = false; + try { + $result = self::$_cmd->canRun(); + } catch (Exception $e) { + $this->fail($e->getMessage()); + } + $this->assertTrue($result, true); + } +} \ No newline at end of file diff --git a/dev/tests/static/testsuite/Js/LiveCodeTest.php b/dev/tests/static/testsuite/Js/LiveCodeTest.php index aecb26a779d8b5ec0b14ac21fcfaab9ff886a5e9..148426c69be05ecf2e527237f2846b42a4b882e2 100644 --- a/dev/tests/static/testsuite/Js/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Js/LiveCodeTest.php @@ -92,41 +92,20 @@ class Js_LiveCodeTest extends PHPUnit_Framework_TestCase self::$_whiteListJsFiles = array_filter(self::$_whiteListJsFiles, $filter); } - /** - * @param $filename - * - * @throws Exception - * - * @SuppressWarnings(PHPMD.UnusedLocalVariable) - */ - protected function _verifyTestRunnable($filename) - { - $command = 'which rhino'; - if ($this->_isOsWin()) { - $command = 'cscript'; - } - exec($command, $output, $retVal); - if ($retVal != 0) { - throw new Exception($command . ' does not exist.'); - } - if (!file_exists($filename)) { - throw new Exception($filename . ' does not exist.'); - } - } - /** * @dataProvider codeJsHintDataProvider */ public function testCodeJsHint($filename) { - try{ - $this->_verifyTestRunnable($filename); + $cmd = new Inspection_JsHint_Command($filename, self::$_reportFile); + $result = false; + try { + $result = $cmd->canRun(); } catch (Exception $e) { $this->markTestSkipped($e->getMessage()); } - $result = $this->_executeJsHint($filename); - if (!$result) { - $this->fail("Failed JSHint."); + if ($result) { + $this->assertTrue($cmd->run(array()), $cmd->getLastRunMessage()); } } @@ -144,44 +123,6 @@ class Js_LiveCodeTest extends PHPUnit_Framework_TestCase return array_map($map, self::$_whiteListJsFiles); } - /** - * Returns cscript for windows and rhino for linux - * @return string - */ - protected function _getCommand() - { - if ($this->_isOsWin()) { - return 'cscript ' . TESTS_JSHINT_PATH; - } else { - return 'rhino ' . TESTS_JSHINT_PATH; - } - } - - protected function _isOsWin() - { - return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; - } - - /** - * Run jsHint against js file; if failed output error to report file - * @param $filename - js file name with full path - * @return bool - */ - protected function _executeJsHint($filename) - { - $command = $this->_getCommand() . ' "' . $filename . '" ' . TESTS_JSHINT_OPTIONS; - exec($command, $output, $retVal); - if ($retVal == 0) { - return true; - } - if ($this->_isOsWin()) { - $output = array_slice($output, 2); - } - $output[] = ''; //empty line to separate each file output - file_put_contents(self::$_reportFile, implode(PHP_EOL, $output), FILE_APPEND); - return false; - } - /** * Read all text files by specified glob pattern and combine them into an array of valid files/directories * diff --git a/dev/tests/static/testsuite/Js/_files/blacklist/core.txt b/dev/tests/static/testsuite/Js/_files/blacklist/core.txt index 78a62987a7464bd7c4137426b184e70e825e31fd..a198a22a28a11a41b5b2f4b729695c6526496b3b 100644 --- a/dev/tests/static/testsuite/Js/_files/blacklist/core.txt +++ b/dev/tests/static/testsuite/Js/_files/blacklist/core.txt @@ -1,10 +1,24 @@ +pub/lib/head.load.min.js +pub/lib/json2.js pub/lib/mage/adminhtml +pub/lib/mage/backend/editablemultiselect.js pub/lib/mage/captcha.js pub/lib/mage/directpost.js pub/lib/mage/jquery-no-conflict.js -app/code/core/Mage/Catalog/view/frontend/msrp.js app/code/core/Mage/Page/view/frontend/menu.js app/code/core/Mage/Checkout/view/frontend/multishipping/payment.js app/code/core/Mage/Checkout/view/frontend/onepage/accordion.js app/code/core/Mage/Checkout/view/frontend/opcheckout.js app/code/core/Mage/Captcha/view/frontend/onepage.js +app/code/core/Mage/Adminhtml/view/adminhtml/catalog/base-image-uploader.js +app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.js +app/code/core/Mage/Adminhtml/view/adminhtml/catalog/jquery.base-image-uploader.js +app/code/core/Mage/Adminhtml/view/adminhtml/catalog/jquery.category-selector.js +app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js +app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js +app/code/core/Mage/Adminhtml/view/adminhtml/promo/rules.js +app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js +app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/scripts.js +app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions_tooltip.js +app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging.js +app/code/core/Mage/Adminhtml/view/adminhtml/variables.js diff --git a/dev/tests/static/testsuite/Js/_files/blacklist/ee.txt b/dev/tests/static/testsuite/Js/_files/blacklist/ee.txt new file mode 100644 index 0000000000000000000000000000000000000000..373ec3a9d98137916e2a8ba627892be8745a8ca7 --- /dev/null +++ b/dev/tests/static/testsuite/Js/_files/blacklist/ee.txt @@ -0,0 +1,2 @@ +app/code/core/Enterprise/Cms/view/adminhtml/cms.js +app/code/core/Enterprise/Rma/view/adminhtml/rma.js diff --git a/dev/tests/static/testsuite/Js/_files/whitelist/core.txt b/dev/tests/static/testsuite/Js/_files/whitelist/core.txt index 3864f28ddcfca43e7d3bc553bab11aa9cf2b680f..0fc14b6d304c98e14c895e00a92f4cb9b8e013d0 100644 --- a/dev/tests/static/testsuite/Js/_files/whitelist/core.txt +++ b/dev/tests/static/testsuite/Js/_files/whitelist/core.txt @@ -8,3 +8,9 @@ app/code/core/Mage/Poll app/code/core/Mage/CatalogSearch app/code/core/Mage/Checkout app/code/core/Mage/Captcha +app/code/core/Mage/Customer +app/code/core/Mage/Downloadable +app/code/core/Mage/Persistent +app/code/core/Mage/Wishlist +app/code/core/Mage/Bundle +app/code/core/Mage/Adminhtml diff --git a/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php index e5053864435f54e0ca35efed2b2a1d9dd4e00f9f..b5116d51b4452bcda62012981bd7e78768c5ac30 100644 --- a/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php @@ -63,6 +63,8 @@ return array( $this->_getClassRule('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid'), $this->_getClassRule('Mage_Adminhtml_Block_Catalog_Search_Grid'), $this->_getClassRule('Mage_Adminhtml_Block_Newsletter_Problem_Grid'), + $this->_getClassRule('Mage_Adminhtml_Block_Newsletter_Queue_Grid'), + $this->_getClassRule('Mage_Adminhtml_Block_Newsletter_Queue'), $this->_getClassRule('Mage_Adminhtml_Block_Page_Menu', 'Mage_Backend_Block_Menu'), $this->_getClassRule('Mage_Adminhtml_Block_Permissions_User'), $this->_getClassRule('Mage_Adminhtml_Block_Permissions_User_Grid'), @@ -99,6 +101,9 @@ return array( $this->_getClassRule('Mage_Adminhtml_Block_Report_Product_Sold_Grid'), $this->_getClassRule('Mage_Adminhtml_Block_Report_Review_Customer_Grid'), $this->_getClassRule('Mage_Adminhtml_Block_Report_Review_Product_Grid'), + $this->_getClassRule('Mage_Adminhtml_Block_Report_Refresh_Statistics', + 'Mage_Reports_Block_Adminhtml_Refresh_Statistics'), + $this->_getClassRule('Mage_Adminhtml_Block_Report_Refresh_Statistics_Grid'), $this->_getClassRule('Mage_Adminhtml_Block_Report_Customer_Orders', 'Mage_Reports_Block_Adminhtml_Customer_Orders'), $this->_getClassRule('Mage_Adminhtml_Block_Report_Customer_Orders_Grid'), $this->_getClassRule('Mage_Adminhtml_Block_Report_Product_Ordered'), @@ -109,14 +114,11 @@ return array( $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form', 'Mage_Backend_Block_System_Config_Form'), $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Tabs', 'Mage_Backend_Block_System_Config_Tabs'), $this->_getClassRule('Mage_Adminhtml_Block_System_Config_System_Storage_Media_Synchronize', - 'Mage_Backend_Block_System_Config_System_Storage_Media_Synchronize' - ), + 'Mage_Backend_Block_System_Config_System_Storage_Media_Synchronize'), $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput', - 'Mage_Backend_Block_System_Config_Form_Fieldset_Modules_DisableOutput' - ), + 'Mage_Backend_Block_System_Config_Form_Fieldset_Modules_DisableOutput'), $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Regexceptions', - 'Mage_Backend_Block_System_Config_Form_Field_Regexceptions' - ), + 'Mage_Backend_Block_System_Config_Form_Field_Regexceptions'), $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Notification', 'Mage_Backend_Block_System_Config_Form_Field_Notification' ), @@ -158,8 +160,7 @@ return array( ), $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Fieldset_Order_Statuses', 'Mage_Sales_Block_Adminhtml_System_Config_Form_Fieldset_Order_Statuses' - ), - $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Dwstree', 'Mage_Backend_Block_System_Config_Dwstree'), + ), $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Dwstree', 'Mage_Backend_Block_System_Config_Dwstree'), $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Switcher', 'Mage_Backend_Block_System_Config_Switcher'), $this->_getClassRule('Mage_Adminhtml_Block_System_Design_Grid'), $this->_getClassRule('Mage_Adminhtml_Block_System_Email_Template_Grid'), @@ -583,8 +584,7 @@ return array( 'Mage_GoogleOptimizer_Adminhtml_Googleoptimizer_IndexController'), $this->_getClassRule('Mage_ImportExport_Model_Import_Adapter_Abstract', 'Mage_ImportExport_Model_Import_SourceAbstract'), - $this->_getClassRule('Mage_ImportExport_Model_Import_Adapter_Csv', - 'Mage_ImportExport_Model_Import_Source_Csv'), + $this->_getClassRule('Mage_ImportExport_Model_Import_Adapter_Csv', 'Mage_ImportExport_Model_Import_Source_Csv'), $this->_getClassRule('Mage_Ogone_Model_Api_Debug'), $this->_getClassRule('Mage_Ogone_Model_Resource_Api_Debug'), $this->_getClassRule('Mage_Page_Block_Html_Toplinks'), diff --git a/dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php index c14b6c26e478a4c2f775a788982ad140100e6325..82e82106bcf47373bec7325adf9397eb2bd5a39b 100644 --- a/dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php +++ b/dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php @@ -395,24 +395,24 @@ return array( $this->_getRule('getFileLayoutUpdatesXml', 'Mage_Core_Model_Layout_Update', 'Mage_Core_Model_Layout_Merge'), $this->_getRule('getContainers', 'Mage_Core_Model_Layout_Update', 'Mage_Core_Model_Layout_Merge'), $this->_getRule('getPostMaxSize', 'Mage_Adminhtml_Block_Media_Uploader', - 'Mage_Core_Helper_File_Storage::getPostMaxSize()'), + 'Magento_File_Size::getPostMaxSize()'), $this->_getRule('getUploadMaxSize', 'Mage_Adminhtml_Block_Media_Uploader', - 'Mage_Core_Helper_File_Storage::getUploadMaxSize()'), + 'Magento_File_Size::getUploadMaxSize()'), $this->_getRule('getDataMaxSize'), $this->_getRule('getDataMaxSizeInBytes', 'Mage_Adminhtml_Block_Media_Uploader', - 'Mage_Core_Helper_File_Storage::getMaxFileSize()'), + 'Magento_File_Size::getMaxFileSize()'), $this->_getRule('_getBytesIniValue', 'Mage_Catalog_Model_Product_Option_Type_File'), $this->_getRule('_getUploadMaxFilesize', 'Mage_Catalog_Model_Product_Option_Type_File'), $this->_getRule('_bytesToMbytes', 'Mage_Catalog_Model_Product_Option_Type_File'), $this->_getRule('getMaxUploadSize', 'Mage_ImportExport_Helper_Data', 'getMaxUploadSizeMessage'), $this->_getRule('prepareRedirect', 'Mage_Core_Controller_Varien_Exception'), $this->_getRule('getPostMaxSize', 'Mage_Adminhtml_Block_Media_Uploader', - 'Mage_Core_Helper_File_Storage::getPostMaxSize()'), + 'Magento_File_Size::getPostMaxSize()'), $this->_getRule('getUploadMaxSize', 'Mage_Adminhtml_Block_Media_Uploader', - 'Mage_Core_Helper_File_Storage::getUploadMaxSize()'), + 'Magento_File_Size::getUploadMaxSize()'), $this->_getRule('getDataMaxSize'), $this->_getRule('getDataMaxSizeInBytes', 'Mage_Adminhtml_Block_Media_Uploader', - 'Mage_Core_Helper_File_Storage::getMaxFileSize()'), + 'Magento_File_Size::getMaxFileSize()'), $this->_getRule('_getBytesIniValue', 'Mage_Catalog_Model_Product_Option_Type_File'), $this->_getRule('_getUploadMaxFilesize', 'Mage_Catalog_Model_Product_Option_Type_File'), $this->_getRule('_bytesToMbytes', 'Mage_Catalog_Model_Product_Option_Type_File'), diff --git a/dev/tests/static/testsuite/Php/Exemplar/CodeMessTest.php b/dev/tests/static/testsuite/Php/Exemplar/CodeMessTest.php index 5a41a8e64dd93d4dd614e9823537866884b33c52..1cf38a4ece3ddd93074c2181e81644a1dc454185 100644 --- a/dev/tests/static/testsuite/Php/Exemplar/CodeMessTest.php +++ b/dev/tests/static/testsuite/Php/Exemplar/CodeMessTest.php @@ -34,38 +34,49 @@ class Php_Exemplar_CodeMessTest extends PHPUnit_Framework_TestCase /** * @var Inspection_MessDetector_Command */ - protected static $_cmd = null; + protected static $_messDetector = null; + + /** + * Ruleset file + * + * @var string|null + */ + protected static $_rulesetFile = null; + + /** + * Report file + * + * @var string|null + */ + protected static $_reportFile = null; public static function setUpBeforeClass() { - $rulesetFile = realpath(__DIR__ . '/../_files/phpmd/ruleset.xml'); - $reportFile = __DIR__ . '/../../../tmp/phpmd_report.xml'; - self::$_cmd = new Inspection_MessDetector_Command($rulesetFile, $reportFile); + self::$_rulesetFile = realpath(__DIR__ . '/../_files/phpmd/ruleset.xml'); + self::$_reportFile = __DIR__ . '/../../../tmp/phpmd_report.xml'; + self::$_messDetector = new CodingStandard_Tool_CodeMessDetector(self::$_rulesetFile, self::$_reportFile); } protected function setUp() { - $reportFile = self::$_cmd->getReportFile(); - if (!is_dir(dirname($reportFile))) { - mkdir(dirname($reportFile), 0777); + if (!is_dir(dirname(self::$_reportFile))) { + mkdir(dirname(self::$_reportFile), 0777); } } protected function tearDown() { - $reportFile = self::$_cmd->getReportFile(); - if (file_exists($reportFile)) { - unlink($reportFile); + if (file_exists(self::$_reportFile)) { + unlink(self::$_reportFile); } - rmdir(dirname($reportFile)); + rmdir(dirname(self::$_reportFile)); } public function testRulesetFormat() { - $rulesetFile = self::$_cmd->getRulesetFile(); - $this->assertFileExists($rulesetFile); + $this->assertFileExists(self::$_rulesetFile); $doc = new DOMDocument(); - $doc->load($rulesetFile); + $doc->load(self::$_rulesetFile); libxml_use_internal_errors(true); $isValid = $doc->schemaValidate(__DIR__ . '/_files/phpmd_ruleset.xsd'); @@ -82,12 +93,7 @@ class Php_Exemplar_CodeMessTest extends PHPUnit_Framework_TestCase public function testPhpMdAvailability() { - $this->assertTrue(self::$_cmd->canRun(), 'PHP Mess Detector command is not available.'); - $minVersion = self::PHPMD_REQUIRED_VERSION; - $version = self::$_cmd->getVersion(); - $this->assertTrue(version_compare($version, $minVersion, '>='), - "PHP Mess Detector minimal required version is '{$minVersion}'. The current version is '{$version}'." - ); + $this->assertTrue(self::$_messDetector->canRun(), 'PHP Mess Detector command is not available.'); } /** @@ -99,11 +105,11 @@ class Php_Exemplar_CodeMessTest extends PHPUnit_Framework_TestCase */ public function testRuleViolation($inputFile, $expectedXpaths) { - $this->assertFalse(self::$_cmd->run( + $this->assertNotEquals(PHP_PMD_TextUI_Command::EXIT_SUCCESS, self::$_messDetector->run( array($inputFile)), "PHP Mess Detector has failed to identify problem at the erroneous file {$inputFile}" ); - $actualReportXml = simplexml_load_file(self::$_cmd->getReportFile()); + $actualReportXml = simplexml_load_file(self::$_reportFile); $expectedXpaths = (array)$expectedXpaths; foreach ($expectedXpaths as $expectedXpath) { $this->assertNotEmpty( diff --git a/dev/tests/static/testsuite/Php/Exemplar/CodeStyleTest.php b/dev/tests/static/testsuite/Php/Exemplar/CodeStyleTest.php index 4945796cc61adbe19b919715d725a5bbb78486f4..d868f37e8e7d37c8aa5b2d2e8e1f5db60b5077c0 100644 --- a/dev/tests/static/testsuite/Php/Exemplar/CodeStyleTest.php +++ b/dev/tests/static/testsuite/Php/Exemplar/CodeStyleTest.php @@ -39,27 +39,30 @@ class Php_Exemplar_CodeStyleTest extends PHPUnit_Framework_TestCase */ protected static $_cmd = null; + private static $_reportFile = null; + public static function setUpBeforeClass() { - $reportFile = __DIR__ . '/../../../tmp/phpcs_report.xml'; - self::$_cmd = new Inspection_CodeSniffer_Command(realpath(__DIR__ . '/../_files/phpcs'), $reportFile); + self::$_reportFile = __DIR__ . '/../../../tmp/phpcs_report.xml'; + $wrapper = new CodingStandard_Tool_CodeSniffer_Wrapper(); + self::$_cmd = new CodingStandard_Tool_CodeSniffer( + realpath(__DIR__ . '/../_files/phpcs'), self::$_reportFile, $wrapper + ); } protected function setUp() { - $reportFile = self::$_cmd->getReportFile(); - if (!is_dir(dirname($reportFile))) { - mkdir(dirname($reportFile), 0777); + if (!is_dir(dirname(self::$_reportFile))) { + mkdir(dirname(self::$_reportFile), 0777); } } protected function tearDown() { - $reportFile = self::$_cmd->getReportFile(); - if (file_exists($reportFile)) { - unlink($reportFile); + if (file_exists(self::$_reportFile)) { + unlink(self::$_reportFile); } - rmdir(dirname($reportFile)); + rmdir(dirname(self::$_reportFile)); } public function testPhpCsAvailability() @@ -92,7 +95,7 @@ class Php_Exemplar_CodeStyleTest extends PHPUnit_Framework_TestCase } self::$_cmd->run(array($inputFile)); - $resultXml = simplexml_load_file(self::$_cmd->getReportFile()); + $resultXml = simplexml_load_file(self::$_reportFile); $this->_assertTotalErrorsAndWarnings($resultXml, $expectedXml); $this->_assertErrors($resultXml, $expectedXml); $this->_assertWarnings($resultXml, $expectedXml); diff --git a/dev/tests/static/testsuite/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Php/LiveCodeTest.php index a34e883a20f78a89f1bbb07e0be8004547571df5..5176569fb7f6909c71b1bfd00719ee217d370249 100644 --- a/dev/tests/static/testsuite/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Php/LiveCodeTest.php @@ -71,21 +71,37 @@ class Php_LiveCodeTest extends PHPUnit_Framework_TestCase public function testCodeMess() { $reportFile = self::$_reportDir . '/phpmd_report.xml'; - $cmd = new Inspection_MessDetector_Command(realpath(__DIR__ . '/_files/phpmd/ruleset.xml'), $reportFile); - if (!$cmd->canRun()) { - $this->markTestSkipped('PHP Mess Detector command line is not available.'); + $codeMessDetector = new CodingStandard_Tool_CodeMessDetector(realpath(__DIR__ . '/_files/phpmd/ruleset.xml'), + $reportFile + ); + + if (!$codeMessDetector->canRun()) { + $this->markTestSkipped('PHP Mess Detector is not available.'); } - $this->assertTrue($cmd->run(self::$_whiteList, self::$_blackList), $cmd->getLastRunMessage()); + + $this->assertEquals( + PHP_PMD_TextUI_Command::EXIT_SUCCESS, $codeMessDetector->run(self::$_whiteList, self::$_blackList), + "PHP Code Mess has found error(s): See detailed report in $reportFile" + ); } public function testCopyPaste() { $reportFile = self::$_reportDir . '/phpcpd_report.xml'; - $cmd = new Inspection_CopyPasteDetector_Command($reportFile); - if (!$cmd->canRun()) { - $this->markTestSkipped('PHP Copy/Paste Detector command line is not available.'); + $copyPasteDetector = new CodingStandard_Tool_CopyPasteDetector($reportFile); + + if (!$copyPasteDetector->canRun()) { + $this->markTestSkipped('PHP Copy/Paste Detector is not available.'); } - $this->assertTrue($cmd->run(self::$_whiteList, self::$_blackList), $cmd->getLastRunMessage()); + + $blackList = array(); + foreach (glob(__DIR__ . '/_files/phpcpd/blacklist/*.txt') as $list) { + $blackList = array_merge($blackList, file($list, FILE_IGNORE_NEW_LINES)); + } + + $this->assertTrue($copyPasteDetector->run(array(), $blackList), + "PHP Code Mess has found error(s): See detailed report in $reportFile" + ); } /** diff --git a/dev/tests/static/testsuite/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Php/_files/blacklist/common.txt index 3758d42598015f016606146e9e278ae7abb8224a..0002d2b805f91abcba7d528104a50c40fb2b1fc8 100644 --- a/dev/tests/static/testsuite/Php/_files/blacklist/common.txt +++ b/dev/tests/static/testsuite/Php/_files/blacklist/common.txt @@ -24,4 +24,4 @@ dev/tests/integration/testsuite/Mage/Core/Block/_files dev/tests/integration/tmp dev/tests/static/testsuite/Php/Exemplar/_files/phpcs/input dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/input -app/code/core/Mage/Backend/view +app/code/core/Mage/Backend/view \ No newline at end of file diff --git a/dev/tests/static/testsuite/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Php/_files/phpcpd/blacklist/common.txt new file mode 100644 index 0000000000000000000000000000000000000000..2a4d791afd8f4cf48e634118bd7ef402f0163850 --- /dev/null +++ b/dev/tests/static/testsuite/Php/_files/phpcpd/blacklist/common.txt @@ -0,0 +1,78 @@ +Find/Feed/Block/Adminhtml +Mage/Adminhtml +Mage/Backend +Mage/Bundle +Mage/Catalog/Block/Product/List +Mage/Catalog/Model/Category/Attribute/Source +Mage/Catalog/Model/Product +Mage/Catalog/Model/Category/Attribute/Source +Zend +downloader +dev +Mysql +lib/Varien/Db +sql +data +Mage/Paypal +Mage/Paygate +Mage/Downloadable +Mage/Core/Model/Resource/Helper +Mage/Catalog/Model/Resource/Product/Indexer +Mage/CatalogInventory/Model/Resource/Indexer/Stock +Mage/Sales/Model/Order +Mage/CatalogInventory/Model/Source +Mage/CatalogSearch/Model/Resource/Helper +Mage/Centinel/controllers +Mage/Centinel/Model/State +Mage/Checkout/Block/Multishipping/Payment +Mage/Checkout/Model/Type +Mage/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab +Mage/Catalog/Model/Template +Mage/Oauth/controllers +Mage/Sales/Block/Order +Mage/Sales/Model/Resource/Helper +Mage/Sales/Model/Resource/Order +Mage/Tag/Block +Mage/Tag/Model/Resource +Mage/Catalog/Model/Resource/Product +Mage/Core/Model/Store +Mage/Cron/Model/Config/Backend/Product +Mage/DesignEditor/Block/Adminhtml/Theme/Selector/Tab +Mage/DesignEditor/Model/Url +Mage/GiftMessage/Block/Adminhtml/Sales/Order +Mage/ImportExport/Model +Mage/Index/Model/Process +Mage/Install/Block/Db +Mage/Payment/Block/Form +Mage/Payment/Model/Method +Mage/Payment/Model/Config +Mage/ProductAlert/Model +Mage/Reports/Block/Product/Widget +Mage/Reports/Model/Resource/Helper +Mage/Reports/Model/Resource +Mage/Review/Block +Mage/Rss/Block/Catalog +Mage/Rule +Mage/Sales/Block/Adminhtml +Mage/Sales/Model/Resource +Mage/Sales/Model/Quote/Address/Total +Mage/Sales/Model/Resource/Report/Order +Mage/CatalogRule/Model +Mage/Tax/Model/Sales/Pdf +Mage/Usa/Model/Shipping/Carrier +Mage/Webapi/Model +Mage/Wishlist/Model +lib/Mage/Archive +lib/Mage/Connect/Channel +lib/Mage/HTTP/Client +lib/Magento/Acl +lib/PEAR +lib/phpseclib +lib/Varien/Convert +Mage/Cron/Model +Mage/SalesRule/Model/Resource/Report/Rule +Mage/SalesRule/Model/Quote/Nominal +Mage/Connect/Block/Adminhtml/Extension/Custom/Edit +Mage/Tax/Model/Sales/Total/Quote/Nominal +Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit +Mage/User/Block/User/Edit diff --git a/dev/tests/unit/framework/Magento/Test/Helper/ObjectManager.php b/dev/tests/unit/framework/Magento/Test/Helper/ObjectManager.php index ca8c1b50e86e1ae3337d242774a9047f5b4c2943..c6f027fc61ced7d3d08fa473be3fa99b04e2f107 100644 --- a/dev/tests/unit/framework/Magento/Test/Helper/ObjectManager.php +++ b/dev/tests/unit/framework/Magento/Test/Helper/ObjectManager.php @@ -59,13 +59,15 @@ class Magento_Test_Helper_ObjectManager 'session' => 'Mage_Core_Model_Session', 'storeConfig' => 'Mage_Core_Model_Store_Config', 'frontController' => 'Mage_Core_Controller_Varien_Front', - 'helperFactory' => 'Mage_Core_Model_Factory_Helper' + 'helperFactory' => 'Mage_Core_Model_Factory_Helper', + 'filesystem' => 'Magento_Filesystem', ), self::MODEL_ENTITY => array( 'eventDispatcher' => 'Mage_Core_Model_Event_Manager', 'cacheManager' => 'Mage_Core_Model_Cache', 'resource' => '_getResourceModelMock', 'resourceCollection' => 'Varien_Data_Collection_Db', + 'filesystem' => 'Magento_Filesystem', ) ); diff --git a/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImageTest.php b/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImageTest.php index c36ce5c4ed68f43417073d069ffc6bddf902945d..b389a541c0e778ba97a47fa0ec9a6910263244b4 100644 --- a/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImageTest.php +++ b/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImageTest.php @@ -28,104 +28,96 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImageTest extends PHPUnit_Framework_TestCase { /** + * Object under test + * * @var Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage */ - protected $_model; + protected $_block; /** - * @var Mage_Adminhtml_Model_Url + * @var Mage_Backend_Model_Url|PHPUnit_Framework_MockObject_MockObject */ protected $_url; /** - * @var Mage_Core_Model_Design_Package - */ - protected $_design; - - /** - * @var Mage_Catalog_Model_Product_Media_Config + * @var Mage_Core_Helper_Data|PHPUnit_Framework_MockObject_MockObject */ - protected $_mediaConfig; + protected $_coreHelper; /** - * @var Mage_Core_Helper_Data + * @var Mage_Catalog_Helper_Data|PHPUnit_Framework_MockObject_MockObject */ - protected $_helperData; + protected $_catalogHelperData; protected function setUp() { - $mediaUploader = $this->getMockBuilder('Mage_Adminhtml_Block_Media_Uploader') - ->disableOriginalConstructor() - ->setMethods(array('getDataMaxSizeInBytes')) - ->getMock(); - $this->_url = $this->getMockBuilder('Mage_Adminhtml_Model_Url') - ->disableOriginalConstructor() - ->setMethods(array('getUrl')) - ->getMock(); - $this->_mediaConfig = $this->getMockBuilder('Mage_Catalog_Model_Product_Media_Config') - ->disableOriginalConstructor() - ->setMethods(array('getMediaUrl', 'getTmpMediaUrl')) - ->getMock(); - $this->_design = $this->getMockBuilder('Mage_Core_Model_Design_Package') - ->disableOriginalConstructor() - ->setMethods(array('getViewFileUrl')) - ->getMock(); - $this->_helperData = $this->getMockBuilder('Mage_Core_Helper_Data') - ->disableOriginalConstructor() - ->setMethods(array('escapeHtml', 'jsonEncode')) - ->getMock(); - $form = $this->getMockBuilder('Varien_Data_Form') - ->disableOriginalConstructor() - ->getMock(); + $mediaUploader = $this->getMockBuilder('Mage_Adminhtml_Block_Media_Uploader')->disableOriginalConstructor() + ->setMethods(array('getDataMaxSizeInBytes'))->getMock(); + $mediaUploader->expects($this->once())->method('getDataMaxSizeInBytes')->will($this->returnValue('999')); + $this->_url = $this->getMock('Mage_Backend_Model_Url', array('getUrl'), array(), '', false); + $this->_url->expects($this->once())->method('getUrl') + ->will($this->returnValue('http://example.com/pub/images/catalog_product_gallery/upload/')); + + $jsonEncode = function ($value) { + return json_encode($value); + }; + + $this->_coreHelper = $this->getMockBuilder('Mage_Core_Helper_Data')->disableOriginalConstructor() + ->setMethods(array('escapeHtml', 'jsonEncode'))->getMock(); + $this->_coreHelper->expects($this->any())->method('jsonEncode')->will($this->returnCallback($jsonEncode)); + $this->_catalogHelperData = $this->getMockBuilder('Mage_Catalog_Helper_Data')->disableOriginalConstructor() + ->setMethods(array('__'))->getMock(); + $this->_catalogHelperData->expects($this->any())->method('__')->will($this->returnCallback('json_encode')); + $form = $this->getMockBuilder('Varien_Data_Form')->disableOriginalConstructor() + ->setMethods(null)->getMock(); + $product = $this->getMockBuilder('Mage_Catalog_Model_Product')->disableOriginalConstructor() + ->setMethods(array('getMediaGalleryImages'))->getMock(); + $form->setDataObject($product); - $attributes = array( + $this->_block = new Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage(array( 'name' => 'image', - 'label' => "Base Image", + 'label' => 'Base Image', 'mediaUploader' => $mediaUploader, 'url' => $this->_url, - 'mediaConfig' => $this->_mediaConfig, - 'design' => $this->_design, - 'helperData' => $this->_helperData - ); - - $mediaUploader->expects($this->once())->method('getDataMaxSizeInBytes')->will($this->returnValue('999')); - $this->_model = new Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImage($attributes); - $this->_model->setForm($form); - $this->_model->setHtmlId('image'); - $this->_url->expects($this->once())->method('getUrl') - ->will($this->returnValue('http://example.com/pub/images/catalog_product_gallery/upload/')); - $this->_helperData->expects($this->any())->method('jsonEncode')->will($this->returnArgument(0)); + 'coreHelper' => $this->_coreHelper, + 'catalogHelperData' => $this->_catalogHelperData, + )); + $this->_block->setForm($form); + $this->_block->setHtmlId('image'); } /** * Test to get valid html code for 'image' attribute * * @param mixed $imageValue - * @param string $methodName * @param string $urlPath * @dataProvider validateImageUrlDataProvider */ - public function testGetElementHtml($imageValue, $methodName, $urlPath) + public function testGetElementHtml($imageValue, $urlPath) { - $this->_model->setValue($imageValue); - $this->_helperData->expects($this->any())->method('escapeHtml')->will($this->returnArgument(0)); - $this->_mediaConfig->expects($this->once())->method($methodName)->will($this->returnValue($urlPath)); + $this->_block->setValue($imageValue); + $this->_coreHelper->expects($this->any())->method('escapeHtml')->will($this->returnArgument(0)); $html = $this->_createHtmlCode($imageValue, $urlPath); - $this->assertXmlStringEqualsXmlString("<test>{$html}</test>", "<test>{$this->_model->getElementHtml()}</test>", - 'Another BaseImage html code is expected'); + + $this->assertXmlStringEqualsXmlString( + str_replace('×', '&times;', "<test>{$html}</test>"), + str_replace('×', '&times;', "<test>{$this->_block->getElementHtml()}</test>"), + 'Another BaseImage html code is expected' + ); } + /** + * @return array + */ public function validateImageUrlDataProvider() { return array( array( '/f/i/file_666.png', - 'getMediaUrl', 'http://example.com/pub/media/tmp/catalog/product/f/i/file_78.png' ), array( '/f/i/file_666.png.tmp', - 'getTmpMediaUrl', 'http://example.com/pub/images/image-placeholder.png' ) ); @@ -137,12 +129,14 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImageTest extends PHP public function testImagePlaceholder() { $urlPath = 'http://example.com/pub/images/image-placeholder.png'; - $this->_model->setValue(null); - $this->_design->expects($this->once())->method('getViewFileUrl')->will($this->returnValue($urlPath)); - $this->_helperData->expects($this->any())->method('escapeHtml')->will($this->returnArgument(0)); + $this->_block->setValue(null); + $this->_coreHelper->expects($this->any())->method('escapeHtml')->will($this->returnArgument(0)); $html = $this->_createHtmlCode('', $urlPath); - $this->assertXmlStringEqualsXmlString("<test>{$html}</test>", "<test>{$this->_model->getElementHtml()}</test>", - 'Another BaseImage html code is expected'); + $this->assertXmlStringEqualsXmlString( + str_replace('×', '&times;', "<test>{$html}</test>"), + str_replace('×', '&times;', "<test>{$this->_block->getElementHtml()}</test>"), + 'Another BaseImage html code is expected' + ); } /** @@ -155,12 +149,11 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_BaseImageTest extends PHP */ protected function _createHtmlCode($imageValue, $urlPath) { - $html = file_get_contents(__DIR__ . '/_files/BaseImageHtml.txt'); - $html = str_replace('%htmlId%', $this->_model->getHtmlId(), $html); - $html = str_replace('%imageValue%', $imageValue, $html); - $html = str_replace('%uploadImage%', 'http://example.com/pub/images/catalog_product_gallery/upload/', $html); - $html = str_replace('%imageUrl%', $urlPath, $html); - - return $html; + $uploadImage = 'http://example.com/pub/images/catalog_product_gallery/upload/'; + return str_replace( + array('%htmlId%', '%imageValue%', '%uploadImage%', '%imageUrl%'), + array($this->_block->getHtmlId(), $imageValue, $uploadImage, $urlPath), + file_get_contents(__DIR__ . '/_files/BaseImageHtml.txt') + ); } } diff --git a/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/_files/BaseImageHtml.txt b/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/_files/BaseImageHtml.txt index 232024baaae45ea9b8e37a9fac1ec0bf92d3bcb5..1264294877f7a504a57d2bf931f65628fcfa736b 100644 --- a/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/_files/BaseImageHtml.txt +++ b/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/_files/BaseImageHtml.txt @@ -1,4 +1,16 @@ -<input id="%htmlId%_upload" type="file" name="image" data-url="%uploadImage%" style="display: none;" /> -<input id="%htmlId%" name="%htmlId%" data-ui-id="form-element-%htmlId%" value="%imageValue%" type="hidden"/> -<img align="left" src="%imageUrl%" id="%htmlId%_image" title="%imageUrl%" alt="%imageUrl%" class="base-image-uploader" onclick="jQuery('#%htmlId%_upload').trigger('click')"/> -<script>/* <![CDATA[ */jQuery(function(){BaseImageUploader(%htmlId%, 999); });/*]]>*/</script> +<input id="%htmlId%-upload" type="file" name="image" data-url="%uploadImage%" style="display:none" /> +<input id="%htmlId%" type="hidden" name="%htmlId%" /> +<div id="%htmlId%-container" data-main="%imageValue%" data-images="[]"> + <span id="%htmlId%-upload-placeholder"></span> + <script id="%htmlId%-template" type="text/x-jquery-tmpl"> + <span class="container"> + <span class="main-sticker">"Main"</span> + <span class="close">&times;</span> + <img class="base-image-uploader" src="${url}" data-position="${position}" alt="${label}" /> + <div class="drag-zone"> + <button class="make-main" type="button">"Make Main"</button> + </div> + </span> + </script> +</div> +<script>/* <![CDATA[ */jQuery(function(){BaseImageUploader("%htmlId%", "999"); });/*]]>*/</script> diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/FormTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/FormTest.php index 29401e7b444b3483ab52375fafcc65be3ff57a25..5c20de43cee4c3e419e9f32859f83888e7c2be73 100644 --- a/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/FormTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/FormTest.php @@ -61,7 +61,12 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa * @var PHPUnit_Framework_MockObject_MockObject */ protected $_backendConfigMock; - + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_coreConfigMock; + /** * @var PHPUnit_Framework_MockObject_MockObject */ @@ -105,7 +110,7 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa $this->_fieldFactoryMock = $this->getMock('Mage_Backend_Block_System_Config_Form_Field_Factory', array(), array(), '', false, false ); - $coreConfigMock = $this->getMock('Mage_Core_Model_Config', + $this->_coreConfigMock = $this->getMock('Mage_Core_Model_Config', array(), array(), '', false, false ); @@ -133,7 +138,7 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa 'cloneModelFactory' => $cloneFactoryMock, 'fieldsetFactory' => $this->_fieldsetFactoryMock, 'fieldFactory' => $this->_fieldFactoryMock, - 'coreConfig' => $coreConfigMock, + 'coreConfig' => $this->_coreConfigMock, ); $helper = new Magento_Test_Helper_ObjectManager($this); @@ -212,7 +217,10 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa $this->_object->initForm(); } - public function testInitFields() + /** + * @dataProvider initFieldsDataProvider + */ + public function testInitFields($backendConfigValue, $xmlConfig, $configPath, $inherit, $expectedValue) { // Parameters initialization $fieldsetMock = $this->getMock('Varien_Data_Form_Element_Fieldset', array(), array(), '', false, false); @@ -234,15 +242,18 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa $this->_backendConfigMock->expects($this->once())->method('extendConfig') ->with('some/config/path', false, array('section1/group1/field1' => 'some_value')) - ->will($this->returnArgument(2)); + ->will($this->returnValue($backendConfigValue)); + + $this->_coreConfigMock->expects($this->any())->method('getNode')->will($this->returnValue($xmlConfig)); - // Field mock configuration $fieldMock = $this->getMock('Mage_Backend_Model_Config_Structure_Element_Field', array(), array(), '', false, false ); $fieldMock->expects($this->any())->method('getPath') ->will($this->returnValue('section1/group1/field1')); + $fieldMock->expects($this->any())->method('getConfigPath') + ->will($this->returnValue($configPath)); $fieldMock->expects($this->any())->method('getGroupPath')->will($this->returnValue('some/config/path')); $fieldMock->expects($this->once())->method('getSectionId')->will($this->returnValue('some_section')); @@ -275,8 +286,8 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa 'comment' => 'comment', 'tooltip' => 'tooltip', 'hint' => 'hint', - 'value' => 'some_value', - 'inherit' => false, + 'value' => $expectedValue, + 'inherit' => $inherit, 'class' => 'frontClass', 'field_config' => 'fieldData', 'scope' => 'stores', @@ -296,4 +307,25 @@ class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCa $this->_object->initFields($fieldsetMock, $groupMock, $sectionMock, $fieldPrefix, $labelPrefix); } + + /** + * @return array + */ + public function initFieldsDataProvider() + { + $xmlConfig = new Mage_Core_Model_Config_Element(' + <default> + <some> + <config> + <path>Config Value</path> + </config> + </some> + </default> + '); + + return array( + array(array('section1/group1/field1' => 'some_value'), false, null, false, 'some_value'), + array(array(), $xmlConfig, 'some/config/path', true, $xmlConfig->descend('some/config/path')), + ); + } } diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/ButtonTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/ButtonTest.php index 6c58b8e765c7548b754dd28b45a83a19189a832c..2374325752e56f8a6430ace3cc9f72901119e56f 100644 --- a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/ButtonTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/ButtonTest.php @@ -57,10 +57,21 @@ class Mage_Backend_Block_Widget_ButtonTest extends PHPUnit_Framework_TestCase ->method('helper') ->will($this->returnValue($this->_helperMock)); + $coreHelperMock = $this->getMockBuilder('Mage_Core_Helper_Data')->disableOriginalConstructor()->getMock(); + + $helperFactoryMock = $this->getMockBuilder('Mage_Core_Model_Factory_Helper') + ->disableOriginalConstructor()->getMock(); + + $helperFactoryMock->expects($this->any()) + ->method('get') + ->with('Mage_Core_Helper_Data') + ->will($this->returnValue($coreHelperMock)); + $arguments = array( 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false), - 'layout' => $this->_layoutMock + 'layout' => $this->_layoutMock, + 'helperFactory' => $helperFactoryMock ); $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); @@ -91,28 +102,34 @@ class Mage_Backend_Block_Widget_ButtonTest extends PHPUnit_Framework_TestCase return array( array( array( - 'data_attr' => array( - 'widget-button' => array('someKey' => 'someValue'), + 'data_attribute' => array( + 'validation' => array( + 'required' => true + ), ), ), - '/data-widget-button="[^"]*" /' + '/data-validation="[^"]*" /' ), array( array( - 'data_attr' => array( - 'mage-init' => array('someKey' => 'someValue'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('someKey' => 'someValue') + ), ), ), '/data-mage-init="[^"]*" /' ), array( array( - 'data_attr' => array( - 'mage-init' => array('someKey' => 'someValue'), - 'widget-button' => array('someKey' => 'someValue'), + 'data_attribute' => array( + 'mage-init' => array( + 'button' => array('someKey' => 'someValue') + ), + 'validation' => array('required' => true), ), ), - '/data-mage-init="[^"]*" data-widget-button="[^"]*" /' + '/data-mage-init="[^"]*" data-validation="[^"]*" /' ), ); } diff --git a/dev/tests/unit/testsuite/Mage/Bundle/Model/Product/TypeTest.php b/dev/tests/unit/testsuite/Mage/Bundle/Model/Product/TypeTest.php index 9c51b94a022d973261d8f3f125ed1d84f8a183ee..0642543344288704ee87eacc540fefee4e1bdbed 100644 --- a/dev/tests/unit/testsuite/Mage/Bundle/Model/Product/TypeTest.php +++ b/dev/tests/unit/testsuite/Mage/Bundle/Model/Product/TypeTest.php @@ -34,7 +34,8 @@ class Mage_Bundle_Model_Product_TypeTest extends PHPUnit_Framework_TestCase protected function setUp() { - $this->_model = new Mage_Bundle_Model_Product_Type(); + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $this->_model = new Mage_Bundle_Model_Product_Type($filesystem); } public function testHasWeightTrue() diff --git a/dev/tests/unit/testsuite/Mage/Captcha/Helper/DataTest.php b/dev/tests/unit/testsuite/Mage/Captcha/Helper/DataTest.php index 6d43bea03a6ec43bfd7b1821a6b988619c0a69e2..2342464b7549cb71a7c3435910bdb59bbb6b4854 100644 --- a/dev/tests/unit/testsuite/Mage/Captcha/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Mage/Captcha/Helper/DataTest.php @@ -27,21 +27,28 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase { - /** - * @var Mage_Captcha_Helper_Data - */ - protected $_object; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ - protected function setUp() + protected function _getHelper($store, $config) { - $this->_object = new Mage_Captcha_Helper_Data(); - $this->_object->setConfig($this->_getConfigStub()); - $this->_object->setWebsite($this->_getWebsiteStub()); - $this->_object->setStore($this->_getStoreStub()); + $app = $this->getMockBuilder('Mage_Core_Model_App') + ->disableOriginalConstructor() + ->getMock(); + $app->expects($this->any()) + ->method('getWebsite') + ->will($this->returnValue($this->_getWebsiteStub())); + $app->expects($this->any()) + ->method('getStore') + ->will($this->returnValue($store)); + $adapterMock = $this->getMockBuilder('Magento_Filesystem_Adapter_Local') + ->getMock(); + $adapterMock->expects($this->any()) + ->method('isDirectory') + ->will($this->returnValue(true)); + $filesystem = new Magento_Filesystem($adapterMock); + return new Mage_Captcha_Helper_Data($app, $config, $filesystem); } /** @@ -56,22 +63,17 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase $store->expects($this->once()) ->method('getConfig') - ->with('customer/captcha/type', null) + ->with('customer/captcha/type') ->will($this->returnValue('zend')); - $this->_object->setStore($store); $config = $this->_getConfigStub(); $config->expects($this->once()) ->method('getModelInstance') - ->with('Mage_Captcha_Model_Zend', - array( - 'params' => array('formId' => 'user_create', 'helper' => $this->_object) - ) - ) + ->with('Mage_Captcha_Model_Zend') ->will($this->returnValue(new Mage_Captcha_Model_Zend(array('formId' => 'user_create')))); - $this->_object->setConfig($config); - $this->assertInstanceOf('Mage_Captcha_Model_Zend', $this->_object->getCaptcha('user_create')); + $helper = $this->_getHelper($store, $config); + $this->assertInstanceOf('Mage_Captcha_Model_Zend', $helper->getCaptcha('user_create')); } /** @@ -86,10 +88,10 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase $store->expects($this->once()) ->method('getConfig') - ->with('customer/captcha/enable', null) + ->with('customer/captcha/enable') ->will($this->returnValue('1')); - $this->_object->setStore($store); - $this->_object->getConfigNode('enable'); + $object = $this->_getHelper($store, $this->_getConfigStub()); + $object->getConfigNode('enable'); } /** @@ -101,9 +103,13 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase $option->expects($this->any()) ->method('getDir') ->will($this->returnValue(TESTS_TEMP_DIR)); - $this->_object->setOption($option); + $config = $this->_getConfigStub(); + $config->expects($this->any()) + ->method('getOptions') + ->will($this->returnValue($option)); - $fonts = $this->_object->getFonts(); + $object = $this->_getHelper($this->_getStoreStub(), $config); + $fonts = $object->getFonts(); $this->assertEquals($fonts['linlibertine']['label'], 'LinLibertine'); $this->assertEquals( @@ -123,11 +129,16 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase $option->expects($this->once()) ->method('getDir') ->will($this->returnValue($captchaTmpDir)); - $this->_object->setOption($option); + $config = $this->_getConfigStub(); + $config->expects($this->any()) + ->method('getOptions') + ->will($this->returnValue($option)); + $object = $this->_getHelper($this->_getStoreStub(), $config); $this->assertEquals( - $this->_object->getImgDir(), - $captchaTmpDir . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'base' . DIRECTORY_SEPARATOR + $object->getImgDir(), + Magento_Filesystem::getPathFromArray(array($captchaTmpDir, 'captcha', 'base')) + . Magento_Filesystem::DIRECTORY_SEPARATOR ); } @@ -137,18 +148,20 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase */ public function testGetImgUrl() { - $this->assertEquals($this->_object->getImgUrl(), 'http://localhost/pub/media/captcha/base/'); + $object = $this->_getHelper($this->_getStoreStub(), $this->_getConfigStub()); + $this->assertEquals($object->getImgUrl(), 'http://localhost/pub/media/captcha/base/'); } /** * Create Config Stub + * * @return Mage_Core_Model_Config */ protected function _getConfigStub() { $config = $this->getMock( 'Mage_Core_Model_Config', - array('getNode', 'getModelInstance'), + array('getNode', 'getModelInstance', 'getOptions'), array(), '', false ); @@ -162,6 +175,7 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase /** * Create option stub + * * @return Mage_Core_Model_Config_Options */ protected function _getOptionStub() @@ -176,6 +190,7 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase /** * Create Website Stub + * * @return Mage_Core_Model_Website */ protected function _getWebsiteStub() @@ -195,6 +210,7 @@ class Mage_Captcha_Helper_DataTest extends PHPUnit_Framework_TestCase /** * Create store stub + * * @return Mage_Core_Model_Store */ protected function _getStoreStub() diff --git a/dev/tests/unit/testsuite/Mage/Captcha/Model/ZendTest.php b/dev/tests/unit/testsuite/Mage/Captcha/Model/ZendTest.php index d11d7f1703297e998b282ce74d5a68ae9a7a2298..009d906738b0ace2b47f61cdff011fe4f5206c32 100644 --- a/dev/tests/unit/testsuite/Mage/Captcha/Model/ZendTest.php +++ b/dev/tests/unit/testsuite/Mage/Captcha/Model/ZendTest.php @@ -231,10 +231,10 @@ class Mage_Captcha_Model_ZendTest extends PHPUnit_Framework_TestCase */ protected function _getHelperStub() { - $helper = $this->getMock( - 'Mage_Captcha_Helper_Data', - array('getConfigNode', 'getFonts', '_getWebsiteCode', 'getImgUrl') - ); + $helper = $this->getMockBuilder('Mage_Captcha_Helper_Data') + ->disableOriginalConstructor() + ->setMethods(array('getConfigNode', 'getFonts', '_getWebsiteCode', 'getImgUrl')) + ->getMock(); $helper->expects($this->any()) ->method('getConfigNode') diff --git a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/MediaTest.php b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/MediaTest.php index 131cbc64346f59825ca4581550c6e1a6c7beb439..fef92dcda2d700b1a048dfccca4c2dac96539b3e 100644 --- a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/MediaTest.php +++ b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/MediaTest.php @@ -39,9 +39,11 @@ class Mage_Catalog_Model_Product_Attribute_Backend_MediaTest extends PHPUnit_Fra ->method('getMainTable') ->will($this->returnValue('table')); - $this->_model = new Mage_Catalog_Model_Product_Attribute_Backend_Media(array( - 'resourceModel' => $resource - )); + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $this->_model = new Mage_Catalog_Model_Product_Attribute_Backend_Media( + $filesystem, + array('resourceModel' => $resource) + ); } public function testGetAffectedFields() diff --git a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/ConfigurableTest.php b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/ConfigurableTest.php index e9ac9616fab91cacba279a0349fe0b4926049093..6bbe7a3a2c52df07ee8bccddf10c54d1bd6273d7 100644 --- a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/ConfigurableTest.php +++ b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/ConfigurableTest.php @@ -34,7 +34,8 @@ class Mage_Catalog_Model_Product_Type_ConfigurableTest extends PHPUnit_Framework protected function setUp() { - $this->_model = new Mage_Catalog_Model_Product_Type_Configurable(); + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $this->_model = new Mage_Catalog_Model_Product_Type_Configurable($filesystem); } public function testHasWeightFalse() diff --git a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/GroupedTest.php b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/GroupedTest.php index 9804f365df9fc9e4e276600c7e9df9b03afe170c..61adac77b2c063ccc3e9757b2926638b1b90422c 100644 --- a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/GroupedTest.php +++ b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/GroupedTest.php @@ -34,7 +34,8 @@ class Mage_Catalog_Model_Product_Type_GroupedTest extends PHPUnit_Framework_Test protected function setUp() { - $this->_model = new Mage_Catalog_Model_Product_Type_Grouped(); + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $this->_model = new Mage_Catalog_Model_Product_Type_Grouped($filesystem); } public function testHasWeightFalse() diff --git a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/SimpleTest.php b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/SimpleTest.php index 717350f5e7b4202be7633654e288a5913648fb3d..64ebe510363e53edb9b609d95f6cc93761922d49 100644 --- a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/SimpleTest.php +++ b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/SimpleTest.php @@ -34,7 +34,8 @@ class Mage_Catalog_Model_Product_Type_SimpleTest extends PHPUnit_Framework_TestC protected function setUp() { - $this->_model = new Mage_Catalog_Model_Product_Type_Simple(); + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $this->_model = new Mage_Catalog_Model_Product_Type_Simple($filesystem); } public function testHasWeightTrue() diff --git a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/VirtualTest.php b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/VirtualTest.php index 6fd964f44208ec3c7ef6c01373f621ebc80363ae..1e623e8f2daa1e181e7e740a30533c6982f78f3f 100644 --- a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/VirtualTest.php +++ b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Type/VirtualTest.php @@ -34,7 +34,8 @@ class Mage_Catalog_Model_Product_Type_VirtualTest extends PHPUnit_Framework_Test protected function setUp() { - $this->_model = new Mage_Catalog_Model_Product_Type_Virtual(); + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $this->_model = new Mage_Catalog_Model_Product_Type_Virtual($filesystem); } public function testHasWeightFalse() diff --git a/dev/tests/unit/testsuite/Mage/Checkout/Block/Cart/Item/RendererTest.php b/dev/tests/unit/testsuite/Mage/Checkout/Block/Cart/Item/RendererTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8a26d8e5bd071c8af16213fc8ac7c2a7e107f1de --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Checkout/Block/Cart/Item/RendererTest.php @@ -0,0 +1,71 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_Checkout + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Mage_Checkout_Block_Cart_Item_RendererTest extends PHPUnit_Framework_TestCase +{ + public function testGetProductThumbnailUrlForConfigurable() + { + $url = 'pub/media/catalog/product/cache/1/thumbnail/75x/9df78eab33525d08d6e5fb8d27136e95/_/_/__green.gif'; + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + + $configView = $this->getMock('Magento_Config_View', array('getVarValue'), array(), '', false); + $configView->expects($this->any())->method('getVarValue')->will($this->returnValue(75)); + + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $designPackage = $this->getMock('Mage_Core_Model_Design_Package', array('getViewConfig'), array($filesystem)); + $designPackage->expects($this->any())->method('getViewConfig')->will($this->returnValue($configView)); + + $configurable = $objectManagerHelper->getBlock('Mage_Checkout_Block_Cart_Item_Renderer_Configurable', + array('designPackage' => $designPackage)); + + $product = $this->getMock('Mage_Catalog_Model_Product', array('isConfigurable'), array(), '', false); + $product->expects($this->any())->method('isConfigurable')->will($this->returnValue(true)); + + $childProduct = + $this->getMock('Mage_Catalog_Model_Product', array('getThumbnail', 'getDataByKey'), array(), '', false); + $childProduct->expects($this->any())->method('getThumbnail')->will($this->returnValue('/_/_/__green.gif')); + + $childItem = $objectManagerHelper->getModel('Mage_Sales_Model_Quote_Item'); + $childItem->setData('product', $childProduct); + + $item = $objectManagerHelper->getModel('Mage_Sales_Model_Quote_Item'); + $item->setData('product', $product); + $item->addChild($childItem); + + $helperImage = $this->getMock('Mage_Catalog_Helper_Image', array('init', 'resize', '__toString')); + $helperImage->expects($this->any())->method('init')->will($this->returnValue($helperImage)); + $helperImage->expects($this->any())->method('resize')->will($this->returnValue($helperImage)); + $helperImage->expects($this->any())->method('__toString')->will($this->returnValue($url)); + + $layout = $configurable->getLayout(); + $layout->expects($this->any())->method('helper')->will($this->returnValue($helperImage)); + + $configurable->setItem($item); + + $configurableUrl = $configurable->getProductThumbnailUrl(); + $this->assertNotNull($configurableUrl); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/Fallback/CachingProxyTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Design/Fallback/CachingProxyTest.php index 43289cf83bf3638de0debc1273f293594028dbfa..ee88abafba3410af467a86a730e66cf52c5f7cbe 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Design/Fallback/CachingProxyTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Design/Fallback/CachingProxyTest.php @@ -70,6 +70,7 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework public function setUp() { + // TODO This test should be either refactored to use mock filesystem or moved to integration $this->_baseDir = DIRECTORY_SEPARATOR . 'base' . DIRECTORY_SEPARATOR . 'dir'; $this->_theme = $this->getMock('Mage_Core_Model_Theme', array(), array(), '', false); @@ -87,14 +88,13 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework $this->_fallback = $this->getMock( 'Mage_Core_Model_Design_Fallback', array('getFile', 'getLocaleFile', 'getViewFile'), - array($params) + array($this->_createFilesystem(), $params) ); - $this->_model = $this->getMock( - 'Mage_Core_Model_Design_Fallback_CachingProxy', - array('_getFallback'), - array($params) - ); + $this->_model = $this->getMockBuilder('Mage_Core_Model_Design_Fallback_CachingProxy') + ->setMethods(array('_getFallback')) + ->setConstructorArgs(array($this->_createFilesystem(), $params)) + ->getMock(); $this->_model->expects($this->any()) ->method('_getFallback') ->will($this->returnValue($this->_fallback)); @@ -200,7 +200,7 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework 'mapDir' => self::$_tmpDir, 'baseDir' => '' ); - $model = new Mage_Core_Model_Design_Fallback_CachingProxy($params); + $model = new Mage_Core_Model_Design_Fallback_CachingProxy($this->_createFilesystem(), $params); $model->notifyViewFilePublished($expectedPublicFile, $file, $module); $globPath = self::$_tmpDir . DIRECTORY_SEPARATOR . '*.*'; @@ -212,7 +212,7 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework $model = $this->getMock( 'Mage_Core_Model_Design_Fallback_CachingProxy', array('_getFallback'), - array($params) + array($this->_createFilesystem(), $params) ); $model->expects($this->never()) ->method('_getFallback'); @@ -220,4 +220,9 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework $actualPublicFile = $model->getViewFile($file, $module); $this->assertEquals($expectedPublicFile, $actualPublicFile); } + + protected function _createFilesystem() + { + return new Magento_Filesystem(new Magento_Filesystem_Adapter_Local()); + } } diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Layout/UpdateTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Layout/UpdateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..df4ed924d0ff2c1dd0a97ea363a87927ce7797a5 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Layout/UpdateTest.php @@ -0,0 +1,60 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_Core + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Core_Model_Layout_UpdateTest extends PHPUnit_Framework_TestCase +{ + /** + * Test formatted time data + */ + const TEST_FORMATTED_TIME = 'test_time'; + + public function testBeforeSave() + { + $resourceModel = $this->getMock( + 'Mage_Core_Model_Resource_Layout_Update', + array('formatDate', 'getIdFieldName', 'beginTransaction', 'save', 'addCommitCallback', 'commit'), + array(), + '', + false + ); + $resourceModel->expects($this->once()) + ->method('formatDate') + ->with($this->isType('int')) + ->will($this->returnValue(self::TEST_FORMATTED_TIME)); + $resourceModel->expects($this->once()) + ->method('addCommitCallback') + ->will($this->returnSelf()); + + $helper = new Magento_Test_Helper_ObjectManager($this); + /** @var $model Mage_Core_Model_Layout_Update */ + $model = $helper->getModel('Mage_Core_Model_Layout_Update', array('resource' => $resourceModel)); + $model->setId(0); // set any data to set _hasDataChanges flag + $model->save(); + + $this->assertEquals(self::TEST_FORMATTED_TIME, $model->getUpdatedAt()); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/AbstractTestCase.php b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/AbstractTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..addd1320b6443fff84061f619a37253630f8d3d7 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/AbstractTestCase.php @@ -0,0 +1,162 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +abstract class Mage_Core_Model_Resource_Layout_AbstractTestCase extends PHPUnit_Framework_TestCase +{ + /** + * Test 'where' condition for assertion + */ + const TEST_WHERE_CONDITION = 'condition = 1'; + + /** + * Test interval in days + */ + const TEST_DAYS_BEFORE = 3; + + /** + * @var Mage_Core_Model_Resource_Layout_Update_Collection + */ + protected $_collection; + + /** + * Name of main table alias + * + * @var string + */ + protected $_tableAlias = 'main_table'; + + /** + * Expected conditions for testAddUpdatedDaysBeforeFilter + * + * @var array + */ + protected $_expectedConditions = array(); + + protected function setUp() + { + $this->_expectedConditions = array( + 'counter' => 0, + 'data' => array( + 0 => array($this->_tableAlias . '.updated_at', array('notnull' => true)), + 1 => array($this->_tableAlias . '.updated_at', array('lt' => 'date')), + ) + ); + } + + /** + * Retrieve resource model instance + * + * @param Zend_Db_Select $select + * @return PHPUnit_Framework_MockObject_MockObject + */ + protected function _getResource(Zend_Db_Select $select) + { + $connection = $this->getMock('Varien_Db_Adapter_Pdo_Mysql', + array(), array(), '', false + ); + $connection->expects($this->once()) + ->method('select') + ->will($this->returnValue($select)); + $connection->expects($this->any()) + ->method('quoteIdentifier') + ->will($this->returnArgument(0)); + + $resource = $this->getMockForAbstractClass('Mage_Core_Model_Resource_Db_Abstract', array(), '', false, true, + true, array('getReadConnection', 'getMainTable', 'getTable')); + $resource->expects($this->any()) + ->method('getReadConnection') + ->will($this->returnValue($connection)); + $resource->expects($this->any()) + ->method('getTable') + ->will($this->returnArgument(0)); + + return $resource; + } + + /** + * @abstract + * @param Zend_Db_Select $select + * @return Mage_Core_Model_Resource_Db_Collection_Abstract + */ + abstract protected function _getCollection(Zend_Db_Select $select); + + public function testAddUpdatedDaysBeforeFilter() + { + $select = $this->getMock('Zend_Db_Select', array(), array(), '', false); + $select->expects($this->any()) + ->method('where') + ->with(self::TEST_WHERE_CONDITION); + + $collection = $this->_getCollection($select); + + /** @var $connection PHPUnit_Framework_MockObject_MockObject */ + $connection = $collection->getResource()->getReadConnection(); + $connection->expects($this->any()) + ->method('prepareSqlCondition') + ->will($this->returnCallback(array($this, 'verifyPrepareSqlCondition'))); + + // expected date without time + $datetime = new DateTime(); + $storeInterval = new DateInterval('P' . self::TEST_DAYS_BEFORE . 'D'); + $datetime->sub($storeInterval); + $expectedDate = Varien_Date::formatDate($datetime->getTimestamp()); + $this->_expectedConditions['data'][1][1]['lt'] = $expectedDate; + + $collection->addUpdatedDaysBeforeFilter(self::TEST_DAYS_BEFORE); + } + + /** + * Assert SQL condition + * + * @param string $fieldName + * @param array $condition + * @return string + */ + public function verifyPrepareSqlCondition($fieldName, $condition) + { + $counter = $this->_expectedConditions['counter']; + $data = $this->_expectedConditions['data'][$counter]; + $this->_expectedConditions['counter']++; + + $this->assertEquals($data[0], $fieldName); + + $this->assertCount(1, $data[1]); + $key = array_keys($data[1]); + $key = reset($key); + $value = reset($data[1]); + + $this->assertArrayHasKey($key, $condition); + + if ($key == 'lt') { + $this->assertContains($value, $condition[$key]); + } else { + $this->assertContains($value, $condition); + } + + return self::TEST_WHERE_CONDITION; + } +} diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/Link/CollectionTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/Link/CollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6cb30d8ceeee3be3e98cdaa92c96bfdd232916ce --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/Link/CollectionTest.php @@ -0,0 +1,111 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Core_Model_Resource_Layout_Link_CollectionTest extends Mage_Core_Model_Resource_Layout_AbstractTestCase +{ + /** + * Name of test table + */ + const TEST_TABLE = 'core_layout_update'; + + /** + * Name of main table alias + * + * @var string + */ + protected $_tableAlias = 'update'; + + /** + * @param Zend_Db_Select $select + * @return Mage_Core_Model_Resource_Layout_Link_Collection + */ + protected function _getCollection(Zend_Db_Select $select) + { + return new Mage_Core_Model_Resource_Layout_Link_Collection($this->_getResource($select)); + } + + /** + * @dataProvider filterFlagDataProvider + * @param bool $flag + */ + public function testAddTemporaryFilter($flag) + { + $select = $this->getMock('Zend_Db_Select', array(), array('where'), '', false); + $select->expects($this->once()) + ->method('where') + ->with(self::TEST_WHERE_CONDITION); + + $collection = $this->_getCollection($select); + + /** @var $connection PHPUnit_Framework_MockObject_MockObject */ + $connection = $collection->getResource()->getReadConnection(); + $connection->expects($this->any()) + ->method('prepareSqlCondition') + ->with('main_table.is_temporary', $flag) + ->will($this->returnValue(self::TEST_WHERE_CONDITION)); + + $collection->addTemporaryFilter($flag); + } + + /** + * @return array + */ + public function filterFlagDataProvider() + { + return array( + 'Add temporary filter' => array('$flag' => true), + 'Disable temporary filter' => array('$flag' => false), + ); + } + + /** + * @covers Mage_Core_Model_Resource_Layout_Link_Collection::_joinWithUpdate + */ + public function testJoinWithUpdate() + { + $select = $this->getMock('Zend_Db_Select', array(), array(), '', false); + $select->expects($this->once()) + ->method('join') + ->with( + array('update' => self::TEST_TABLE), + 'update.layout_update_id = main_table.layout_update_id', + $this->isType('array') + ); + + $collection = $this->_getCollection($select); + + /** @var $resource PHPUnit_Framework_MockObject_MockObject */ + $resource = $collection->getResource(); + $resource->expects($this->once()) + ->method('getTable') + ->with(self::TEST_TABLE) + ->will($this->returnValue(self::TEST_TABLE)); + + $collection->addUpdatedDaysBeforeFilter(1) + ->addUpdatedDaysBeforeFilter(2); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/Update/CollectionTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/Update/CollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f6bdb82d3d88ed03d85b7d11652ee1975ced52e1 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Layout/Update/CollectionTest.php @@ -0,0 +1,109 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Core + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Core_Model_Resource_Layout_Update_CollectionTest extends Mage_Core_Model_Resource_Layout_AbstractTestCase +{ + /** + * Retrieve layout update collection instance + * + * @param Zend_Db_Select $select + * @return Mage_Core_Model_Resource_Layout_Update_Collection + */ + protected function _getCollection(Zend_Db_Select $select) + { + return new Mage_Core_Model_Resource_Layout_Update_Collection($this->_getResource($select)); + } + + public function testAddThemeFilter() + { + $themeId = 1; + $select = $this->getMock('Zend_Db_Select', array(), array(), '', false); + $select->expects($this->once()) + ->method('where') + ->with('link.theme_id = ?', $themeId); + + $collection = $this->_getCollection($select); + $collection->addThemeFilter($themeId); + } + + public function testAddStoreFilter() + { + $storeId = 1; + $select = $this->getMock('Zend_Db_Select', array(), array(), '', false); + $select->expects($this->once()) + ->method('where') + ->with('link.store_id = ?', $storeId); + + $collection = $this->_getCollection($select); + $collection->addStoreFilter($storeId); + } + + /** + * @covers Mage_Core_Model_Resource_Layout_Update_Collection::_joinWithLink + */ + public function testJoinWithLink() + { + $select = $this->getMock('Zend_Db_Select', array(), array(), '', false); + $select->expects($this->once()) + ->method('join') + ->with( + array('link' => 'core_layout_link'), + 'link.layout_update_id = main_table.layout_update_id', + $this->isType('array') + ); + + $collection = $this->_getCollection($select); + $collection->addStoreFilter(1); + $collection->addThemeFilter(1); + } + + public function testAddNoLinksFilter() + { + $select = $this->getMock('Zend_Db_Select', array(), array(), '', false); + $select->expects($this->once()) + ->method('joinLeft') + ->with( + array('link' => 'core_layout_link'), + 'link.layout_update_id = main_table.layout_update_id', + array(array()) + ); + $select->expects($this->once()) + ->method('where') + ->with(self::TEST_WHERE_CONDITION); + + $collection = $this->_getCollection($select); + + /** @var $connection PHPUnit_Framework_MockObject_MockObject */ + $connection = $collection->getResource()->getReadConnection(); + $connection->expects($this->once()) + ->method('prepareSqlCondition') + ->with('link.layout_update_id', array('null' => true)) + ->will($this->returnValue(self::TEST_WHERE_CONDITION)); + + $collection->addNoLinksFilter(); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Setup/MigrationTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Setup/MigrationTest.php index d42216940c7a6591f6ad7a774ddd66d543000a0e..2f04e129bc5cd0f41e4aef551bea14a19f6ce045 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Setup/MigrationTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/Setup/MigrationTest.php @@ -149,7 +149,8 @@ class Mage_Core_Model_Resource_Setup_MigrationTest extends PHPUnit_Framework_Tes */ public function testAppendClassAliasReplace() { - $setupModel = new Mage_Core_Model_Resource_Setup_Migration('core_setup', $this->_getModelDependencies()); + $setupModel = new Mage_Core_Model_Resource_Setup_Migration( + 'core_setup', $this->_getFilesystemMock(), $this->_getModelDependencies()); $setupModel->appendClassAliasReplace('tableName', 'fieldName', 'entityType', 'fieldContentType', array('pk_field1', 'pk_field2'), 'additionalWhere' @@ -199,6 +200,7 @@ class Mage_Core_Model_Resource_Setup_MigrationTest extends PHPUnit_Framework_Tes $setupModel = new Mage_Core_Model_Resource_Setup_Migration( 'core_setup', + $this->_getFilesystemMock(), $this->_getModelDependencies($tableRowsCount, $tableData, $aliasesMap) ); $setupModel->setTable('table', 'table'); @@ -252,4 +254,15 @@ class Mage_Core_Model_Resource_Setup_MigrationTest extends PHPUnit_Framework_Tes $this->assertNotEmpty($className); } } + + /** + * @return PHPUnit_Framework_MockObject_MockObject|Magento_Filesystem + */ + protected function _getFilesystemMock() + { + $mock = $this->getMockBuilder('Magento_Filesystem') + ->disableOriginalConstructor() + ->getMock(); + return $mock; + } } diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/ShellAbstractTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/ShellAbstractTest.php index a2be7afaed34a1d5ad353a3d55927e3a5a058797..dd13f8bfd60ed05efda3792744695304607eaa22 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/ShellAbstractTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/ShellAbstractTest.php @@ -33,15 +33,10 @@ class Mage_Core_Model_ShellAbstractTest extends PHPUnit_Framework_TestCase public function setUp() { - $this->_model = $this->getMockForAbstractClass( - 'Mage_Core_Model_ShellAbstract', - array(array()), - '', - true, - true, - true, - array('_applyPhpVariables') - ); + $this->_model = $this->getMockBuilder('Mage_Core_Model_ShellAbstract') + ->disableOriginalConstructor() + ->setMethods(array('_applyPhpVariables')) + ->getMockForAbstractClass(); } public function tearDown() diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Theme/ServiceTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Theme/ServiceTest.php index b337ad96ac5f46a7ea174fea6c509ce906cecf73..3b2dfe03f56f5b8616af6aebd30b94b9e83c7d2d 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Theme/ServiceTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Theme/ServiceTest.php @@ -62,7 +62,9 @@ class Mage_Core_Model_Theme_ServiceTest extends PHPUnit_Framework_TestCase $themeService = new Mage_Core_Model_Theme_Service($themeFactoryMock, $this->getMock('Mage_Core_Model_Design_Package', array(), array(), '', false), $this->getMock('Mage_Core_Model_App', array(), array(), '', false), - $this->getMock('Mage_Core_Helper_Data', array(), array(), '', false) + $this->getMock('Mage_Core_Helper_Data', array(), array(), '', false), + $this->getMock('Mage_DesignEditor_Model_Resource_Layout_Update', array(), array(), '', false), + $this->getMock('Mage_Core_Model_Event_Manager', array(), array(), '', false) ); $this->assertEquals($expectedResult, $themeService->isCustomizationsExist()); } @@ -103,9 +105,11 @@ class Mage_Core_Model_Theme_ServiceTest extends PHPUnit_Framework_TestCase $themeService = new Mage_Core_Model_Theme_Service($themeFactoryMock, $this->getMock('Mage_Core_Model_Design_Package', array(), array(), '', false), $this->getMock('Mage_Core_Model_App', array(), array(), '', false), - $this->getMock('Mage_Core_Helper_Data', array(), array(), '', false) + $this->getMock('Mage_Core_Helper_Data', array(), array(), '', false), + $this->getMock('Mage_DesignEditor_Model_Resource_Layout_Update', array(), array(), '', false), + $this->getMock('Mage_Core_Model_Event_Manager', array(), array(), '', false) ); - $themeService->assignThemeToStores(-1, array()); + $themeService->assignThemeToStores(-1); } /** @@ -159,6 +163,12 @@ class Mage_Core_Model_Theme_ServiceTest extends PHPUnit_Framework_TestCase } )); $helperMock = $this->getMock('Mage_Core_Helper_Data', array(), array(), '', false); + $layoutUpdateMock = $this->getMock('Mage_DesignEditor_Model_Resource_Layout_Update', array(), array(), '', + false + ); + $eventManagerMock = $this->getMock('Mage_Core_Model_Event_Manager', array(), array(), '', + false + ); $themeFactoryMock = $this->getMock('Mage_Core_Model_Theme_Factory', array('create'), array(), '', false); $themeFactoryMock->expects($this->any()) @@ -167,7 +177,7 @@ class Mage_Core_Model_Theme_ServiceTest extends PHPUnit_Framework_TestCase /** @var $themeService Mage_Core_Model_Theme_Service */ $themeService = $this->getMock('Mage_Core_Model_Theme_Service', array('_getThemeCustomizations'), - array($themeFactoryMock, $designMock, $appMock, $helperMock)); + array($themeFactoryMock, $designMock, $appMock, $helperMock, $layoutUpdateMock, $eventManagerMock)); $themeService->expects($this->once()) ->method('_getThemeCustomizations') ->will($this->returnValue($themesMock)); diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php index a86e90f394aa8535278fee6c230392ac8b5285b1..bcfe1d759e87198e8e248b1f49ae22227741c171 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php @@ -57,9 +57,31 @@ class Mage_Core_Model_ThemeTest extends PHPUnit_Framework_TestCase ); /** @var $themeMock Mage_Core_Model_Theme */ $themeMock = $this->getMock('Mage_Core_Model_Theme', array('_init'), $arguments, '', true); + $filesystemMock = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor(true)->getMock(); + $filesystemMock->expects($this->any())->method('searchKeys') + ->will($this->returnValueMap(array( + array( + $designDir, 'frontend/default/iphone/theme.xml', + array( + str_replace('/', DIRECTORY_SEPARATOR, $designDir . '/frontend/default/iphone/theme.xml') + ) + ), + array( + $designDir, 'frontend/default/iphone/theme_invalid.xml', + array( + str_replace( + '/', + DIRECTORY_SEPARATOR, + $designDir . '/frontend/default/iphone/theme_invalid.xml' + ) + ) + ), + ) + )); /** @var $collectionMock Mage_Core_Model_Theme_Collection|PHPUnit_Framework_MockObject_MockObject */ - $collectionMock = $this->getMock('Mage_Core_Model_Theme_Collection', array('getNewEmptyItem')); + $collectionMock = $this->getMock('Mage_Core_Model_Theme_Collection', array('getNewEmptyItem'), + array($filesystemMock)); $collectionMock->expects($this->any()) ->method('getNewEmptyItem') ->will($this->returnValue($themeMock)); diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Validator/FactoryTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Validator/FactoryTest.php index 90017cb0b65b0fd08b0ffbf3957baa4965ec3908..b13b90ae1f80eb63cc8acacacd44785280c13ebd 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Validator/FactoryTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Validator/FactoryTest.php @@ -85,7 +85,7 @@ class Mage_Core_Model_Validator_FactoryTest extends PHPUnit_Framework_TestCase // Translate adapter mock $this->_translateAdapter = $this->getMockBuilder('Mage_Core_Model_Translate') - ->setConstructorArgs(array()) + ->disableOriginalConstructor() ->setMethods(array('_getTranslatedString')) ->getMock(); $this->_translateAdapter->expects($this->any()) diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/ButtonsTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/ButtonsTest.php index e30a5fd613569720da91ee43615108d85af184d6..e40e7b514f42480872186fc3b799484f1a50a842 100644 --- a/dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/ButtonsTest.php +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Block/Adminhtml/Editor/Toolbar/ButtonsTest.php @@ -72,12 +72,12 @@ class Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_ButtonsTest extends PHPUn $this->assertEquals('*/*/getLayoutUpdate', $this->_block->getViewLayoutUrl()); } - public function testGetBackUrl() + public function testGetQuitUrl() { $this->_urlBuilder->expects($this->once()) ->method('getUrl') ->will($this->returnArgument(0)); - $this->assertEquals('*/*/', $this->_block->getBackUrl()); + $this->assertEquals('*/*/quit', $this->_block->getQuitUrl()); } public function testGetNavigationModeUrl() @@ -105,4 +105,12 @@ class Mage_DesignEditor_Block_Adminhtml_Editor_Toolbar_ButtonsTest extends PHPUn $this->assertEquals("*/*/launch/mode/{$mode}/theme_id/3/", $this->_block->getDesignModeUrl()); } + + public function testGetSaveTemporaryLayoutUpdateUrl() + { + $this->_urlBuilder->expects($this->once()) + ->method('getUrl') + ->will($this->returnArgument(0)); + $this->assertEquals('*/*/saveTemporaryLayoutUpdate', $this->_block->getSaveTemporaryLayoutUpdateUrl()); + } } diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Controller/Varien/Router/StandardTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Controller/Varien/Router/StandardTest.php index ae8d365c12acc2e76da1a70c85e593df163b7cbd..d3ea390aca7d969ea5725624e13f965a5b625b1f 100644 --- a/dev/tests/unit/testsuite/Mage/DesignEditor/Controller/Varien/Router/StandardTest.php +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Controller/Varien/Router/StandardTest.php @@ -183,7 +183,8 @@ class Mage_DesignEditor_Controller_Varien_Router_StandardTest extends PHPUnit_Fr ) { // default mocks - not affected on method functionality $controllerFactory = $this->getMock('Mage_Core_Controller_Varien_Action_Factory', array(), array(), '', false); - $objectManager = $this->getMock('Magento_ObjectManager', array(), array(), '', false); + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $app = $this->getMock('Mage_Core_Model_App', array(), array(), '', false); $testArea = 'frontend'; $testBaseController = 'Mage_Core_Controller_Varien_Action'; @@ -242,7 +243,8 @@ class Mage_DesignEditor_Controller_Varien_Router_StandardTest extends PHPUnit_Fr $router = new Mage_DesignEditor_Controller_Varien_Router_Standard( $controllerFactory, - $objectManager, + $filesystem, + $app, $testArea, $testBaseController, $backendSession, diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Helper/DataTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Helper/DataTest.php index d7975c8c7e65f332c1f8b28c52c6cdf9048a0bee..11a491fdca7f27db17e1d2b27f6453a457e6ae27 100644 --- a/dev/tests/unit/testsuite/Mage/DesignEditor/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Helper/DataTest.php @@ -32,16 +32,26 @@ class Mage_DesignEditor_Helper_DataTest extends PHPUnit_Framework_TestCase */ const TEST_FRONT_NAME = 'test_front_name'; + /** + * Test default handle + */ + const TEST_DEFAULT_HANDLE = 'test_default_handle'; + /** * Test disabled cache types */ - const TEST_DISABLED_CACHE_TYPES = 'type1, type2 '; + const TEST_DISABLED_CACHE_TYPES = '<type1 /><type2 />'; /** * Test data for blocks and containers */ const TEST_ELEMENT_DATA = '<node_1>value_1</node_1><node_2>value_2</node_2><node_3>value_3</node_3>'; + /** + * Test data for date to expire + */ + const TEST_DATE_TO_EXPIRE = 123; + /** * @var array */ @@ -76,6 +86,20 @@ class Mage_DesignEditor_Helper_DataTest extends PHPUnit_Framework_TestCase $this->assertEquals(self::TEST_FRONT_NAME, $this->_model->getFrontName()); } + public function testGetDefaultHandle() + { + $defaultHandleNode = new Mage_Core_Model_Config_Element('<test>' . self::TEST_DEFAULT_HANDLE . '</test>'); + + $configurationMock = $this->getMock('Mage_Core_Model_Config', array('getNode'), array(), '', false); + $configurationMock->expects($this->once()) + ->method('getNode') + ->with(Mage_DesignEditor_Helper_Data::XML_PATH_DEFAULT_HANDLE) + ->will($this->returnValue($defaultHandleNode)); + + $this->_model = new Mage_DesignEditor_Helper_Data($configurationMock); + $this->assertEquals(self::TEST_DEFAULT_HANDLE, $this->_model->getDefaultHandle()); + } + public function testGetDisabledCacheTypes() { $cacheTypesNode = new Mage_Core_Model_Config_Element('<test>' . self::TEST_DISABLED_CACHE_TYPES . '</test>'); @@ -137,4 +161,18 @@ class Mage_DesignEditor_Helper_DataTest extends PHPUnit_Framework_TestCase ), ); } + + public function testGetDateToExpire() + { + $frontNameNode = new Mage_Core_Model_Config_Element('<test>' . self::TEST_DATE_TO_EXPIRE . '</test>'); + + $configurationMock = $this->getMock('Mage_Core_Model_Config', array('getNode'), array(), '', false); + $configurationMock->expects($this->once()) + ->method('getNode') + ->with(Mage_DesignEditor_Helper_Data::XML_PATH_DAYS_TO_EXPIRE) + ->will($this->returnValue($frontNameNode)); + + $this->_model = new Mage_DesignEditor_Helper_Data($configurationMock); + $this->assertEquals(self::TEST_DATE_TO_EXPIRE, $this->_model->getDaysToExpire()); + } } diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Change/Layout/MoveTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Change/Layout/MoveTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9a29e74a4dd33c2b07ae3c05e70b96ce20bd84ed --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Change/Layout/MoveTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_DesignEditor + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_DesignEditor_Model_Change_Layout_MoveTest extends PHPUnit_Framework_TestCase +{ + /**#@+ + * Test element names + */ + const TEST_ELEMENT = 'test_element'; + const CONTAINER_NAME = 'content'; + /**#@-*/ + + /** + * @var Mage_DesignEditor_Model_Change_Layout_Move + */ + protected $_model; + + /** + * Attributes from XML data update + * + * @var array + */ + protected $_attributes = array( + 'element_name' => self::TEST_ELEMENT, + 'destination_order' => 1, + 'origin_order' => 1, + 'destination_container' => self::CONTAINER_NAME, + 'origin_container' => self::CONTAINER_NAME, + 'type' => 'layout', + 'action_name' => 'move', + 'element' => self::TEST_ELEMENT, + 'after' => 1, + 'destination' => self::CONTAINER_NAME, + 'custom' => 'test_value', + ); + + public function testGetAttributes() + { + $data = '<move element="' . self::TEST_ELEMENT . '" after="1" custom="test_value" destination="' + . self::CONTAINER_NAME . '"/>'; + $xml = new Varien_Simplexml_Element($data); + $this->_model = new Mage_DesignEditor_Model_Change_Layout_Move($xml); + $this->assertAttributeEquals($this->_attributes, '_data', $this->_model); + } +} diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Change/Layout/RemoveTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Change/Layout/RemoveTest.php new file mode 100644 index 0000000000000000000000000000000000000000..117c8c9c5fa7a8900cd5f53dafad92cd4aae5c4a --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Change/Layout/RemoveTest.php @@ -0,0 +1,59 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Mage_DesignEditor + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_DesignEditor_Model_Change_Layout_RemoveTest extends PHPUnit_Framework_TestCase +{ + /** + * Test element names + */ + const TEST_ELEMENT = 'test_element'; + + /** + * @var Mage_DesignEditor_Model_Change_Layout_Move + */ + protected $_model; + + /** + * Attributes from XML data update + * + * @var array + */ + protected $_attributes = array( + 'element_name' => self::TEST_ELEMENT, + 'type' => 'layout', + 'action_name' => 'remove', + 'name' => self::TEST_ELEMENT, + ); + + public function testGetAttributes() + { + $data = '<remove name="' . self::TEST_ELEMENT . '"/>'; + $xml = new Varien_Simplexml_Element($data); + $this->_model = new Mage_DesignEditor_Model_Change_Layout_Remove($xml); + $this->assertAttributeEquals($this->_attributes, '_data', $this->_model); + } +} diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/History/Renderer/LayoutUpdateTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/History/Renderer/LayoutUpdateTest.php index fefc9b9c7e669cfe252b88394c32eb733783b151..a0b91684f90e9fbd44ed8b03faddedfab7f46f85 100644 --- a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/History/Renderer/LayoutUpdateTest.php +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/History/Renderer/LayoutUpdateTest.php @@ -34,6 +34,30 @@ class Mage_DesignEditor_Model_History_Renderer_LayoutUpdateTest extends PHPUnit_ */ protected $_layoutRenderer; + /** + * Test changes data + * + * @var array + */ + protected $_testChanges = array( + 0 => array( + 'handle' => 'catalog_category_view', + 'type' => 'layout', + 'element_name' => 'category.products', + 'action_name' => 'move', + 'destination_container' => 'right', + 'destination_order' => '-', + 'origin_container' => 'content', + 'origin_order' => '-' + ), + 1 => array( + 'handle' => 'customer_account', + 'type' => 'layout', + 'element_name' => 'customer_account_navigation', + 'action_name' => 'remove', + ), + ); + /** * Init test environment */ @@ -42,18 +66,36 @@ class Mage_DesignEditor_Model_History_Renderer_LayoutUpdateTest extends PHPUnit_ $this->_layoutRenderer = new Mage_DesignEditor_Model_History_Renderer_LayoutUpdate; } + protected function tearDown() + { + unset($this->_layoutRenderer); + } + /** * Test renderer * * @param array $changes - * @dataProvider getChanges + * @dataProvider renderDataProvider */ - public function testRenderer($changes) + public function testRender($changes) { $collection = $this->_mockCollection($changes); + // assert render all changes $this->assertXmlStringEqualsXmlFile( - realpath(__DIR__) . '/../../_files/history/layout_renderer.xml', $this->_layoutRenderer->render($collection) + realpath(__DIR__) . '/../../_files/history/layout_renderer.xml', + $this->_layoutRenderer->render($collection) + ); + + // assert render specified handle + $handleIndex = 0; + $expectedXml = '<move element="' + . $this->_testChanges[$handleIndex]['element_name'] . '" after="' + . $this->_testChanges[$handleIndex]['destination_order'] . '" destination="' + . $this->_testChanges[$handleIndex]['destination_container'] . '"/>'; + $this->assertXmlStringEqualsXmlString( + $expectedXml, + $this->_layoutRenderer->render($collection, $this->_testChanges[$handleIndex]['handle']) ); } @@ -89,25 +131,8 @@ class Mage_DesignEditor_Model_History_Renderer_LayoutUpdateTest extends PHPUnit_ * * @return array */ - public function getChanges() + public function renderDataProvider() { - return array(array(array( - array( - 'handle' => 'catalog_category_view', - 'type' => 'layout', - 'element_name' => 'category.products', - 'action_name' => 'move', - 'destination_container' => 'right', - 'destination_order' => '-', - 'origin_container' => 'content', - 'origin_order' => '-' - ), - array( - 'handle' => 'customer_account', - 'type' => 'layout', - 'element_name' => 'customer_account_navigation', - 'action_name' => 'remove', - ), - ))); + return array(array($this->_testChanges)); } } diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/ObserverTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/ObserverTest.php index 6fc8397ba21331f02e2d4da4035f59b84f50fc8b..9131ac524128c6ceea140630d65b469455e5c6e7 100644 --- a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/ObserverTest.php @@ -27,6 +27,11 @@ class Mage_DesignEditor_Model_ObserverTest extends PHPUnit_Framework_TestCase { + /** + * Test number of days after which layout will be removed + */ + const TEST_DAYS_TO_EXPIRE = 5; + /** * @var Mage_DesignEditor_Model_Observer */ @@ -37,30 +42,6 @@ class Mage_DesignEditor_Model_ObserverTest extends PHPUnit_Framework_TestCase unset($this->_model); } - /** - * @param int $themeId - * @dataProvider setThemeDataProvider - */ - public function testSetTheme($themeId) - { - /** @var $session Mage_Backend_Model_Session */ - $session = $this->getMock('Mage_Backend_Model_Session', null, array(), '', false); - $session->setData('theme_id', $themeId); - - $design = $this->getMock('Mage_Core_Model_Design_Package', array('setDesignTheme'), array(), '', false); - if ($themeId !== null) { - $design->expects($this->once()) - ->method('setDesignTheme') - ->with($themeId); - } else { - $design->expects($this->never()) - ->method('setDesignTheme'); - } - - $this->_model = new Mage_DesignEditor_Model_Observer($session, $design); - $this->_model->setTheme(); - } - /** * @return array */ @@ -71,4 +52,74 @@ class Mage_DesignEditor_Model_ObserverTest extends PHPUnit_Framework_TestCase 'correct theme id' => array('$themeId' => 1), ); } + + public function testClearLayoutUpdates() + { + // mocks + $helper = $this->getMock('Mage_DesignEditor_Helper_Data', array('getDaysToExpire'), array(), '', false); + $helper->expects($this->once()) + ->method('getDaysToExpire') + ->will($this->returnValue(self::TEST_DAYS_TO_EXPIRE)); + + /** @var $linkCollection Mage_Core_Model_Resource_Layout_Link_Collection */ + $linkCollection = $this->getMock( + 'Mage_Core_Model_Resource_Layout_Link_Collection', + array('addTemporaryFilter', 'addUpdatedDaysBeforeFilter', 'load'), + array(), + '', + false + ); + $linkCollection->expects($this->once()) + ->method('addTemporaryFilter') + ->with(true) + ->will($this->returnSelf()); + $linkCollection->expects($this->once()) + ->method('addUpdatedDaysBeforeFilter') + ->with(self::TEST_DAYS_TO_EXPIRE) + ->will($this->returnSelf()); + for ($i = 0; $i < 3; $i++) { + $link = $this->getMock('Mage_Core_Model_Layout_Link', array('delete'), array(), '', false); + $link->expects($this->once()) + ->method('delete'); + $linkCollection->addItem($link); + } + + /** @var $layoutCollection Mage_Core_Model_Resource_Layout_Update_Collection */ + $layoutCollection = $this->getMock( + 'Mage_Core_Model_Resource_Layout_Update_Collection', + array('addNoLinksFilter', 'addUpdatedDaysBeforeFilter', 'load'), + array(), + '', + false + ); + $layoutCollection->expects($this->once()) + ->method('addNoLinksFilter') + ->will($this->returnSelf()); + $layoutCollection->expects($this->once()) + ->method('addUpdatedDaysBeforeFilter') + ->with(self::TEST_DAYS_TO_EXPIRE) + ->will($this->returnSelf()); + for ($i = 0; $i < 3; $i++) { + $layout = $this->getMock('Mage_Core_Model_Layout_Update', array('delete'), array(), '', false); + $layout->expects($this->once()) + ->method('delete'); + $layoutCollection->addItem($layout); + } + + $objectManager = $this->getMock('Magento_ObjectManager_Zend', array('create'), array(), '', false); + $objectManager->expects($this->at(0)) + ->method('create') + ->with('Mage_Core_Model_Resource_Layout_Link_Collection') + ->will($this->returnValue($linkCollection)); + $objectManager->expects($this->at(1)) + ->method('create') + ->with('Mage_Core_Model_Resource_Layout_Update_Collection') + ->will($this->returnValue($layoutCollection)); + + $cacheManager = $this->getMock('Mage_Core_Model_Cache', array(), array(), '', false); + + // test + $this->_model = new Mage_DesignEditor_Model_Observer($objectManager, $helper, $cacheManager); + $this->_model->clearLayoutUpdates(); + } } diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/StateTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/StateTest.php index 0a1d8e64d94a882b5035f4c8999fb5308d967b72..4f11e30e20be456eb96475a59f2d50655c97eacf 100644 --- a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/StateTest.php +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/StateTest.php @@ -26,41 +26,91 @@ */ class Mage_DesignEditor_Model_StateTest extends PHPUnit_Framework_TestCase { + /**#@+ + * Name of layout classes that will be used as main layout + */ + const LAYOUT_DESIGN_CLASS_NAME = 'Mage_DesignEditor_Model_Layout'; + const LAYOUT_NAVIGATION_CLASS_NAME = 'Mage_Core_Model_Layout'; + /**#@-*/ + + /**#@+ + * Url model classes that will be used instead of Mage_Core_Model_Url in different vde modes + */ + const URL_MODEL_NAVIGATION_MODE_CLASS_NAME = 'Mage_DesignEditor_Model_Url_NavigationMode'; + const URL_MODEL_DESIGN_MODE_CLASS_NAME = 'Mage_DesignEditor_Model_Url_DesignMode'; + /**#@-*/ + + /**#@+ + * Layout update resource models + */ + const LAYOUT_UPDATE_RESOURCE_MODEL_CORE_CLASS_NAME = 'Mage_Core_Model_Resource_Layout_Update'; + const LAYOUT_UPDATE_RESOURCE_MODEL_VDE_CLASS_NAME = 'Mage_DesignEditor_Model_Resource_Layout_Update'; + /**#@-*/ + + /**#@+ + * Import behaviors + */ + const MODE_DESIGN = 'design'; + const MODE_NAVIGATION = 'navigation'; + /**#@-*/ + /* * Test area code */ const AREA_CODE = 'front'; + /**#@+ + * Test theme data + */ + const THEME_ID = 1; + const THEME_CONFIGURATION = 'test_config'; + /**#@-*/ + /** * @var Mage_DesignEditor_Model_State */ protected $_model; /** - * @var Mage_Backend_Model_Session + * @var Mage_Backend_Model_Session|PHPUnit_Framework_MockObject_MockObject */ protected $_backendSession; /** - * @var Mage_Core_Model_Layout_Factory + * @var Mage_Core_Model_Layout_Factory|PHPUnit_Framework_MockObject_MockObject */ protected $_layoutFactory; /** - * @var Mage_DesignEditor_Model_Url_Factory + * @var Mage_DesignEditor_Model_Url_Factory|PHPUnit_Framework_MockObject_MockObject */ protected $_urlModelFactory; /** - * @var Mage_Core_Model_Cache + * @var Mage_Core_Model_Cache|PHPUnit_Framework_MockObject_MockObject */ protected $_cacheManager; /** - * @var Mage_DesignEditor_Helper_Data + * @var Mage_DesignEditor_Helper_Data|PHPUnit_Framework_MockObject_MockObject */ protected $_dataHelper; + /** + * @var Magento_ObjectManager_Zend|PHPUnit_Framework_MockObject_MockObject + */ + protected $_objectManager; + + /** + * @var Mage_Core_Model_Design_Package|PHPUnit_Framework_MockObject_MockObject + */ + protected $_designPackage; + + /** + * @var Mage_Core_Model_App|PHPUnit_Framework_MockObject_MockObject + */ + protected $_application; + /** * @var array */ @@ -68,7 +118,7 @@ class Mage_DesignEditor_Model_StateTest extends PHPUnit_Framework_TestCase public function setUp() { - $this->_backendSession = $this->getMock('Mage_Backend_Model_Session', array('setData'), + $this->_backendSession = $this->getMock('Mage_Backend_Model_Session', array('setData', 'getData', 'unsetData'), array(), '', false ); $this->_layoutFactory = $this->getMock('Mage_Core_Model_Layout_Factory', array('createLayout'), @@ -77,18 +127,31 @@ class Mage_DesignEditor_Model_StateTest extends PHPUnit_Framework_TestCase $this->_urlModelFactory = $this->getMock('Mage_DesignEditor_Model_Url_Factory', array('replaceClassName'), array(), '', false ); - $this->_cacheManager = $this->getMock('Mage_Core_Model_Cache', array('banUse', 'cleanType'), + $this->_cacheManager = $this->getMock('Mage_Core_Model_Cache', array('canUse', 'banUse'), array(), '', false ); $this->_dataHelper = $this->getMock('Mage_DesignEditor_Helper_Data', array('getDisabledCacheTypes'), array(), '', false ); + $this->_objectManager = $this->getMock('Magento_ObjectManager_Zend', array('addAlias'), + array(), '', false + ); + $this->_designPackage = $this->getMock('Mage_Core_Model_Design_Package', array('getConfigPathByArea'), + array(), '', false + ); + $this->_application = $this->getMock('Mage_Core_Model_App', array('getStore'), + array(), '', false + ); + $this->_model = new Mage_DesignEditor_Model_State( $this->_backendSession, $this->_layoutFactory, $this->_urlModelFactory, $this->_cacheManager, - $this->_dataHelper + $this->_dataHelper, + $this->_objectManager, + $this->_designPackage, + $this->_application ); } @@ -99,6 +162,7 @@ class Mage_DesignEditor_Model_StateTest extends PHPUnit_Framework_TestCase $this->assertAttributeEquals($this->_urlModelFactory, '_urlModelFactory', $this->_model); $this->assertAttributeEquals($this->_cacheManager, '_cacheManager', $this->_model); $this->assertAttributeEquals($this->_dataHelper, '_dataHelper', $this->_model); + $this->assertAttributeEquals($this->_objectManager, '_objectManager', $this->_model); } protected function _setAdditionalExpectations() @@ -108,19 +172,20 @@ class Mage_DesignEditor_Model_StateTest extends PHPUnit_Framework_TestCase ->will($this->returnValue($this->_cacheTypes)); $this->_cacheManager->expects($this->at(0)) - ->method('banUse') + ->method('canUse') ->with('type1') - ->will($this->returnSelf()); + ->will($this->returnValue(true)); $this->_cacheManager->expects($this->at(1)) - ->method('cleanType') + ->method('banUse') ->with('type1') ->will($this->returnSelf()); + $this->_cacheManager->expects($this->at(2)) - ->method('banUse') + ->method('canUse') ->with('type2') - ->will($this->returnSelf()); + ->will($this->returnValue(true)); $this->_cacheManager->expects($this->at(3)) - ->method('cleanType') + ->method('banUse') ->with('type2') ->will($this->returnSelf()); } @@ -142,18 +207,55 @@ class Mage_DesignEditor_Model_StateTest extends PHPUnit_Framework_TestCase $this->_backendSession->expects($this->once()) ->method('setData') ->with('vde_current_mode', Mage_DesignEditor_Model_State::MODE_DESIGN); + $this->_backendSession->expects($this->once()) + ->method('getData') + ->with('theme_id') + ->will($this->returnValue(self::THEME_ID)); $this->_urlModelFactory->expects($this->once()) ->method('replaceClassName') - ->with('Mage_DesignEditor_Model_Url_DesignMode'); + ->with(self::URL_MODEL_DESIGN_MODE_CLASS_NAME); $this->_layoutFactory->expects($this->once()) ->method('createLayout') - ->with(array('area' => self::AREA_CODE), 'Mage_DesignEditor_Model_Layout'); + ->with(array('area' => self::AREA_CODE), self::LAYOUT_DESIGN_CLASS_NAME); + + $this->_objectManager->expects($this->once()) + ->method('addAlias') + ->with(self::LAYOUT_UPDATE_RESOURCE_MODEL_CORE_CLASS_NAME, + self::LAYOUT_UPDATE_RESOURCE_MODEL_VDE_CLASS_NAME); + + $this->_designPackage->expects($this->once()) + ->method('getConfigPathByArea') + ->with(Mage_Core_Model_App_Area::AREA_FRONTEND) + ->will($this->returnValue(self::THEME_CONFIGURATION)); + + $store = $this->getMock('Mage_Core_Model_Store', array('setConfig'), array(), '', false); + $store->expects($this->once()) + ->method('setConfig') + ->with(self::THEME_CONFIGURATION, self::THEME_ID); + + $this->_application->expects($this->once()) + ->method('getStore') + ->will($this->returnValue($store)); $this->_model->update(self::AREA_CODE, $request, $controller); } + public function testReset() + { + $this->_backendSession->expects($this->any()) + ->method('unsetData') + ->with($this->logicalOr( + Mage_DesignEditor_Model_State::CURRENT_HANDLE_SESSION_KEY, + Mage_DesignEditor_Model_State::CURRENT_MODE_SESSION_KEY, + Mage_DesignEditor_Model_State::CURRENT_URL_SESSION_KEY + )) + ->will($this->returnValue($this->_backendSession)); + + $this->_model->reset(); + } + public function testUpdateNavigationMode() { $this->_setAdditionalExpectations(); @@ -194,11 +296,16 @@ class Mage_DesignEditor_Model_StateTest extends PHPUnit_Framework_TestCase $this->_urlModelFactory->expects($this->once()) ->method('replaceClassName') - ->with('Mage_DesignEditor_Model_Url_NavigationMode'); + ->with(self::URL_MODEL_NAVIGATION_MODE_CLASS_NAME); $this->_layoutFactory->expects($this->once()) ->method('createLayout') - ->with(array('area' => self::AREA_CODE), 'Mage_Core_Model_Layout'); + ->with(array('area' => self::AREA_CODE), self::LAYOUT_NAVIGATION_CLASS_NAME); + + $this->_objectManager->expects($this->once()) + ->method('addAlias') + ->with(self::LAYOUT_UPDATE_RESOURCE_MODEL_CORE_CLASS_NAME, + self::LAYOUT_UPDATE_RESOURCE_MODEL_VDE_CLASS_NAME); $this->_model->update(self::AREA_CODE, $request, $controller); } diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/DesignModeTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/DesignModeTest.php index 3f677e760bb097e79eac6943ae9c41a5a09c20ce..be4c44aecc6a458a434d47fc6eba29b2a0a96180 100644 --- a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/DesignModeTest.php +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/DesignModeTest.php @@ -41,16 +41,6 @@ class Mage_DesignEditor_Model_Url_DesignModeTest extends PHPUnit_Framework_TestC $this->_model = new Mage_DesignEditor_Model_Url_DesignMode($this->_testData); } - public function testGetRoutePath() - { - $this->assertEquals('#', $this->_model->getRoutePath()); - } - - public function testGetRouteUrl() - { - $this->assertEquals('#', $this->_model->getRouteUrl()); - } - public function testGetUrl() { $this->assertEquals('#', $this->_model->getUrl()); diff --git a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/NavigationModeTest.php b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/NavigationModeTest.php index be94a4d47387b1db11e764642ebb9240b9ad1b60..38c5781043380c8a1fe0ecc2102be5a02bf4f811 100644 --- a/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/NavigationModeTest.php +++ b/dev/tests/unit/testsuite/Mage/DesignEditor/Model/Url/NavigationModeTest.php @@ -32,7 +32,7 @@ class Mage_DesignEditor_Model_Url_NavigationModeTest extends PHPUnit_Framework_T */ const FRONT_NAME = 'vde'; const ROUTE_PATH = 'design'; - const VALID_URL = 'http://test.com'; + const BASE_URL = 'http://test.com'; /**#@-*/ /** @@ -41,7 +41,7 @@ class Mage_DesignEditor_Model_Url_NavigationModeTest extends PHPUnit_Framework_T protected $_model; /** - * @var Mage_DesignEditor_Helper_Data + * @var Mage_DesignEditor_Helper_Data|PHPUnit_Framework_MockObject_MockObject */ protected $_helper; @@ -62,18 +62,24 @@ class Mage_DesignEditor_Model_Url_NavigationModeTest extends PHPUnit_Framework_T $this->assertAttributeEquals($this->_testData, '_data', $this->_model); } - public function testGetRoutePath() + public function testGetRouteUrl() { - $this->_helper->expects($this->once()) + $this->_helper->expects($this->any()) ->method('getFrontName') ->will($this->returnValue(self::FRONT_NAME)); - $this->_model->setData('route_path', self::ROUTE_PATH); - $this->assertEquals(self::FRONT_NAME . '/' . self::ROUTE_PATH, $this->_model->getRoutePath()); - } + $store = $this->getMock('Mage_Core_Model_Store', array('getBaseUrl'), array(), '', false); + $store->expects($this->any()) + ->method('getBaseUrl') + ->will($this->returnValue(self::BASE_URL)); - public function testGetRouteUrl() - { - $this->assertEquals(self::VALID_URL, $this->_model->getRouteUrl(self::VALID_URL)); + $this->_model->setData('store', $store); + $this->_model->setData('type', null); + + $sourceUrl = self::BASE_URL . '/' . self::ROUTE_PATH; + $expectedUrl = self::BASE_URL . '/' . self::FRONT_NAME . '/' . self::ROUTE_PATH; + + $this->assertEquals($expectedUrl, $this->_model->getRouteUrl($sourceUrl)); + $this->assertEquals($expectedUrl, $this->_model->getRouteUrl($expectedUrl)); } } diff --git a/dev/tests/unit/testsuite/Mage/Downloadable/Model/Product/TypeTest.php b/dev/tests/unit/testsuite/Mage/Downloadable/Model/Product/TypeTest.php index ae2ffd186407efcbd40a1dea951e471ddaea6600..4faf93773b3f7bbe1fdbfb4192cbeb0004de390f 100644 --- a/dev/tests/unit/testsuite/Mage/Downloadable/Model/Product/TypeTest.php +++ b/dev/tests/unit/testsuite/Mage/Downloadable/Model/Product/TypeTest.php @@ -34,7 +34,8 @@ class Mage_Downloadable_Model_Product_TypeTest extends PHPUnit_Framework_TestCas protected function setUp() { - $this->_model = new Mage_Downloadable_Model_Product_Type(); + $filesystem = $this->getMockBuilder('Magento_Filesystem')->disableOriginalConstructor()->getMock(); + $this->_model = new Mage_Downloadable_Model_Product_Type($filesystem); } public function testHasWeightFalse() diff --git a/dev/tests/unit/testsuite/Mage/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php b/dev/tests/unit/testsuite/Mage/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php index ff6e1e941bc521608c894761e4f4fd13420cf77d..0cc22b0eb2e56726158da69f36d9f9e78b33cab5 100644 --- a/dev/tests/unit/testsuite/Mage/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php +++ b/dev/tests/unit/testsuite/Mage/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php @@ -45,7 +45,10 @@ class Mage_Downloadable_Model_Sales_Order_Pdf_Items_CreditmemoTest extends PHPUn protected function setUp() { $objectManager = new Magento_Test_Helper_ObjectManager($this); - $modelConstructorArgs = $objectManager->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $modelConstructorArgs = $objectManager->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Sales_Model_Order' + ); $this->_order = $this->getMock('Mage_Sales_Model_Order', array('formatPriceTxt'), $modelConstructorArgs); $this->_order diff --git a/dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php b/dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php index 1aca3fb9d2112daebcafae467da1fbff417a62a3..ab00121421598a4a38e42f40d5c20a9d60ed3047 100644 --- a/dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php +++ b/dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php @@ -53,7 +53,10 @@ class Mage_Eav_Model_Resource_Entity_AttributeTest extends PHPUnit_Framework_Tes $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); /** @var $model Mage_Core_Model_Abstract */ - $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Core_Model_Abstract' + ); $arguments['data'] = $attributeData; $model = $this->getMock('Mage_Core_Model_Abstract', null, $arguments); $model->setDefault(array('2')); @@ -108,7 +111,10 @@ class Mage_Eav_Model_Resource_Entity_AttributeTest extends PHPUnit_Framework_Tes $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); /** @var $model Mage_Core_Model_Abstract */ - $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Core_Model_Abstract' + ); $arguments['data'] = $attributeData; $model = $this->getMock('Mage_Core_Model_Abstract', null, $arguments); $model->setOption(array('value' => array('option_1' => array('Backend Label', 'Frontend Label')))); @@ -169,7 +175,10 @@ class Mage_Eav_Model_Resource_Entity_AttributeTest extends PHPUnit_Framework_Tes $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); /** @var $model Mage_Core_Model_Abstract */ - $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Core_Model_Abstract' + ); $model = $this->getMock('Mage_Core_Model_Abstract', null, $arguments); $model->setOption('not-an-array'); diff --git a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php index 2aea52ca14baa2648c6e749ba85d13721e8fde8c..85b3099073715acc9fbdfaf9271644cad8fe515c 100644 --- a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php @@ -131,7 +131,10 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends PHP ->method('getEntityTypeCode') ->will($this->returnValue('customer_address')); foreach ($this->_attributes as $attributeData) { - $arguments = $this->_objectManager->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $arguments = $this->_objectManager->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Eav_Model_Entity_Attribute_Abstract' + ); $arguments['data'] = $attributeData; $attribute = $this->getMockForAbstractClass('Mage_Eav_Model_Entity_Attribute_Abstract', $arguments, '', true, true, true, array('_construct') @@ -207,7 +210,10 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends PHP */ public function iterate(Varien_Data_Collection_Db $collection, $pageSize, array $callbacks) { - $arguments = $this->_objectManager->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $arguments = $this->_objectManager->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Customer_Model_Customer' + ); $arguments['data'] = $this->_customerData; /** @var $customer Mage_Customer_Model_Customer */ $customer = $this->getMock('Mage_Customer_Model_Customer', array('_construct'), $arguments); @@ -235,7 +241,10 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends PHP $this->_model->setWriter($writer); $this->_model->setParameters(array()); - $arguments = $this->_objectManager->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $arguments = $this->_objectManager->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Core_Model_Abstract' + ); $arguments['data'] = $this->_addressData; $item = $this->getMockForAbstractClass('Mage_Core_Model_Abstract', $arguments); $this->_model->exportItem($item); diff --git a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/CustomerTest.php b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/CustomerTest.php index 576b4c90d0e6b8f8e8cfbd4fd6fe7745f9f335b7..dbb72b7d72a8b1e70f19442d971779cc79e9d1b8 100644 --- a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/CustomerTest.php +++ b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/CustomerTest.php @@ -118,7 +118,10 @@ class Mage_ImportExport_Model_Export_Entity_Eav_CustomerTest extends PHPUnit_Fra $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); $attributeCollection = new Varien_Data_Collection(); foreach ($this->_attributes as $attributeData) { - $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Eav_Model_Entity_Attribute_Abstract' + ); $arguments['data'] = $attributeData; $attribute = $this->getMockForAbstractClass('Mage_Eav_Model_Entity_Attribute_Abstract', $arguments, '', true, true, true, array('_construct') @@ -211,7 +214,10 @@ class Mage_ImportExport_Model_Export_Entity_Eav_CustomerTest extends PHPUnit_Fra $this->_model->setWriter($writer); $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); - $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Core_Model_Abstract' + ); $arguments['data'] = $this->_customerData; $item = $this->getMockForAbstractClass('Mage_Core_Model_Abstract', $arguments); diff --git a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php index e62d4567b6d1f51a4838a8b11bd5b93681a909f9..224cde800c33790b5c680a9afff4f056e2d7f331 100644 --- a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php @@ -175,43 +175,11 @@ class Mage_ImportExport_Model_Import_Entity_Eav_Customer_AddressTest extends PHP ->method('__') ->will($this->returnArgument(0)); - /** @var $attributeCollection Varien_Data_Collection|PHPUnit_Framework_TestCase */ - $attributeCollection = $this->getMock('Varien_Data_Collection', array('getEntityTypeCode')); - $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); - foreach ($this->_attributes as $attributeData) { - $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); - $arguments['data'] = $attributeData; - $attribute = $this->getMockForAbstractClass('Mage_Eav_Model_Entity_Attribute_Abstract', - $arguments, '', true, true, true, array('_construct', 'getBackend') - ); - $attribute->expects($this->any()) - ->method('getBackend') - ->will($this->returnSelf()); - $attribute->expects($this->any()) - ->method('getTable') - ->will($this->returnValue($attributeData['table'])); - $attributeCollection->addItem($attribute); - } + $attributeCollection = $this->_createAttrCollectionMock(); - /** @var $customerStorage Mage_ImportExport_Model_Resource_Customer_Storage */ - $customerStorage = $this->getMock('Mage_ImportExport_Model_Resource_Customer_Storage', array('load'), - array(), '', false); - $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); - foreach ($this->_customers as $customerData) { - $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); - $arguments['data'] = $customerData; - /** @var $customer Mage_Customer_Model_Customer */ - $customer = $this->getMock('Mage_Customer_Model_Customer', array('_construct'), $arguments); - $customerStorage->addCustomer($customer); - } + $customerStorage = $this->_createCustomerStorageMock(); - $customerEntity = $this->getMock('stdClass', array('filterEntityCollection', 'setParameters')); - $customerEntity->expects($this->any()) - ->method('filterEntityCollection') - ->will($this->returnArgument(0)); - $customerEntity->expects($this->any()) - ->method('setParameters') - ->will($this->returnSelf()); + $customerEntity = $this->_createCustomerEntityMock(); $addressCollection = new Varien_Data_Collection(); foreach ($this->_addresses as $address) { @@ -254,6 +222,75 @@ class Mage_ImportExport_Model_Import_Entity_Eav_Customer_AddressTest extends PHP return $data; } + /** + * Create mock of attribute collection, so it can be used for tests + * + * @return PHPUnit_Framework_MockObject_MockObject|Varien_Data_Collection + */ + protected function _createAttrCollectionMock() + { + $attributeCollection = $this->getMock('Varien_Data_Collection', array('getEntityTypeCode')); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + foreach ($this->_attributes as $attributeData) { + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Eav_Model_Entity_Attribute_Abstract' + ); + $arguments['data'] = $attributeData; + $attribute = $this->getMockForAbstractClass('Mage_Eav_Model_Entity_Attribute_Abstract', + $arguments, '', true, true, true, array('_construct', 'getBackend') + ); + $attribute->expects($this->any()) + ->method('getBackend') + ->will($this->returnSelf()); + $attribute->expects($this->any()) + ->method('getTable') + ->will($this->returnValue($attributeData['table'])); + $attributeCollection->addItem($attribute); + } + return $attributeCollection; + } + + /** + * Create mock of customer storage, so it can be used for tests + * + * @return PHPUnit_Framework_MockObject_MockObject|Mage_ImportExport_Model_Resource_Customer_Storage + */ + protected function _createCustomerStorageMock() + { + $customerStorage = $this->getMock('Mage_ImportExport_Model_Resource_Customer_Storage', array('load'), + array(), '', false); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + foreach ($this->_customers as $customerData) { + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + 'Mage_Customer_Model_Customer' + ); + $arguments['data'] = $customerData; + /** @var $customer Mage_Customer_Model_Customer */ + $customer = $this->getMock('Mage_Customer_Model_Customer', array('_construct'), $arguments); + $customerStorage->addCustomer($customer); + } + return $customerStorage; + } + + /** + * Create simple mock of customer entity, so it can be used for tests + * + * @return PHPUnit_Framework_MockObject_MockObject + */ + protected function _createCustomerEntityMock() + { + $customerEntity = $this->getMock('stdClass', array('filterEntityCollection', 'setParameters')); + $customerEntity->expects($this->any()) + ->method('filterEntityCollection') + ->will($this->returnArgument(0)); + $customerEntity->expects($this->any()) + ->method('setParameters') + ->will($this->returnSelf()); + return $customerEntity; + } + /** * Get websites stub * diff --git a/dev/tests/unit/testsuite/Mage/Page/Block/Html/HeaderTest.php b/dev/tests/unit/testsuite/Mage/Page/Block/Html/HeaderTest.php index b47d9b9e477b8097f49dd2c0135a9122fde80528..b335bb2d68c184ca26a04b005ad09debe4d83a96 100644 --- a/dev/tests/unit/testsuite/Mage/Page/Block/Html/HeaderTest.php +++ b/dev/tests/unit/testsuite/Mage/Page/Block/Html/HeaderTest.php @@ -47,7 +47,10 @@ class Mage_Page_Block_Html_HeaderTest extends PHPUnit_Framework_TestCase ->method('getDir') ->will($this->returnValue(__DIR__ . DIRECTORY_SEPARATOR . '_files')); - $helper = $this->getMock('Mage_Core_Helper_File_Storage_Database', array('checkDbUsage')); + $helper = $this->getMockBuilder('Mage_Core_Helper_File_Storage_Database') + ->setMethods(array('checkDbUsage')) + ->disableOriginalConstructor() + ->getMock(); $helper->expects($this->once()) ->method('checkDbUsage') ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Mage/Sales/Model/Order/Shipment/TrackTest.php b/dev/tests/unit/testsuite/Mage/Sales/Model/Order/Shipment/TrackTest.php index a6e26a3d19eb2a0a016b215377832e8e6395f168..39dcf4858f3de4f58bb4018ca11ac973e139e1d8 100644 --- a/dev/tests/unit/testsuite/Mage/Sales/Model/Order/Shipment/TrackTest.php +++ b/dev/tests/unit/testsuite/Mage/Sales/Model/Order/Shipment/TrackTest.php @@ -34,8 +34,8 @@ class Mage_Sales_Model_Order_Shipment_TrackTest extends PHPUnit_Framework_TestCa protected function setUp() { - $helper = new Magento_Test_Helper_ObjectManager($this); - $this->_model = $helper->getModel('Mage_Sales_Model_Order_Shipment_Track'); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getModel('Mage_Sales_Model_Order_Shipment_Track'); } public function testAddData() @@ -66,4 +66,37 @@ class Mage_Sales_Model_Order_Shipment_TrackTest extends PHPUnit_Framework_TestCa $this->_model->setShipment($shipmentMock); $this->assertEquals($storeId, $this->_model->getStoreId()); } + + public function testSetGetNumber() + { + $this->assertNull($this->_model->getNumber()); + $this->assertNull($this->_model->getTrackNumber()); + + $this->_model->setNumber('test'); + + $this->assertEquals('test', $this->_model->getNumber()); + $this->assertEquals('test', $this->_model->getTrackNumber()); + } + + /** + * @dataProvider isCustomDataProvider + * @param bool $expectedResult + * @param string $carrierCodeToSet + */ + public function testIsCustom($expectedResult, $carrierCodeToSet) + { + $this->_model->setCarrierCode($carrierCodeToSet); + $this->assertEquals($expectedResult, $this->_model->isCustom()); + } + + /** + * @return array + */ + public static function isCustomDataProvider() + { + return array( + array(true, Mage_Sales_Model_Order_Shipment_Track::CUSTOM_CARRIER_CODE), + array(false, 'ups'), + ); + } } diff --git a/dev/tests/unit/testsuite/Magento/Convert/ExcelTest.php b/dev/tests/unit/testsuite/Magento/Convert/ExcelTest.php index 0f96c289892731b6dcf2f9e59bcc35bb6c724793..8e9fff40595470f94fdd19159a1d0dbb64c1baf7 100644 --- a/dev/tests/unit/testsuite/Magento/Convert/ExcelTest.php +++ b/dev/tests/unit/testsuite/Magento/Convert/ExcelTest.php @@ -52,7 +52,7 @@ class Magento_Convert_ExcelTest extends PHPUnit_Framework_TestCase /** * Callback method * - * @param array $row + * @param array $row * @return array */ public function callbackMethod($row) @@ -97,14 +97,14 @@ class Magento_Convert_ExcelTest extends PHPUnit_Framework_TestCase */ protected function _writeFile($callback = false) { - $ioFile = new Varien_Io_File(); + $adapter = new Magento_Filesystem_Adapter_Local(); + $filesystem = new Magento_Filesystem($adapter); $name = md5(microtime()); $file = TESTS_TEMP_DIR . DIRECTORY_SEPARATOR . $name . '.xml'; - $ioFile->open(array('path' => TESTS_TEMP_DIR)); - $ioFile->streamOpen($file, 'w+'); - $ioFile->streamLock(true); + $stream = $filesystem->createAndOpenStream($file, 'w+', TESTS_TEMP_DIR); + $stream->lock(true); if (!$callback) { $convert = new Magento_Convert_Excel(new ArrayIterator($this->_testData)); @@ -112,9 +112,9 @@ class Magento_Convert_ExcelTest extends PHPUnit_Framework_TestCase $convert = new Magento_Convert_Excel(new ArrayIterator($this->_testData), array($this, 'callbackMethod')); } - $convert->write($ioFile); - $ioFile->streamUnlock(); - $ioFile->streamClose(); + $convert->write($stream); + $stream->unlock(); + $stream->close(); return $file; } diff --git a/dev/tests/unit/testsuite/Magento/Di/Definition/RuntimeDefinition/ZendTest.php b/dev/tests/unit/testsuite/Magento/Di/Definition/RuntimeDefinition/ZendTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3d8b13defa99d1df8451d0349dd489b6f3514887 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Definition/RuntimeDefinition/ZendTest.php @@ -0,0 +1,49 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Magento_Di_Definition_RuntimeDefinition_ZendTest extends PHPUnit_Framework_TestCase +{ + /**#@+ + * Class for test + */ + const TEST_CLASS_NAME = 'stdClass'; + const TEST_CLASS_INSTANTIATOR = '__construct'; + /**#@-*/ + + public function testGetInstantiator() + { + $generatorClass = $this->getMock('Magento_Di_Generator_Class'); + $generatorClass->expects($this->once()) + ->method('generateForConstructor') + ->with(self::TEST_CLASS_NAME); + + $model = new Magento_Di_Definition_RuntimeDefinition_Zend( + null, + array(self::TEST_CLASS_NAME), + $generatorClass + ); + $this->assertEquals(self::TEST_CLASS_INSTANTIATOR, $model->getInstantiator(self::TEST_CLASS_NAME)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/ClassTest.php b/dev/tests/unit/testsuite/Magento/Di/Generator/ClassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2331bad61b08c6f07120598e0e4d6dafebfaa8ff --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/ClassTest.php @@ -0,0 +1,58 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_ClassTest extends PHPUnit_Framework_TestCase +{ + /** + * Test class name for generation test + */ + const TEST_CLASS_NAME = 'Magento_Di_Generator_TestAsset_TestGenerationClass'; + + /** + * Expected arguments for test class constructor + * + * @var array + */ + protected $_expectedArguments = array( + 0 => 'Magento\Di\Generator\TestAsset\ParentClass', + 1 => 'Magento\Di\Generator\TestAsset\SourceClass', + 2 => 'Not_Existing_Class', + ); + + public function testGenerateForConstructor() + { + $generatorMock = $this->getMock('Magento_Di_Generator', array('generateClass'), array(), '', false); + foreach ($this->_expectedArguments as $order => $class) { + $generatorMock->expects($this->at($order)) + ->method('generateClass') + ->with($class); + } + + $classGenerator = new Magento_Di_Generator_Class($generatorMock); + $classGenerator->generateForConstructor(self::TEST_CLASS_NAME); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/CodeGenerator/ZendTest.php b/dev/tests/unit/testsuite/Magento/Di/Generator/CodeGenerator/ZendTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a9fe7e29135ce3b869ed8fcef123ea814a41634f --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/CodeGenerator/ZendTest.php @@ -0,0 +1,330 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_CodeGenerator_ZendTest extends PHPUnit_Framework_TestCase +{ + /**#@+ + * Possible flags for assertion + */ + const FLAG_CONST = 'const'; + const FLAG_STATIC = 'static'; + const FLAG_FINAL = 'final'; + const FLAG_ABSTRACT = 'abstract'; + const FLAG_REFERENCE = 'passedByReference'; + /**#@-*/ + + /** + * @var Magento_Di_Generator_CodeGenerator_Zend + */ + protected $_model; + + /** + * Methods to verify flags + * + * @var array + */ + protected $_flagVerification = array( + self::FLAG_CONST => 'isConst', + self::FLAG_STATIC => 'isStatic', + self::FLAG_FINAL => 'isFinal', + self::FLAG_ABSTRACT => 'isAbstract', + self::FLAG_REFERENCE => 'getPassedByReference', + ); + + /** + * Doc block test data + * + * @var array + */ + protected $_docBlockData = array( + 'shortDescription' => 'test_short_description', + 'longDescription' => 'test_long_description', + 'tags' => array( + 'tag1' => array('name' => 'tag1', 'description' => 'data1'), + 'tag2' => array('name' => 'tag2', 'description' => 'data2'), + ), + ); + + /** + * Method test data + * + * @var array + */ + protected $_methodData = array( + 'testMethod1' => array( + 'name' => 'testMethod1', + 'final' => true, + 'static' => true, + 'parameters' => array( + array('name' => 'data', 'type' => 'array', 'defaultValue' => array(), 'passedByReference' => true), + ), + 'body' => 'return 1;', + 'docblock' => array( + 'shortDescription' => 'test short description' + ), + ), + '_testMethod2' => array( + 'name' => '_testMethod2', + 'visibility' => 'private', + 'abstract' => true, + 'parameters' => array( + array('name' => 'data', 'defaultValue' => 'test_default'), + array('name' => 'flag', 'defaultValue' => true), + ), + 'body' => 'return 2;', + 'docblock' => array( + 'shortDescription' => 'test short description', + 'longDescription' => 'test long description', + 'tags' => array( + 'tag1' => array('name' => 'tag1', 'description' => 'data1'), + 'tag2' => array('name' => 'tag2', 'description' => 'data2'), + ), + ), + ), + 'testMethod3' => array( + 'name' => 'testMethod3', + 'body' => 'return 3;', + ), + ); + + /** + * Property test data + * + * @var array + */ + protected $_propertyData = array( + 'TEST_CONSTANT' => array( + 'name' => 'TEST_CONSTANT', + 'const' => true, + 'defaultValue' => 'default constant value', + 'docblock' => array('shortDescription' => 'test description'), + ), + '_protectedProperty' => array( + 'name' => '_protectedProperty', + 'visibility' => 'protected', + 'static' => 'true', + 'docblock' => array( + 'shortDescription' => 'Object Manager instance', + 'tags' => array( + 'var' => array('name' => 'var', 'description' => 'tag description') + ) + ), + ), + 'publicProperty' => array( + 'name' => 'publicProperty', + ), + ); + + protected function setUp() + { + $this->_model = new Magento_Di_Generator_CodeGenerator_Zend(); + } + + protected function tearDown() + { + unset($this->_model); + } + + public function testSetClassDocBlock() + { + $this->_model->setClassDocBlock($this->_docBlockData); + $actualDocBlock = $this->_model->getDocBlock(); + + $this->_assertDocBlockData($this->_docBlockData, $actualDocBlock); + } + + /** + * @param array $expectedDocBlock + * @param Zend\Code\Generator\DocBlockGenerator $actualDocBlock + */ + protected function _assertDocBlockData( + array $expectedDocBlock, + Zend\Code\Generator\DocBlockGenerator $actualDocBlock + ) { + // assert plain string data + foreach ($expectedDocBlock as $propertyName => $propertyData) { + if (is_string($propertyData)) { + $this->assertAttributeEquals($propertyData, $propertyName, $actualDocBlock); + } + } + + // assert tags + if (isset($expectedDocBlock['tags'])) { + $expectedTagsData = $expectedDocBlock['tags']; + $actualTags = $actualDocBlock->getTags(); + $this->assertSameSize($expectedTagsData, $actualTags); + /** @var $actualTag Zend\Code\Generator\DocBlock\Tag */ + foreach ($actualTags as $actualTag) { + $tagName = $actualTag->getName(); + $this->assertArrayHasKey($tagName, $expectedTagsData); + $this->assertEquals($expectedTagsData[$tagName]['name'], $tagName); + $this->assertEquals($expectedTagsData[$tagName]['description'], $actualTag->getDescription()); + } + } + } + + public function testAddMethods() + { + $this->_model->addMethods($this->_methodData); + $actualMethods = $this->_model->getMethods(); + + $this->assertSameSize($this->_methodData, $actualMethods); + + /** @var $method Zend\Code\Generator\MethodGenerator */ + foreach ($actualMethods as $methodName => $method) { + $this->assertArrayHasKey($methodName, $this->_methodData); + $expectedMethodData = $this->_methodData[$methodName]; + + $this->assertEquals($expectedMethodData['name'], $method->getName()); + $this->assertEquals($expectedMethodData['body'], $method->getBody()); + + // assert flags + $this->_assertFlag(self::FLAG_STATIC, $expectedMethodData, $method); + $this->_assertFlag(self::FLAG_FINAL, $expectedMethodData, $method); + $this->_assertFlag(self::FLAG_ABSTRACT, $expectedMethodData, $method); + + // assert visibility + $this->_assertVisibility($expectedMethodData, $method); + + // assert parameters + if (isset($expectedMethodData['parameters'])) { + $actualParameters = $method->getParameters(); + $this->assertSameSize($expectedMethodData['parameters'], $actualParameters); + foreach ($expectedMethodData['parameters'] as $parameterData) { + $parameterName = $parameterData['name']; + $this->assertArrayHasKey($parameterName, $actualParameters); + /** @var $actualParameter Zend\Code\Generator\ParameterGenerator */ + $actualParameter = $actualParameters[$parameterName]; + $this->assertEquals($parameterName, $actualParameter->getName()); + + // assert reference flag + $this->_assertFlag(self::FLAG_REFERENCE, $parameterData, $actualParameter); + + // assert parameter type + if (isset($parameterData['type'])) { + $this->assertEquals($parameterData['type'], $actualParameter->getType()); + } + + // assert default value + if (isset($parameterData['defaultValue'])) { + /** @var $actualDefaultValue Zend\Code\Generator\ValueGenerator */ + $actualDefaultValue = $actualParameter->getDefaultValue(); + $this->assertEquals($parameterData['defaultValue'], $actualDefaultValue->getValue()); + } + } + } + + // assert docblock + if (isset($expectedMethodData['docblock'])) { + $actualDocBlock = $method->getDocBlock(); + $this->_assertDocBlockData($expectedMethodData['docblock'], $actualDocBlock); + } + } + } + + /** + * @param string $flagType + * @param array $expectedData + * @param object $actualObject + */ + protected function _assertFlag($flagType, array $expectedData, $actualObject) + { + $expectedFlagValue = isset($expectedData[$flagType]) && $expectedData[$flagType]; + $flagGetter = $this->_flagVerification[$flagType]; + $this->assertEquals($expectedFlagValue, $actualObject->{$flagGetter}()); + } + + /** + * @param array $expectedData + * @param Zend\Code\Generator\AbstractMemberGenerator $actualObject + */ + protected function _assertVisibility(array $expectedData, Zend\Code\Generator\AbstractMemberGenerator $actualObject) + { + $expectedVisibility = isset($expectedData['visibility']) ? $expectedData['visibility'] : 'public'; + $this->assertEquals($expectedVisibility, $actualObject->getVisibility()); + } + + /** + * Correct behaviour of addMethodFromGenerator is already tested in testAddMethods + * + * @expectedException InvalidArgumentException + * @expectedExceptionMessage addMethodFromGenerator() expects string for name + */ + public function testAddMethodFromGenerator() + { + $invalidMethod = new Zend\Code\Generator\MethodGenerator(); + $this->_model->addMethodFromGenerator($invalidMethod); + } + + public function testAddProperties() + { + $this->_model->addProperties($this->_propertyData); + $actualProperties = $this->_model->getProperties(); + + $this->assertSameSize($this->_propertyData, $actualProperties); + + /** @var $property Zend\Code\Generator\PropertyGenerator */ + foreach ($actualProperties as $propertyName => $property) { + $this->assertArrayHasKey($propertyName, $this->_propertyData); + $expectedPropertyData = $this->_propertyData[$propertyName]; + + $this->assertEquals($expectedPropertyData['name'], $property->getName()); + + // assert flags + $this->_assertFlag(self::FLAG_CONST, $expectedPropertyData, $property); + $this->_assertFlag(self::FLAG_STATIC, $expectedPropertyData, $property); + + // assert visibility + $this->_assertVisibility($expectedPropertyData, $property); + + // assert default value + if (isset($expectedPropertyData['defaultValue'])) { + /** @var $actualDefaultValue Zend\Code\Generator\ValueGenerator */ + $actualDefaultValue = $property->getDefaultValue(); + $this->assertEquals($expectedPropertyData['defaultValue'], $actualDefaultValue->getValue()); + } + + // assert docblock + if (isset($expectedPropertyData['docblock'])) { + $actualDocBlock = $property->getDocBlock(); + $this->_assertDocBlockData($expectedPropertyData['docblock'], $actualDocBlock); + } + } + } + + /** + * Correct behaviour of addPropertyFromGenerator is already tested in testAddProperties + * + * @expectedException InvalidArgumentException + * @expectedExceptionMessage addPropertyFromGenerator() expects string for name + */ + public function testAddPropertyFromGenerator() + { + $invalidProperty = new Zend\Code\Generator\PropertyGenerator(); + $this->_model->addPropertyFromGenerator($invalidProperty); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/EntityAbstractTest.php b/dev/tests/unit/testsuite/Magento/Di/Generator/EntityAbstractTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0787c7101c40abcd777d0e741eb17aa78685665b --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/EntityAbstractTest.php @@ -0,0 +1,387 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_EntityAbstractTest extends PHPUnit_Framework_TestCase +{ + /**#@+ + * Source and result class parameters + */ + const SOURCE_CLASS = 'Varien_Object'; + const RESULT_CLASS = 'Varien_Object_MyResult'; + const RESULT_FILE = 'MyResult/MyResult.php'; + const RESULT_DIRECTORY = 'MyResult'; + /**#@-*/ + + /** + * Basic code generation directory + */ + const GENERATION_DIRECTORY = 'generation'; + + /**#@+ + * Generated code before and after code style fix + */ + const SOURCE_CODE = "a = 1; b = array (); {\n\n some source code \n\n}"; + const RESULT_CODE = "a = 1; b = array(); {\n some source code \n}"; + /**#@-*/ + + /** + * Model under test + * + * @var Magento_Di_Generator_EntityAbstract|PHPUnit_Framework_MockObject_MockObject + */ + protected $_model; + + protected function setUp() + { + $this->_model = $this->getMockForAbstractClass('Magento_Di_Generator_EntityAbstract'); + } + + protected function tearDown() + { + unset($this->_model); + } + + public function testConstruct() + { + // without parameters + $this->assertAttributeEmpty('_sourceClassName', $this->_model); + $this->assertAttributeEmpty('_resultClassName', $this->_model); + $this->assertAttributeInstanceOf('Magento_Di_Generator_Io', '_ioObject', $this->_model); + $this->assertAttributeInstanceOf('Magento_Di_Generator_CodeGenerator_Zend', '_classGenerator', $this->_model); + $this->assertAttributeInstanceOf('Magento_Autoload_IncludePath', '_autoloader', $this->_model); + + // with source class name + $this->_model = $this->getMockForAbstractClass( + 'Magento_Di_Generator_EntityAbstract', array(self::SOURCE_CLASS) + ); + $this->assertAttributeEquals(self::SOURCE_CLASS, '_sourceClassName', $this->_model); + $this->assertAttributeEquals(self::SOURCE_CLASS . 'Abstract', '_resultClassName', $this->_model); + + // with all arguments + $ioObject = $this->getMock('Magento_Di_Generator_Io', array(), array(), '', false); + $codeGenerator = $this->getMock('Magento_Di_Generator_CodeGenerator_Zend', array(), array(), '', false); + $autoloader = $this->getMock('Magento_Autoload_IncludePath', array(), array(), '', false); + + $this->_model = $this->getMockForAbstractClass( + 'Magento_Di_Generator_EntityAbstract', + array(self::SOURCE_CLASS, self::RESULT_CLASS, $ioObject, $codeGenerator, $autoloader) + ); + $this->assertAttributeEquals(self::RESULT_CLASS, '_resultClassName', $this->_model); + $this->assertAttributeEquals($ioObject, '_ioObject', $this->_model); + $this->assertAttributeEquals($codeGenerator, '_classGenerator', $this->_model); + $this->assertAttributeEquals($autoloader, '_autoloader', $this->_model); + } + + /** + * Data provider for testGenerate method + * + * @return array + */ + public function generateDataProvider() + { + return array( + 'no_source_class' => array( + '$errors' => array('Source class ' . self::SOURCE_CLASS . ' doesn\'t exist.'), + '$isGeneration' => false, + '$classExistsFirst' => false, + ), + 'result_class_exists' => array( + '$errors' => array('Result class ' . self::RESULT_CLASS . ' already exists.'), + '$isGeneration' => false, + '$classExistsFirst' => true, + '$classExistsSecond' => true, + ), + 'cant_create_generation_directory' => array( + '$errors' => array('Can\'t create directory ' . self::GENERATION_DIRECTORY . '.'), + '$isGeneration' => false, + '$classExistsFirst' => true, + '$classExistsSecond' => false, + '$makeGeneration' => false, + + ), + 'cant_create_result_directory' => array( + '$errors' => array('Can\'t create directory ' . self::RESULT_DIRECTORY . '.'), + '$isGeneration' => false, + '$classExistsFirst' => true, + '$classExistsSecond' => false, + '$makeGeneration' => true, + '$makeResultFile' => false + ), + 'result_file_exists' => array( + '$errors' => array('Result file ' . self::RESULT_FILE . ' already exists.'), + '$isGeneration' => false, + '$classExistsFirst' => true, + '$classExistsSecond' => false, + '$makeGeneration' => true, + '$makeResultFile' => true, + '$fileExists' => true, + ), + 'generate_no_data' => array( + '$errors' => array('Can\'t generate source code.'), + '$isGeneration' => true, + '$classExistsFirst' => true, + '$classExistsSecond' => false, + '$makeGeneration' => true, + '$makeResultFile' => true, + '$fileExists' => true, + '$isValid' => false + ), + 'generate_ok' => array(), + ); + } + + /** + * @param array $errors + * @param bool $isGeneration + * @param bool $classExistsFirst + * @param bool $classExistsSecond + * @param bool $makeGeneration + * @param bool $makeResultFile + * @param bool $fileExists + * @param bool $isValid + * + * @dataProvider generateDataProvider + * @covers Magento_Di_Generator_EntityAbstract::generate + * @covers Magento_Di_Generator_EntityAbstract::getErrors + * @covers Magento_Di_Generator_EntityAbstract::_getSourceClassName + * @covers Magento_Di_Generator_EntityAbstract::_getResultClassName + * @covers Magento_Di_Generator_EntityAbstract::_getDefaultResultClassName + * @covers Magento_Di_Generator_EntityAbstract::_generateCode + * @covers Magento_Di_Generator_EntityAbstract::_addError + * @covers Magento_Di_Generator_EntityAbstract::_validateData + * @covers Magento_Di_Generator_EntityAbstract::_getClassDocBlock + * @covers Magento_Di_Generator_EntityAbstract::_getGeneratedCode + * @covers Magento_Di_Generator_EntityAbstract::_fixCodeStyle + */ + public function testGenerate( + $errors = array(), + $isGeneration = true, + $classExistsFirst = true, + $classExistsSecond = false, + $makeGeneration = true, + $makeResultFile = true, + $fileExists = false, + $isValid = true + ) { + if ($isGeneration) { + $arguments = $this->_prepareMocksForGenerateCode($isValid); + } else { + $arguments = $this->_prepareMocksForValidateData( + $classExistsFirst, + $classExistsSecond, + $makeGeneration, + $makeResultFile, + $fileExists + ); + } + $abstractGetters = array('_getClassProperties', '_getClassMethods'); + $this->_model = $this->getMockForAbstractClass( + 'Magento_Di_Generator_EntityAbstract', $arguments, '', true, true, true, $abstractGetters + ); + // we need to mock abstract methods to set correct return value type + foreach ($abstractGetters as $methodName) { + $this->_model->expects($this->any()) + ->method($methodName) + ->will($this->returnValue(array())); + } + + $result = $this->_model->generate(); + if ($errors) { + $this->assertFalse($result); + $this->assertEquals($errors, $this->_model->getErrors()); + } else { + $this->assertTrue($result); + $this->assertEmpty($this->_model->getErrors()); + } + } + + /** + * Prepares mocks for validation verification + * + * @param bool $classExistsFirst + * @param bool $classExistsSecond + * @param bool $makeGeneration + * @param bool $makeResultFile + * @param bool $fileExists + * @return array + */ + protected function _prepareMocksForValidateData( + $classExistsFirst = true, + $classExistsSecond = false, + $makeGeneration = true, + $makeResultFile = true, + $fileExists = false + ) { + $ioObject = $this->getMock('Magento_Di_Generator_Io', + array( + 'getResultFileName', + 'makeGenerationDirectory', + 'makeResultFileDirectory', + 'fileExists', + 'getGenerationDirectory', + 'getResultFileDirectory', + 'writeResultFile' + ), + array(), '', false + ); + $autoloader = $this->getMock('Magento_Autoload_IncludePath', array('getFile'), array(), '', false); + + $ioObject->expects($this->any()) + ->method('getResultFileName') + ->with(self::RESULT_CLASS) + ->will($this->returnValue(self::RESULT_FILE)); + $ioObject->expects($this->any()) + ->method('getGenerationDirectory') + ->will($this->returnValue(self::GENERATION_DIRECTORY)); + $ioObject->expects($this->any()) + ->method('getResultFileDirectory') + ->will($this->returnValue(self::RESULT_DIRECTORY)); + + $autoloader->staticExpects($this->at(0)) + ->method('getFile') + ->with(self::SOURCE_CLASS) + ->will($this->returnValue($classExistsFirst)); + if ($classExistsFirst) { + $autoloader->staticExpects($this->at(1)) + ->method('getFile') + ->with(self::RESULT_CLASS) + ->will($this->returnValue($classExistsSecond)); + } + + $expectedInvocations = 1; + if ($classExistsFirst) { + $expectedInvocations = 2; + } + $autoloader->staticExpects($this->exactly($expectedInvocations)) + ->method('getFile'); + + $expectedInvocations = 1; + if (!$classExistsFirst || $classExistsSecond) { + $expectedInvocations = 0; + } + $ioObject->expects($this->exactly($expectedInvocations)) + ->method('makeGenerationDirectory') + ->will($this->returnValue($makeGeneration)); + + $this->_prepareIoObjectExpectations( + $ioObject, + $classExistsFirst, + $classExistsSecond, + $makeGeneration, + $makeResultFile, + $fileExists + ); + + return array( + 'source_class' => self::SOURCE_CLASS, + 'result_class' => self::RESULT_CLASS, + 'io_object' => $ioObject, + 'code_generator' => null, + 'autoloader' => $autoloader + ); + } + + /** + * @param $ioObject PHPUnit_Framework_MockObject_MockObject + * @param bool $classExistsFirst + * @param bool $classExistsSecond + * @param bool $makeGeneration + * @param bool $makeResultFile + * @param bool $fileExists + */ + protected function _prepareIoObjectExpectations( + $ioObject, + $classExistsFirst, + $classExistsSecond, + $makeGeneration, + $makeResultFile, + $fileExists + ) { + if ($classExistsFirst && !$classExistsSecond && $makeGeneration) { + $ioObject->expects($this->once()) + ->method('makeResultFileDirectory') + ->with(self::RESULT_CLASS) + ->will($this->returnValue($makeResultFile)); + } + + if ($classExistsFirst && !$classExistsSecond && $makeGeneration && $makeResultFile) { + $ioObject->expects($this->once()) + ->method('fileExists') + ->with(self::RESULT_FILE) + ->will($this->returnValue($fileExists)); + } + } + + /** + * Prepares mocks for code generation test + * + * @param bool $isValid + * @return array + */ + protected function _prepareMocksForGenerateCode($isValid) + { + $mocks = $this->_prepareMocksForValidateData(); + + $codeGenerator = $this->getMock('Magento_Di_Generator_CodeGenerator_Zend', + array('setName', 'addProperties', 'addMethods', 'setClassDocBlock', 'generate'), array(), '', false + ); + $codeGenerator->expects($this->once()) + ->method('setName') + ->with(self::RESULT_CLASS) + ->will($this->returnSelf()); + $codeGenerator->expects($this->once()) + ->method('addProperties') + ->will($this->returnSelf()); + $codeGenerator->expects($this->once()) + ->method('addMethods') + ->will($this->returnSelf()); + $codeGenerator->expects($this->once()) + ->method('setClassDocBlock') + ->with($this->isType('array')) + ->will($this->returnSelf()); + + $codeGenerator->expects($this->once()) + ->method('generate') + ->will($this->returnValue($isValid ? self::SOURCE_CODE : null)); + + /** @var $ioObject PHPUnit_Framework_MockObject_MockObject */ + $ioObject = $mocks['io_object']; + if ($isValid) { + $ioObject->expects($this->once()) + ->method('writeResultFile') + ->with(self::RESULT_FILE, self::RESULT_CODE); + } + + return array( + 'source_class' => $mocks['source_class'], + 'result_class' => $mocks['result_class'], + 'io_object' => $ioObject, + 'code_generator' => $codeGenerator, + 'autoloader' => $mocks['autoloader'], + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/EntityTestAbstract.php b/dev/tests/unit/testsuite/Magento/Di/Generator/EntityTestAbstract.php new file mode 100644 index 0000000000000000000000000000000000000000..99d02c22213cf4fc1ba1ba8ba9b76a13b23ab069 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/EntityTestAbstract.php @@ -0,0 +1,121 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_EntityTestAbstract extends PHPUnit_Framework_TestCase +{ + /**#@+ + * Source and result class parameters + */ + const SOURCE_CLASS = 'ClassName'; + const RESULT_CLASS = 'ClassNameFactory'; + const RESULT_FILE = 'ClassNameFactory.php'; + /**#@-*/ + + /** + * Generated code + */ + const CODE = "a = 1;"; + + protected static $_expectedMethods = array(); + + /** + * @return Magento_Di_Generator_Io|PHPUnit_Framework_MockObject_MockObject + */ + protected function _getIoObjectMock() + { + $ioObjectMock = $this->getMock('Magento_Di_Generator_Io', + array('getResultFileName', 'makeGenerationDirectory', 'makeResultFileDirectory', 'fileExists', + 'writeResultFile' + ), array(), '', false + ); + $ioObjectMock->expects($this->any()) + ->method('getResultFileName') + ->will($this->returnValue(static::RESULT_FILE)); + $ioObjectMock->expects($this->any()) + ->method('makeGenerationDirectory') + ->will($this->returnValue(true)); + $ioObjectMock->expects($this->any()) + ->method('makeResultFileDirectory') + ->will($this->returnValue(true)); + $ioObjectMock->expects($this->any()) + ->method('fileExists') + ->will($this->returnValue(false)); + $ioObjectMock->expects($this->once()) + ->method('writeResultFile') + ->with(static::RESULT_FILE, static::CODE); + + return $ioObjectMock; + } + + /** + * @return Magento_Autoload_IncludePath|PHPUnit_Framework_MockObject_MockObject + */ + protected function _getAutoloaderMock() + { + $autoLoaderMock = $this->getMock('Magento_Autoload_IncludePath', array('getFile'), array(), '', false); + $autoLoaderMock->staticExpects($this->at(0)) + ->method('getFile') + ->with(static::SOURCE_CLASS) + ->will($this->returnValue(true)); + $autoLoaderMock->staticExpects($this->at(1)) + ->method('getFile') + ->with(static::RESULT_CLASS) + ->will($this->returnValue(false)); + + return $autoLoaderMock; + } + + /** + * @param array $methodNames + * @return Magento_Di_Generator_CodeGenerator_Zend|PHPUnit_Framework_MockObject_MockObject + */ + protected function _getCodeGeneratorMock(array $methodNames) + { + $codeGeneratorMock + = $this->getMock('Magento_Di_Generator_CodeGenerator_Zend', $methodNames, array(), '', false); + $codeGeneratorMock->expects($this->once()) + ->method('setName') + ->with(static::RESULT_CLASS) + ->will($this->returnSelf()); + $codeGeneratorMock->expects($this->once()) + ->method('addProperties') + ->will($this->returnSelf()); + $codeGeneratorMock->expects($this->once()) + ->method('addMethods') + ->with(static::$_expectedMethods) + ->will($this->returnSelf()); + $codeGeneratorMock->expects($this->once()) + ->method('setClassDocBlock') + ->with($this->isType('array')) + ->will($this->returnSelf()); + $codeGeneratorMock->expects($this->once()) + ->method('generate') + ->will($this->returnValue(self::CODE)); + + return $codeGeneratorMock; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Di/Generator/FactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..48cd6c2c00e01da0014ad6c6f11449c4a45d4d1c --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/FactoryTest.php @@ -0,0 +1,146 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_FactoryTest extends Magento_Di_Generator_EntityTestAbstract +{ + /** + * Generic object manager factory interface + */ + const FACTORY_INTERFACE = '\Magento_ObjectManager_Factory'; + + /**#@+ + * Source and result class parameters + */ + const SOURCE_CLASS = 'ClassName'; + const RESULT_CLASS = 'ClassNameFactory'; + const RESULT_FILE = 'ClassNameFactory.php'; + /**#@-*/ + + /** + * Expected factory methods + * + * @var array + */ + protected static $_expectedMethods = array( + array( + 'name' => '__construct', + 'parameters' => + array( + array( + 'name' => 'objectManager', + 'type' => '\\Magento_ObjectManager', + ), + ), + 'body' => '$this->_objectManager = $objectManager;', + 'docblock' => + array( + 'shortDescription' => 'Factory constructor', + 'tags' => + array( + array( + 'name' => 'param', + 'description' => '\\Magento_ObjectManager $objectManager', + ), + ), + ), + ), + array( + 'name' => 'createFromArray', + 'parameters' => + array( + array( + 'name' => 'data', + 'type' => 'array', + 'defaultValue' => + array(), + ), + ), + 'body' => 'return $this->_objectManager->create(self::CLASS_NAME, $data, false);', + 'docblock' => + array( + 'shortDescription' => 'Create class instance with specified parameters', + 'tags' => + array( + array( + 'name' => 'param', + 'description' => 'array $data', + ), + array( + 'name' => 'return', + 'description' => '\\ClassName', + ), + ), + ), + ), + ); + + /** + * Model under test + * + * @var Magento_Di_Generator_Factory + */ + protected $_model; + + protected function setUp() + { + $ioObjectMock = $this->_getIoObjectMock(); + + $methods = array('setImplementedInterfaces', 'setName', 'addProperties', 'addMethods', 'setClassDocBlock', + 'generate' + ); + $codeGeneratorMock = $this->_getCodeGeneratorMock($methods); + $codeGeneratorMock->expects($this->once()) + ->method('setImplementedInterfaces') + ->with(array(self::FACTORY_INTERFACE)) + ->will($this->returnSelf()); + + $autoLoaderMock = $this->_getAutoloaderMock(); + + /** @var $ioObjectMock Magento_Di_Generator_Io */ + /** @var $codeGeneratorMock Magento_Di_Generator_CodeGenerator_Zend */ + /** @var $autoLoaderMock Magento_Autoload_IncludePath */ + $this->_model = new Magento_Di_Generator_Factory(self::SOURCE_CLASS, self::RESULT_CLASS, $ioObjectMock, + $codeGeneratorMock, $autoLoaderMock + ); + } + + protected function tearDown() + { + unset($this->_model); + } + + /** + * @covers Magento_Di_Generator_Factory::_generateCode + * @covers Magento_Di_Generator_Factory::_getClassMethods + */ + public function testGenerate() + { + $result = $this->_model->generate(); + $this->assertTrue($result); + $this->assertEmpty($this->_model->getErrors()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/IoTest.php b/dev/tests/unit/testsuite/Magento/Di/Generator/IoTest.php new file mode 100644 index 0000000000000000000000000000000000000000..046aa2b2409d967b489792998cf333af30814d40 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/IoTest.php @@ -0,0 +1,157 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_IoTest extends PHPUnit_Framework_TestCase +{ + /**#@+ + * Source and result class parameters + */ + const DIRECTORY_SEPARATOR = '|'; + const GENERATION_DIRECTORY = 'generation_directory'; + const CLASS_NAME = 'class_name'; + const CLASS_FILE_NAME = 'class|file|name'; + const FILE_NAME = 'test_file'; + const FILE_CONTENT = "content"; + /**#@-*/ + + /** + * Basic code generation directory + * + * @var string + */ + protected $_generationDirectory; + + /** + * @var Magento_Di_Generator_Io + */ + protected $_object; + + /** + * @var Varien_Io_File|PHPUnit_Framework_MockObject_MockObject + */ + protected $_ioObjectMock; + + /** + * @var Magento_Autoload_IncludePath|PHPUnit_Framework_MockObject_MockObject + */ + protected $_autoLoaderMock; + + protected function setUp() + { + $this->_generationDirectory + = rtrim(self::GENERATION_DIRECTORY, self::DIRECTORY_SEPARATOR) . self::DIRECTORY_SEPARATOR; + + $this->_ioObjectMock = $this->getMock('Varien_Io_File', + array('dirsep', 'isWriteable', 'mkdir', 'fileExists', 'write') + ); + $this->_ioObjectMock->expects($this->any()) + ->method('dirsep') + ->will($this->returnValue(self::DIRECTORY_SEPARATOR)); + + $this->_autoLoaderMock = $this->getMock( + 'Magento_Autoload_IncludePath', array('getFilePath'), array(), '', false + ); + $this->_autoLoaderMock->staticExpects($this->any()) + ->method('getFilePath') + ->with(self::CLASS_NAME) + ->will($this->returnValue(self::CLASS_FILE_NAME)); + + $this->_object = new Magento_Di_Generator_Io($this->_ioObjectMock, $this->_autoLoaderMock, + self::GENERATION_DIRECTORY + ); + } + + protected function tearDown() + { + unset($this->_generationDirectory); + unset($this->_ioObjectMock); + unset($this->_autoLoaderMock); + unset($this->_object); + } + + public function testGetResultFileDirectory() + { + $expectedDirectory = self::GENERATION_DIRECTORY . self::DIRECTORY_SEPARATOR . 'class|file|'; + $this->assertEquals($expectedDirectory, $this->_object->getResultFileDirectory(self::CLASS_NAME)); + } + + public function testGetResultFileName() + { + $expectedFileName = self::GENERATION_DIRECTORY . self::DIRECTORY_SEPARATOR . self::CLASS_FILE_NAME; + $this->assertEquals($expectedFileName, $this->_object->getResultFileName(self::CLASS_NAME)); + } + + public function testWriteResultFile() + { + $this->_ioObjectMock->expects($this->once()) + ->method('write') + ->with($this->equalTo(self::FILE_NAME), $this->equalTo("<?php\n" . self::FILE_CONTENT)) + ->will($this->returnValue(true)); + + $this->assertTrue($this->_object->writeResultFile(self::FILE_NAME, self::FILE_CONTENT)); + } + + public function testMakeGenerationDirectoryWritable() + { + $this->_ioObjectMock->expects($this->once()) + ->method('isWriteable') + ->with($this->equalTo($this->_generationDirectory)) + ->will($this->returnValue(true)); + + $this->assertTrue($this->_object->makeGenerationDirectory()); + } + + public function testMakeGenerationDirectoryReadOnly() + { + $this->_ioObjectMock->expects($this->once()) + ->method('isWriteable') + ->with($this->equalTo($this->_generationDirectory)) + ->will($this->returnValue(false)); + + $this->_ioObjectMock->expects($this->once()) + ->method('mkdir') + ->with($this->equalTo($this->_generationDirectory), $this->anything(), $this->isTrue()) + ->will($this->returnValue(true)); + + $this->assertTrue($this->_object->makeGenerationDirectory()); + } + + public function testGetGenerationDirectory() + { + $this->assertEquals($this->_generationDirectory, $this->_object->getGenerationDirectory()); + } + + public function testFileExists() + { + $this->_ioObjectMock->expects($this->once()) + ->method('fileExists') + ->with($this->equalTo(self::FILE_NAME), $this->isTrue()) + ->will($this->returnValue(false)); + + $this->assertFalse($this->_object->fileExists(self::FILE_NAME)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/ProxyTest.php b/dev/tests/unit/testsuite/Magento/Di/Generator/ProxyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5c0a84eeb3974b266039e796c3c47afb3f6183bc --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/ProxyTest.php @@ -0,0 +1,241 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_ProxyTest extends Magento_Di_Generator_EntityTestAbstract +{ + /**#@+ + * Source and result class parameters + */ + const SOURCE_CLASS = 'Magento\Di\Generator\TestAsset\SourceClass'; + const RESULT_CLASS = 'SourceClassProxy'; + const RESULT_FILE = 'SourceClassProxy.php'; + /**#@-*/ + + /** + * Expected factory methods + * + * @var array + */ + // @codingStandardsIgnoreStart + protected static $_expectedMethods = array( + array( + 'name' => '__construct', + 'parameters' => + array( + array( + 'name' => 'objectManager', + 'type' => '\\Magento_ObjectManager', + ), + ), + 'body' => '$this->_objectManager = $objectManager;', + 'docblock' => + array( + 'shortDescription' => 'Proxy constructor', + 'tags' => + array( + array( + 'name' => 'param', + 'description' => '\\Magento_ObjectManager $objectManager', + ), + ), + ), + ), + array( + 'name' => 'publicChildMethod', + 'parameters' => + array( + array( + 'name' => 'classGenerator', + 'passedByReference' => false, + 'type' => '\\Zend\\Code\\Generator\\ClassGenerator', + ), + array( + 'name' => 'param1', + 'passedByReference' => false, + 'defaultValue' => '', + ), + array( + 'name' => 'param2', + 'passedByReference' => false, + 'defaultValue' => '\\\\', + ), + array( + 'name' => 'param3', + 'passedByReference' => false, + 'defaultValue' => '\'', + ), + array( + 'name' => 'array', + 'passedByReference' => false, + 'type' => 'array', + 'defaultValue' => + array(), + ), + ), + 'body' => 'return $this->_objectManager->get(self::CLASS_NAME)->publicChildMethod($classGenerator, $param1, $param2, $param3, $array, $param5);', + 'docblock' => + array( + 'shortDescription' => '{@inheritdoc}', + ), + ), + array( + 'name' => 'publicMethodWithReference', + 'parameters' => + array( + array( + 'name' => 'classGenerator', + 'passedByReference' => true, + 'type' => '\\Zend\\Code\\Generator\\ClassGenerator', + ), + array( + 'name' => 'array', + 'passedByReference' => true, + 'type' => 'array', + ), + ), + 'body' => 'return $this->_objectManager->get(self::CLASS_NAME)->publicMethodWithReference($classGenerator, $array);', + 'docblock' => + array( + 'shortDescription' => '{@inheritdoc}', + ), + ), + array( + 'name' => 'publicChildWithoutParameters', + 'parameters' => + array(), + 'body' => 'return $this->_objectManager->get(self::CLASS_NAME)->publicChildWithoutParameters();', + 'docblock' => + array( + 'shortDescription' => '{@inheritdoc}', + ), + ), + array( + 'name' => 'publicParentMethod', + 'parameters' => + array( + array( + 'name' => 'docBlockGenerator', + 'passedByReference' => false, + 'type' => '\\Zend\\Code\\Generator\\DocBlockGenerator', + ), + array( + 'name' => 'param1', + 'passedByReference' => false, + 'defaultValue' => '', + ), + array( + 'name' => 'param2', + 'passedByReference' => false, + 'defaultValue' => '\\\\', + ), + array( + 'name' => 'param3', + 'passedByReference' => false, + 'defaultValue' => '\'', + ), + array( + 'name' => 'array', + 'passedByReference' => false, + 'type' => 'array', + 'defaultValue' => + array(), + ), + ), + 'body' => 'return $this->_objectManager->get(self::CLASS_NAME)->publicParentMethod($docBlockGenerator, $param1, $param2, $param3, $array);', + 'docblock' => + array( + 'shortDescription' => '{@inheritdoc}', + ), + ), + array( + 'name' => 'publicParentWithoutParameters', + 'parameters' => + array(), + 'body' => 'return $this->_objectManager->get(self::CLASS_NAME)->publicParentWithoutParameters();', + 'docblock' => + array( + 'shortDescription' => '{@inheritdoc}', + ), + ), + ); + // @codingStandardsIgnoreEnd + + /** + * Model under test + * + * @var Magento_Di_Generator_Factory + */ + protected $_model; + + protected function setUp() + { + // add param with null default value + $value = new \Zend\Code\Generator\ValueGenerator(null, \Zend\Code\Generator\ValueGenerator::TYPE_NULL); + static::$_expectedMethods[1]['parameters'][5] = array( + 'name' => 'param5', + 'passedByReference' => false, + 'defaultValue' => $value, + ); + $ioObjectMock = $this->_getIoObjectMock(); + + $methods = array('setExtendedClass', 'setName', 'addProperties', 'addMethods', 'setClassDocBlock', 'generate'); + $codeGeneratorMock = $this->_getCodeGeneratorMock($methods); + $codeGeneratorMock->expects($this->once()) + ->method('setExtendedClass') + ->with('\\'. self::SOURCE_CLASS) + ->will($this->returnSelf()); + + $autoLoaderMock = $this->_getAutoloaderMock(); + + /** @var $ioObjectMock Magento_Di_Generator_Io */ + /** @var $codeGeneratorMock Magento_Di_Generator_CodeGenerator_Zend */ + /** @var $autoLoaderMock Magento_Autoload_IncludePath */ + $this->_model = new Magento_Di_Generator_Proxy(self::SOURCE_CLASS, self::RESULT_CLASS, $ioObjectMock, + $codeGeneratorMock, $autoLoaderMock + ); + } + + protected function tearDown() + { + unset($this->_model); + } + + /** + * @covers Magento_Di_Generator_Proxy::_getClassMethods + * @covers Magento_Di_Generator_Proxy::_generateCode + * @covers Magento_Di_Generator_Proxy::_getMethodInfo + * @covers Magento_Di_Generator_Proxy::_getMethodParameterInfo + * @covers Magento_Di_Generator_Proxy::_escapeDefaultValue + * @covers Magento_Di_Generator_Proxy::_getMethodBody + */ + public function testGenerate() + { + $result = $this->_model->generate(); + $this->assertTrue($result); + $this->assertEmpty($this->_model->getErrors()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/ParentClass.php b/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/ParentClass.php new file mode 100644 index 0000000000000000000000000000000000000000..f4f597bc8ca7cb2fe0ebbf021812e7706920e976 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/ParentClass.php @@ -0,0 +1,93 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Di\Generator\TestAsset; +use Zend\Code\Generator\DocBlockGenerator; + +class ParentClass +{ + /** + * Public parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + /** + * Protected parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _protectedParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + /** + * Private parent method + * + * @param \Zend\Code\Generator\DocBlockGenerator $docBlockGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + private function _privateParentMethod(DocBlockGenerator $docBlockGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + public function publicParentWithoutParameters() + { + } + + public static function publicParentStatic() + { + } + + final public function publicParentFinal() + { + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/SourceClass.php b/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/SourceClass.php new file mode 100644 index 0000000000000000000000000000000000000000..6a4a6720e0e1bb485197426625e96db01a80c017 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/SourceClass.php @@ -0,0 +1,123 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Di\Generator\TestAsset; +use Zend\Code\Generator\ClassGenerator; + +class SourceClass extends ParentClass +{ + /** + * Public child constructor + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param null $param4 + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function __construct(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', $param3 = '\'', + $param4 = null + ) { + } + + /** + * Public child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * @param null $param5 + * @return void + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', $param3 = '\'', + array $array = array(), $param5 = null + ) { + } + + /** + * Public child method with reference + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param array $array + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function publicMethodWithReference(ClassGenerator &$classGenerator, array &$array) + { + } + + /** + * Protected child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _protectedChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'' + ) { + } + + /** + * Private child method + * + * @param \Zend\Code\Generator\ClassGenerator $classGenerator + * @param string $param1 + * @param string $param2 + * @param string $param3 + * @param array $array + * @return void + * + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + private function _privateChildMethod(ClassGenerator $classGenerator, $param1 = '', $param2 = '\\', + $param3 = '\'', array $array = array() + ) { + } + + public function publicChildWithoutParameters() + { + } + + public static function publicChildStatic() + { + } + + final public function publicChildFinal() + { + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/TestGenerationClass.php b/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/TestGenerationClass.php new file mode 100644 index 0000000000000000000000000000000000000000..0ce394036844ed63828d51ac6ecb64761275a295 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/Generator/TestAsset/TestGenerationClass.php @@ -0,0 +1,43 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_TestAsset_TestGenerationClass +{ + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @param Magento\Di\Generator\TestAsset\ParentClass $parentClass + * @param Magento\Di\Generator\TestAsset\SourceClass $sourceClass + * @param Not_Existing_Class $notExistingClass + */ + public function __construct( + Magento\Di\Generator\TestAsset\ParentClass $parentClass, + Magento\Di\Generator\TestAsset\SourceClass $sourceClass, + Not_Existing_Class $notExistingClass + ) { + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/GeneratorTest.php b/dev/tests/unit/testsuite/Magento/Di/GeneratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..470f95acdb6b6aa6bbc24024fddf378980d64794 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Di/GeneratorTest.php @@ -0,0 +1,179 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_GeneratorTest extends PHPUnit_Framework_TestCase +{ + /** + * Class name parameter value + */ + const SOURCE_CLASS = 'testClassName'; + + /** + * Expected generated entities + * + * @var array + */ + protected $_expectedEntities = array( + 'factory' => Magento_Di_Generator_Factory::ENTITY_TYPE, + 'proxy' => Magento_Di_Generator_Proxy::ENTITY_TYPE + ); + + /** + * Model under test + * + * @var Magento_Di_Generator + */ + protected $_model; + + /** + * @var PHPUnit_Framework_MockObject_MockObject|Magento_Di_Generator_EntityAbstract + */ + protected $_generator; + + /** + * @var PHPUnit_Framework_MockObject_MockObject|Magento_Autoload_IncludePath + */ + protected $_autoloader; + + protected function setUp() + { + $this->_generator = $this->getMockForAbstractClass('Magento_Di_Generator_EntityAbstract', + array(), '', true, true, true, array('generate') + ); + $this->_autoloader = $this->getMock('Magento_Autoload_IncludePath', + array('getFile'), array(), '', false + ); + } + + protected function tearDown() + { + unset($this->_model); + unset($this->_generator); + unset($this->_autoloader); + } + + /** + * Set generator mock to never call methods + */ + protected function _prepareGeneratorNeverCalls() + { + $this->_generator->expects($this->never()) + ->method('generate'); + } + + public function testGetGeneratedEntities() + { + $this->_model = new Magento_Di_Generator(); + $this->assertEquals(array_values($this->_expectedEntities), $this->_model->getGeneratedEntities()); + } + + /** + * @dataProvider generateValidClassDataProvider + */ + public function testGenerateClass($className, $entityType) + { + $this->_autoloader->staticExpects($this->once()) + ->method('getFile') + ->with($className . $entityType) + ->will($this->returnValue(false)); + + $this->_generator->expects($this->once()) + ->method('generate') + ->will($this->returnValue(true)); + + $this->_model = new Magento_Di_Generator($this->_generator, $this->_autoloader); + + $this->assertTrue($this->_model->generateClass($className . $entityType)); + $this->assertAttributeEmpty('_generator', $this->_model); + } + + /** + * @dataProvider generateValidClassDataProvider + */ + public function testGenerateClassWithExistName($className, $entityType) + { + $this->_prepareGeneratorNeverCalls(); + $this->_autoloader->staticExpects($this->once()) + ->method('getFile') + ->with($className . $entityType) + ->will($this->returnValue(true)); + + $this->_model = new Magento_Di_Generator($this->_generator, $this->_autoloader); + + $this->assertFalse($this->_model->generateClass($className . $entityType)); + } + + public function testGenerateClassWithWrongName() + { + $this->_prepareGeneratorNeverCalls(); + $this->_autoloader->staticExpects($this->never()) + ->method('getFile'); + + $this->_model = new Magento_Di_Generator($this->_generator, $this->_autoloader); + + $this->assertFalse($this->_model->generateClass(self::SOURCE_CLASS)); + } + + /** + * @expectedException Magento_Exception + */ + public function testGenerateClassWithError() + { + $this->_autoloader->staticExpects($this->once()) + ->method('getFile') + ->will($this->returnValue(false)); + + $this->_generator->expects($this->once()) + ->method('generate') + ->will($this->returnValue(false)); + + $this->_model = new Magento_Di_Generator($this->_generator, $this->_autoloader); + + $expectedEntities = array_values($this->_expectedEntities); + $resultClassName = self::SOURCE_CLASS . ucfirst(array_shift($expectedEntities)); + + $this->_model->generateClass($resultClassName); + } + + /** + * Data provider for generate class tests + * + * @return array + */ + public function generateValidClassDataProvider() + { + $data = array(); + foreach ($this->_expectedEntities as $generatedEntity) { + $generatedEntity = ucfirst($generatedEntity); + $data['test class for ' . $generatedEntity] = array( + 'class name' => self::SOURCE_CLASS, + 'entity type' => $generatedEntity + ); + } + return $data; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Di/InstanceManager/ZendTest.php b/dev/tests/unit/testsuite/Magento/Di/InstanceManager/ZendTest.php index 4afa8ab291f72eedae62e6a0d4fcdadc898119b2..2996a0dd3aa6366ade16d476eabe809822032473 100644 --- a/dev/tests/unit/testsuite/Magento/Di/InstanceManager/ZendTest.php +++ b/dev/tests/unit/testsuite/Magento/Di/InstanceManager/ZendTest.php @@ -40,6 +40,11 @@ class Magento_Di_InstanceManager_ZendTest extends PHPUnit_Framework_TestCase */ const SHARED_ATTRIBUTE = 'sharedInstances'; + /** + * Test class name + */ + const TEST_CLASS = 'Test_Class_Name'; + public function testRemoveSharedInstance() { $instanceManager = new Magento_Di_InstanceManager_Zend(); @@ -56,4 +61,29 @@ class Magento_Di_InstanceManager_ZendTest extends PHPUnit_Framework_TestCase $instanceManager->removeSharedInstance(self::TEST_ALIAS); $this->assertAttributeEmpty(self::SHARED_ATTRIBUTE, $instanceManager); } + + public function testAddTypePreference() + { + $generatorMock = $this->getMock('Magento_Di_Generator', array('generateClass'), array(), '', false); + $generatorMock->expects($this->once()) + ->method('generateClass') + ->with(self::TEST_CLASS); + + $instanceManager = new Magento_Di_InstanceManager_Zend($generatorMock); + $this->assertInstanceOf( + 'Magento_Di_InstanceManager_Zend', + $instanceManager->addTypePreference('Interface', self::TEST_CLASS) + ); + } + + public function testSetParameters() + { + $generatorMock = $this->getMock('Magento_Di_Generator', array('generateClass'), array(), '', false); + $generatorMock->expects($this->once()) + ->method('generateClass') + ->with(self::TEST_CLASS); + + $instanceManager = new Magento_Di_InstanceManager_Zend($generatorMock); + $instanceManager->setParameters('Class', array('parameter' => self::TEST_CLASS)); + } } diff --git a/dev/tests/unit/testsuite/Magento/Di/ZendTest.php b/dev/tests/unit/testsuite/Magento/Di/ZendTest.php index dc5960f118fc3262b86452cdd7bc98cd12b47ce8..ad9819ec34e813116b76c52da127637f6004cc5d 100644 --- a/dev/tests/unit/testsuite/Magento/Di/ZendTest.php +++ b/dev/tests/unit/testsuite/Magento/Di/ZendTest.php @@ -149,13 +149,15 @@ class Magento_Di_ZendTest extends PHPUnit_Framework_TestCase if (!self::$_isClassMocks) { $this->getMockForAbstractClass( self::PARENT_CLASS_MODEL, - $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, self::PARENT_CLASS_MODEL ), self::TEST_CLASS_MODEL, false ); $this->getMockForAbstractClass(self::PARENT_CLASS_BLOCK, - $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::BLOCK_ENTITY, + $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::BLOCK_ENTITY, self::PARENT_CLASS_BLOCK ), self::TEST_CLASS_BLOCK, false diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/Stream/Mode/ZlibTest.php b/dev/tests/unit/testsuite/Magento/Filesystem/Stream/Mode/ZlibTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1bfd018afc0141e0aff1c6635d3f07f2c445b0fe --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Filesystem/Stream/Mode/ZlibTest.php @@ -0,0 +1,59 @@ +<?php +/** + * Unit Test for Magento_Filesystem_Stream_Mode_Zlib + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Magento_Filesystem_Stream_Mode_ZlibTest extends PHPUnit_Framework_TestCase +{ + /** + * @dataProvider modesDataProvider + * @param string $mode + * @param string $expectedMode + * @param int $ratio + * @param string $strategy + */ + public function testConstructor($mode, $expectedMode, $ratio, $strategy) + { + $object = new Magento_Filesystem_Stream_Mode_Zlib($mode); + $this->assertEquals($expectedMode, $object->getMode()); + $this->assertEquals($ratio, $object->getRatio()); + $this->assertEquals($strategy, $object->getStrategy()); + } + + /** + * @return array + */ + public function modesDataProvider() + { + return array( + 'w' => array('w', 'w', 1, ''), + 'w+' => array('w+', 'w+', 1, ''), + 'r9' => array('r9', 'r', 9, ''), + 'a+8' => array('a+8', 'a+', 8, ''), + 'wb+7' => array('wb+7', 'wb+', 7, ''), + 'r9f' => array('r9f', 'r', 9, 'f'), + 'a+8h' => array('a+8h', 'a+', 8, 'h'), + 'wb+7f' => array('wb+7f', 'wb+', 7, 'f'), + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/Stream/ModeTest.php b/dev/tests/unit/testsuite/Magento/Filesystem/Stream/ModeTest.php index f39f1b1be64b24746ebda21e77f7345eeeca0c89..ad845698b5d2efc1d666f58318014a19a678c8b4 100644 --- a/dev/tests/unit/testsuite/Magento/Filesystem/Stream/ModeTest.php +++ b/dev/tests/unit/testsuite/Magento/Filesystem/Stream/ModeTest.php @@ -77,7 +77,7 @@ class Magento_Filesystem_Stream_ModeTest extends PHPUnit_Framework_TestCase public function testAllowRead($mode) { $streamMode = new Magento_Filesystem_Stream_Mode($mode); - $this->assertTrue($streamMode->allowsRead()); + $this->assertTrue($streamMode->isReadAllowed()); } /** @@ -95,7 +95,7 @@ class Magento_Filesystem_Stream_ModeTest extends PHPUnit_Framework_TestCase public function testAllowsWrite($mode) { $streamMode = new Magento_Filesystem_Stream_Mode($mode); - $this->assertTrue($streamMode->allowsWrite()); + $this->assertTrue($streamMode->isWriteAllowed()); } /** @@ -118,7 +118,7 @@ class Magento_Filesystem_Stream_ModeTest extends PHPUnit_Framework_TestCase public function testAllowsExistingFileOpening($mode) { $streamMode = new Magento_Filesystem_Stream_Mode($mode); - $this->assertTrue($streamMode->allowsExistingFileOpening()); + $this->assertTrue($streamMode->isExistingFileOpenAllowed()); } /** @@ -145,7 +145,7 @@ class Magento_Filesystem_Stream_ModeTest extends PHPUnit_Framework_TestCase public function testAllowsNewFileOpening($mode) { $streamMode = new Magento_Filesystem_Stream_Mode($mode); - $this->assertTrue($streamMode->allowsNewFileOpening()); + $this->assertTrue($streamMode->isNewFileOpenAllowed()); } /** @@ -171,7 +171,7 @@ class Magento_Filesystem_Stream_ModeTest extends PHPUnit_Framework_TestCase public function testImpliesExistingContentDeletion($mode) { $streamMode = new Magento_Filesystem_Stream_Mode($mode); - $this->assertTrue($streamMode->impliesExistingContentDeletion()); + $this->assertTrue($streamMode->isExistingContentDeletionImplied()); } /** @@ -192,7 +192,7 @@ class Magento_Filesystem_Stream_ModeTest extends PHPUnit_Framework_TestCase public function testImpliesPositioningCursorAtTheBeginning($mode) { $streamMode = new Magento_Filesystem_Stream_Mode($mode); - $this->assertTrue($streamMode->impliesPositioningCursorAtTheBeginning()); + $this->assertTrue($streamMode->isPositioningCursorAtTheBeginningImplied()); } /** @@ -218,7 +218,7 @@ class Magento_Filesystem_Stream_ModeTest extends PHPUnit_Framework_TestCase public function testImpliesPositioningCursorAtTheEnd($mode) { $streamMode = new Magento_Filesystem_Stream_Mode($mode); - $this->assertTrue($streamMode->impliesPositioningCursorAtTheEnd()); + $this->assertTrue($streamMode->isPositioningCursorAtTheEndImplied()); } /** diff --git a/dev/tests/unit/testsuite/Magento/FilesystemPathsTest.php b/dev/tests/unit/testsuite/Magento/FilesystemPathsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fc38f88a973f6d976f794592a057222668786cc0 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/FilesystemPathsTest.php @@ -0,0 +1,153 @@ +<?php +/** + * Unit Test for Magento_Filesystem + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Magento_FilesystemPathsTest extends PHPUnit_Framework_TestCase +{ + /** + * @dataProvider absolutePathDataProvider + * @param string $path + * @param string $expected + */ + public function testGetAbsolutePath($path, $expected) + { + $this->assertEquals($expected, Magento_Filesystem::getAbsolutePath($path)); + } + + /** + * @return array + */ + public function absolutePathDataProvider() + { + return array( + array('/tmp/../file.txt', '/file.txt'), + array('/tmp/../etc/mysql/file.txt', '/etc/mysql/file.txt'), + array('/tmp/../file.txt', '/file.txt'), + array('/tmp/./file.txt', '/tmp/file.txt'), + array('/tmp/./../file.txt', '/file.txt'), + array('/tmp/../../../file.txt', '/file.txt'), + array('../file.txt', '/file.txt'), + array('/../file.txt', '/file.txt'), + array('/tmp/path/file.txt', '/tmp/path/file.txt'), + array('/tmp/path', '/tmp/path'), + array('C:\\Windows', 'C:/Windows'), + array('C:\\Windows\\system32\\..', 'C:/Windows'), + ); + } + + /** + * @dataProvider pathDataProvider + * @param array $parts + * @param string $expected + * @param bool $isAbsolute + */ + public function testGetPathFromArray(array $parts, $expected, $isAbsolute) + { + $expected = Magento_Filesystem::fixSeparator($expected); + $this->assertEquals($expected, Magento_Filesystem::getPathFromArray($parts, $isAbsolute)); + } + + /** + * @return array + */ + public function pathDataProvider() + { + return array( + array(array('etc', 'mysql', 'my.cnf'), '/etc/mysql/my.cnf',true), + array(array('etc', 'mysql', 'my.cnf'), 'etc/mysql/my.cnf', false), + array(array('C:', 'Windows', 'my.cnf'), 'C:/Windows/my.cnf', false), + array(array('C:', 'Windows', 'my.cnf'), 'C:/Windows/my.cnf', true), + array(array('C:', 'Windows', 'my.cnf'), 'C:\\Windows/my.cnf', true), + ); + } + + /** + * @dataProvider pathDataProvider + * @param array $expected + * @param string $path + */ + public function testGetPathAsArray(array $expected, $path) + { + $this->assertEquals($expected, Magento_Filesystem::getPathAsArray($path)); + } + + /** + * @dataProvider isAbsolutePathDataProvider + * @param bool $isReal + * @param string $path + */ + public function testIsAbsolutePath($isReal, $path) + { + $this->assertEquals($isReal, Magento_Filesystem::isAbsolutePath($path)); + } + + /** + * @return array + */ + public function isAbsolutePathDataProvider() + { + return array( + array(true, '/tmp/file.txt'), + array(false, '/tmp/../etc/mysql/my.cnf'), + array(false, '/tmp/../tmp/file.txt'), + array(false, 'C:\Temp\..\tmpfile.txt'), + array(true, 'C:\Temp\tmpfile.txt'), + array(true, '/tmp/'), + array(true, '/tmp'), + ); + } + + /** + * @expectedException InvalidArgumentException + * @expectedExceptionMessage Path must contain at least one node + */ + public function testGetPathFromArrayException() + { + Magento_Filesystem::getPathFromArray(array()); + } + + /** + * @dataProvider isPathInDirectoryDataProvider + * @param string $path + * @param string $directory + * @param boolean $expectedValue + */ + public function testIsPathInDirectory($path, $directory, $expectedValue) + { + $this->assertEquals($expectedValue, Magento_Filesystem::isPathInDirectory($path, $directory)); + } + + /** + * @return array + */ + public function isPathInDirectoryDataProvider() + { + return array( + array('/tmp/file', '/tmp', true), + array('/tmp/file', '/tmp/dir', false), + array('/tmp', '/tmp/', true), + array('/tmp/', '/tmp', true), + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/FilesystemTest.php index f1ce61695ee307e7814354e9f029065f26db3855..884a18c153fe8987465161b8230e98ed5f78c93b 100644 --- a/dev/tests/unit/testsuite/Magento/FilesystemTest.php +++ b/dev/tests/unit/testsuite/Magento/FilesystemTest.php @@ -29,7 +29,7 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase { $filesystem = new Magento_Filesystem($this->_getDefaultAdapterMock()); $filesystem->setWorkingDirectory('/tmp'); - $this->assertAttributeEquals('/tmp', '_workingDirectory', $filesystem); + $this->assertEquals('/tmp', $filesystem->getWorkingDirectory()); } /** @@ -129,17 +129,16 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase } /** - * @expectedException InvalidArgumentException - * @expectedExceptionMessage Invalid path * @dataProvider twoFilesOperationsInvalidDataProvider * @param string $method * @param string $source * @param string $destination + * @param string $exceptionMessage * @param string|null $workingDirectory * @param string|null $targetDir */ - public function testTwoFilesOperationsIsolationException($method, $source, $destination, $workingDirectory = null, - $targetDir = null + public function testTwoFilesOperationsIsolationException( + $method, $source, $destination, $exceptionMessage, $workingDirectory = null, $targetDir = null ) { $adapterMock = $this->_getDefaultAdapterMock(); $adapterMock->expects($this->never()) @@ -147,6 +146,9 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase $filesystem = new Magento_Filesystem($adapterMock); $filesystem->setWorkingDirectory('/tmp'); + + + $this->setExpectedException('InvalidArgumentException', $exceptionMessage); $filesystem->$method($source, $destination, $workingDirectory, $targetDir); } @@ -156,18 +158,88 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase public function twoFilesOperationsInvalidDataProvider() { return array( - 'copy first path invalid' => array('copy', '/tmp/../etc/passwd', '/tmp/path001'), - 'copy first path invalid #2' => array('copy', '/tmp/../etc/passwd', '/tmp/path001', '/tmp'), - 'copy second path invalid' => array('copy', '/tmp/uploaded.txt', '/tmp/../etc/passwd'), - 'copy both path invalid' => array('copy', '/tmp/../etc/passwd', '/tmp/../dev/null'), - 'rename first path invalid' => array('rename', '/tmp/../etc/passwd', '/tmp/path001'), - 'rename first path invalid #2' => array('rename', '/tmp/../etc/passwd', '/tmp/path001', '/tmp'), - 'rename second path invalid' => array('rename', '/tmp/uploaded.txt', '/tmp/../etc/passwd'), - 'rename both path invalid' => array('rename', '/tmp/../etc/passwd', '/tmp/../dev/null'), - 'copy target path invalid' => array('copy', '/tmp/passwd', '/etc/../dev/null', null, '/etc'), - 'rename target path invalid' => array('rename', '/tmp/passwd', '/etc/../dev/null', null, '/etc'), - 'copy target path invalid #2' => array('copy', '/tmp/passwd', '/etc/../dev/null', '/tmp', '/etc'), - 'rename target path invalid #2' => array('rename', '/tmp/passwd', '/etc/../dev/null', '/tmp', '/etc'), + 'copy first path invalid' => array( + 'copy', + '/tmp/../etc/passwd', + '/tmp/path001', + "Path '/tmp/../etc/passwd' is out of working directory '/tmp'", + ), + 'copy first path invalid #2' => array( + 'copy', + '/tmp/../etc/passwd', + '/tmp/path001', + "Path '/tmp/../etc/passwd' is out of working directory '/tmp'", + '/tmp' + ), + 'copy second path invalid' => array( + 'copy', + '/tmp/uploaded.txt', + '/tmp/../etc/passwd', + "Path '/tmp/../etc/passwd' is out of working directory '/tmp'", + ), + 'copy both path invalid' => array( + 'copy', + '/tmp/../etc/passwd', + '/tmp/../dev/null', + "Path '/tmp/../etc/passwd' is out of working directory '/tmp'", + ), + 'rename first path invalid' => array( + 'rename', + '/tmp/../etc/passwd', + '/tmp/path001', + "Path '/tmp/../etc/passwd' is out of working directory '/tmp'", + ), + 'rename first path invalid #2' => array( + 'rename', + '/tmp/../etc/passwd', + '/tmp/path001', + "Path '/tmp/../etc/passwd' is out of working directory '/tmp'", + '/tmp' + ), + 'rename second path invalid' => array( + 'rename', + '/tmp/uploaded.txt', + '/tmp/../etc/passwd', + "Path '/tmp/../etc/passwd' is out of working directory '/tmp'", + ), + 'rename both path invalid' => array( + 'rename', + '/tmp/../etc/passwd', + '/tmp/../dev/null', + "Path '/tmp/../etc/passwd' is out of working directory '/tmp'", + ), + 'copy target path invalid' => array( + 'copy', + '/tmp/passwd', + '/etc/../dev/null', + "Path '/etc/../dev/null' is out of working directory '/etc'", + null, + '/etc' + ), + 'rename target path invalid' => array( + 'rename', + '/tmp/passwd', + '/etc/../dev/null', + "Path '/etc/../dev/null' is out of working directory '/etc'", + null, + '/etc' + ), + 'copy target path invalid #2' => array( + 'copy', + '/tmp/passwd', + '/etc/../dev/null', + "Path '/etc/../dev/null' is out of working directory '/etc'", + '/tmp', + '/etc' + ), + 'rename target path invalid #2' => array( + 'rename', + '/tmp/passwd', + '/etc/../dev/null', + "Path '/etc/../dev/null' is out of working directory '/etc'", + '/tmp', + '/etc' + ), ); } @@ -277,7 +349,7 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase /** * @expectedException InvalidArgumentException - * @expectedExceptionMessage Invalid path + * @expectedExceptionMessage Path '/etc/passwd' is out of working directory '/tmp' */ public function testTouchIsolation() { @@ -317,7 +389,7 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase /** * @expectedException InvalidArgumentException - * @expectedExceptionMessage Invalid path + * @expectedExceptionMessage Path '/tmp/../etc/test.txt' is out of working directory '/tmp' */ public function testCreateStreamIsolation() { @@ -455,7 +527,7 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase /** * @expectedException InvalidArgumentException - * @expectedExceptionMessage Invalid path + * @expectedExceptionMessage Path '/tmp/../etc/passwd' is out of working directory '/tmp' * @dataProvider adapterIsolationMethods * @param string $method * @param string $adapterMethod @@ -482,18 +554,22 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase { return $this->adapterMethods() + array( + 'mtime' => array('getMTime', 'getMTime'), 'read' => array('read', 'read'), 'read #2' => array('read', 'read', array('/tmp')), 'createDirectory' => array('createDirectory', 'createDirectory', array(0777)), 'createDirectory #2' => array('createDirectory', 'createDirectory', array(0777, '/tmp')), + 'getFileMd5' => array('getFileMd5', 'getFileMd5'), + 'getFileSize' => array('getFileSize', 'getFileSize') ); } /** - * @dataProvider workingDirDataProvider - * @param string|null $workingDirectory + * @dataProvider adapterMethodsWithFileCheckDataProvider + * @param string $method + * @param string $adapterMethod */ - public function testRead($workingDirectory) + public function testAdapterMethodsWithFileChecks($method, $adapterMethod) { $validPath = '/tmp/path/file.txt'; $adapterMock = $this->_getDefaultAdapterMock(); @@ -502,12 +578,25 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase ->with($validPath) ->will($this->returnValue(true)); $adapterMock->expects($this->once()) - ->method('read') - ->with($validPath); + ->method($adapterMethod) + ->with($validPath) + ->will($this->returnValue(1)); $filesystem = new Magento_Filesystem($adapterMock); $filesystem->setWorkingDirectory('/tmp'); - $filesystem->read($validPath, $workingDirectory); + $this->assertEquals(1, $filesystem->$method($validPath)); + } + + /** + * @return array + */ + public function adapterMethodsWithFileCheckDataProvider() + { + return array( + 'read' => array('read', 'read'), + 'getFileMd5' => array('getFileMd5', 'getFileMd5'), + 'getFileSize' => array('getFileSize', 'getFileSize') + ); } /** @@ -562,7 +651,7 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase /** * @expectedException InvalidArgumentException - * @expectedExceptionMessage Invalid path + * @expectedExceptionMessage Path '/tmp/../path/file.txt' is out of working directory '/tmp' * @dataProvider workingDirDataProvider * @param string|null $workingDirectory */ @@ -626,7 +715,6 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase public function methodsWithFileChecksDataProvider() { return array( - 'delete' => array('delete'), 'rename' => array('rename', array('/tmp/file001.txt')) ); } @@ -699,7 +787,7 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase /** * Test isDirectory isolation * @expectedException InvalidArgumentException - * @expectedExceptionMessage Invalid path + * @expectedExceptionMessage Path '/tmp/../etc/passwd' is out of working directory '/tmp' * @dataProvider workingDirDataProvider * @param string|null $workingDirectory */ @@ -712,115 +800,96 @@ class Magento_FilesystemTest extends PHPUnit_Framework_TestCase } /** - * @dataProvider absolutePathDataProvider - * @param string $path - * @param string $expected - */ - public function testGetAbsolutePath($path, $expected) - { - $this->assertEquals($expected, Magento_Filesystem::getAbsolutePath($path)); - } - - /** - * @return array + * @return PHPUnit_Framework_MockObject_MockObject */ - public function absolutePathDataProvider() + protected function _getDefaultAdapterMock() { - return array( - array('/tmp/../file.txt', '/file.txt'), - array('/tmp/../etc/mysql/file.txt', '/etc/mysql/file.txt'), - array('/tmp/../file.txt', '/file.txt'), - array('/tmp/./file.txt', '/tmp/file.txt'), - array('/tmp/./../file.txt', '/file.txt'), - array('/tmp/../../../file.txt', '/file.txt'), - array('../file.txt', '/file.txt'), - array('/../file.txt', '/file.txt'), - array('/tmp/path/file.txt', '/tmp/path/file.txt'), - array('/tmp/path', '/tmp/path'), - array('C:\\Windows', 'C:/Windows'), - array('C:\\Windows\\system32\\..', 'C:/Windows'), - ); + $adapterMock = $this->getMockBuilder('Magento_Filesystem_AdapterInterface') + ->getMock(); + $adapterMock->expects($this->once()) + ->method('isDirectory') + ->with('/tmp') + ->will($this->returnValue(true)); + $adapterMock->expects($this->any()) + ->method('exists') + ->will($this->returnValue(true)); + return $adapterMock; } /** - * @dataProvider pathDataProvider - * @param array $parts - * @param string $expected - * @param bool $isAbsolute + * @dataProvider testSearchFilesDataProvider + * @param string $workingDirectory + * @param string $baseDirectory + * @param string $pattern + * @param string $expectedValue */ - public function testGetPathFromArray(array $parts, $expected, $isAbsolute) + public function testSearchFiles($workingDirectory, $baseDirectory, $pattern, $expectedValue) { - $this->assertEquals($expected, Magento_Filesystem::getPathFromArray($parts, $isAbsolute)); - } + $adapterMock = $this->getMock('Magento_Filesystem_AdapterInterface'); - /** - * @return array - */ - public function pathDataProvider() - { - return array( - array(array('etc', 'mysql', 'my.cnf'), '/etc/mysql/my.cnf',true), - array(array('etc', 'mysql', 'my.cnf'), 'etc/mysql/my.cnf', false), - array(array('C:', 'Windows', 'my.cnf'), 'C:/Windows/my.cnf', false), - array(array('C:', 'Windows', 'my.cnf'), 'C:/Windows/my.cnf', true), - ); - } + $adapterMock->expects($this->once()) + ->method('isDirectory') + ->with($workingDirectory) + ->will($this->returnValue(true)); - /** - * @dataProvider pathDataProvider - * @param array $expected - * @param string $path - */ - public function testGetPathAsArray(array $expected, $path) - { - $this->assertEquals($expected, Magento_Filesystem::getPathAsArray($path)); - } + $searchResult = array('result'); + $adapterMock->expects($this->once()) + ->method('searchKeys') + ->with($expectedValue) + ->will($this->returnValue($searchResult)); - /** - * @dataProvider isAbsolutePathDataProvider - * @param bool $isReal - * @param string $path - */ - public function testIsAbsolutePath($isReal, $path) - { - $this->assertEquals($isReal, Magento_Filesystem::isAbsolutePath($path)); + $filesystem = new Magento_Filesystem($adapterMock); + $filesystem->setWorkingDirectory($workingDirectory); + $this->assertEquals($searchResult, $filesystem->searchKeys($baseDirectory, $pattern)); } - /** - * @return array - */ - public function isAbsolutePathDataProvider() + public function testSearchFilesDataProvider() { return array( - array(true, '/tmp/file.txt'), - array(false, '/tmp/../etc/mysql/my.cnf'), - array(false, '/tmp/../tmp/file.txt') + array('/tmp', '/tmp/some/folder', '*', '/tmp/some/folder/*'), + array('/tmp', '/tmp/some/folder/', '/*', '/tmp/some/folder/*'), + array('/tmp', '/tmp/some/folder/', '/../../*', '/tmp/some/folder/../../*'), ); } /** - * @expectedException InvalidArgumentException - * @expectedExceptionMessage Path must contain at least one node + * @dataProvider searchFilesIsolationDataProvider + * @param string $workingDirectory + * @param string $baseDirectory + * @param string $pattern + * @param string $expectedMessage */ - public function testGetPathFromArrayException() + public function testSearchFilesIsolation($workingDirectory, $baseDirectory, $pattern, $expectedMessage) { - Magento_Filesystem::getPathFromArray(array()); - } + $adapterMock = $this->getMock('Magento_Filesystem_AdapterInterface'); - /** - * @return PHPUnit_Framework_MockObject_MockObject - */ - protected function _getDefaultAdapterMock() - { - $adapterMock = $this->getMockBuilder('Magento_Filesystem_AdapterInterface') - ->getMock(); $adapterMock->expects($this->once()) ->method('isDirectory') - ->with('/tmp') + ->with($workingDirectory) ->will($this->returnValue(true)); - $adapterMock->expects($this->any()) - ->method('exists') - ->will($this->returnValue(true)); - return $adapterMock; + + $filesystem = new Magento_Filesystem($adapterMock); + $filesystem->setWorkingDirectory($workingDirectory); + + $this->setExpectedException('InvalidArgumentException', $expectedMessage); + $filesystem->searchKeys($baseDirectory, $pattern); + } + + public function searchFilesIsolationDataProvider() + { + return array( + array( + '/tmp', + '/tmp/some/folder', + '/../../../*', + "Path '/tmp/some/folder/../../../*' is out of working directory '/tmp'" + ), + array( + '/tmp/log', + '/tmp/log/some/folder/../../../', + '*', + "Path '/tmp/log/some/folder/../../../' is out of working directory '/tmp/log'" + ), + ); } } diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/ZendTest.php b/dev/tests/unit/testsuite/Magento/ObjectManager/ZendTest.php index 95319d057662e8e1033f468359de86e75ea46d6a..502e11888a30aa5f6ae64d44b995f0c689c455af 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/ZendTest.php +++ b/dev/tests/unit/testsuite/Magento/ObjectManager/ZendTest.php @@ -30,11 +30,6 @@ */ class Magento_ObjectManager_ZendTest extends PHPUnit_Framework_TestCase { - /** - * Area code - */ - const AREA_CODE = 'global'; - /** * Class name */ @@ -57,16 +52,6 @@ class Magento_ObjectManager_ZendTest extends PHPUnit_Framework_TestCase 'argument_2' => 'value_2', ); - /** - * Expected instance manager parametrized cache after clear - * - * @var array - */ - protected $_instanceCache = array( - 'hashShort' => array(), - 'hashLong' => array() - ); - /** * ObjectManager instance for tests * @@ -116,21 +101,6 @@ class Magento_ObjectManager_ZendTest extends PHPUnit_Framework_TestCase $this->assertAttributeInstanceOf(get_class($diInstance), '_di', $model); } - /** - * @dataProvider loadAreaConfigurationDataProvider - * @param string $expectedAreaCode - * @param string $actualAreaCode - */ - public function testLoadAreaConfiguration($expectedAreaCode, $actualAreaCode) - { - $this->_prepareObjectManagerForLoadAreaConfigurationTests($expectedAreaCode); - if ($actualAreaCode) { - $this->_objectManager->loadAreaConfiguration($actualAreaCode); - } else { - $this->_objectManager->loadAreaConfiguration(); - } - } - public function testCreate() { $this->_prepareObjectManagerForGetCreateTests(true); @@ -145,48 +115,6 @@ class Magento_ObjectManager_ZendTest extends PHPUnit_Framework_TestCase $this->assertEquals(self::OBJECT_GET, $actualObject); } - /** - * Create Magento_ObjectManager_Zend instance for testLoadAreaConfiguration - * - * @param string $expectedAreaCode - */ - protected function _prepareObjectManagerForLoadAreaConfigurationTests($expectedAreaCode) - { - /** @var $modelConfigMock Mage_Core_Model_Config */ - $this->_magentoConfig = $this->getMock('Mage_Core_Model_Config', array('getNode', 'loadBase'), - array(), '', false - ); - - $nodeMock = $this->getMock('Varien_Object', array('asArray'), array(), '', false); - $nodeArrayValue = array('alias' => array(1)); - $nodeMock->expects($this->once()) - ->method('asArray') - ->will($this->returnValue($nodeArrayValue)); - - $expectedConfigPath = $expectedAreaCode . '/' . Magento_ObjectManager_Zend::CONFIGURATION_DI_NODE; - $this->_magentoConfig->expects($this->once()) - ->method('getNode') - ->with($expectedConfigPath) - ->will($this->returnValue($nodeMock)); - - /** @var $instanceManagerMock Zend\Di\InstanceManager */ - $this->_instanceManager = $this->getMock('Magento_Di_InstanceManager_Zend', - array('addSharedInstance', 'addAlias'), array(), '', false); - $this->_instanceManager->expects($this->once()) - ->method('addAlias'); - - $this->_diInstance = $this->getMock('Magento_Di_Zend', - array('instanceManager', 'get'), array(), '', false); - $this->_diInstance->expects($this->exactly(2)) - ->method('instanceManager') - ->will($this->returnValue($this->_instanceManager)); - $this->_diInstance->expects($this->once()) - ->method('get') - ->will($this->returnValue($this->_magentoConfig)); - - $this->_objectManager = new Magento_ObjectManager_Zend(null, $this->_diInstance); - } - /** * Create Magento_ObjectManager_Zend instance * @@ -222,25 +150,6 @@ class Magento_ObjectManager_ZendTest extends PHPUnit_Framework_TestCase $this->_objectManager = new Magento_ObjectManager_Zend(null, $this->_diInstance); } - /** - * Data provider for testLoadAreaConfiguration - * - * @return array - */ - public function loadAreaConfigurationDataProvider() - { - return array( - 'specified area' => array( - '$expectedAreaCode' => self::AREA_CODE, - '$actualAreaCode' => self::AREA_CODE, - ), - 'default area' => array( - '$expectedAreaCode' => Magento_ObjectManager_Zend::CONFIGURATION_AREA, - '$actualAreaCode' => null, - ), - ); - } - /** * Callback to use instead InstanceManager::addSharedInstance * diff --git a/dev/tools/di/compiler.php b/dev/tools/di/compiler.php index 41790602b1c619f67152e7417b2a24422c676935..861d1f046d835ed0ad4d24c86b252bfb5f881a14 100644 --- a/dev/tools/di/compiler.php +++ b/dev/tools/di/compiler.php @@ -24,25 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Constants definition - */ -define('DS', DIRECTORY_SEPARATOR); -define('BP', realpath(__DIR__ . '/../../..')); -/** - * Require necessary files - */ -require_once BP . '/app/code/core/Mage/Core/functions.php'; -require_once BP . '/app/Mage.php'; - -require __DIR__ . '/../../../app/autoload.php'; -Magento_Autoload_IncludePath::addIncludePath(array( - BP . DS . 'app' . DS . 'code' . DS . 'local', - BP . DS . 'app' . DS . 'code' . DS . 'community', - BP . DS . 'app' . DS . 'code' . DS . 'core', - BP . DS . 'lib', -)); -$definitions = array(); +require __DIR__ . '/../../../app/bootstrap.php'; class ArrayDefinitionCompiler { @@ -269,6 +251,7 @@ class ArrayDefinitionCompiler } } +$definitions = array(); $compiler = new ArrayDefinitionCompiler(); foreach (glob(BP . '/app/code/*') as $codePoolDir) { @@ -289,6 +272,8 @@ echo "Compiling Magento\n"; $definitions = array_merge_recursive($definitions, $compiler->compileModule(BP . '/lib/Magento')); echo "Compiling Mage\n"; $definitions = array_merge_recursive($definitions, $compiler->compileModule(BP . '/lib/Mage')); +echo "Compiling generated entities\n"; +$definitions = array_merge_recursive($definitions, $compiler->compileModule(BP . '/var/generation')); foreach ($definitions as $key => $definition) { $definitions[$key] = json_encode($definition); diff --git a/dev/tools/di/entity_generator.php b/dev/tools/di/entity_generator.php new file mode 100644 index 0000000000000000000000000000000000000000..10b0a38afa81674f1638db95d30be414abffad89 --- /dev/null +++ b/dev/tools/di/entity_generator.php @@ -0,0 +1,60 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Tools + * @package DI + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require __DIR__ . '/../../../app/bootstrap.php'; + +$generator = new Magento_Di_Generator(); +$generatedEntities = $generator->getGeneratedEntities(); +if (!isset($argv[1]) || in_array($argv[1], array('-?', '/?', '-help', '--help'))) { + $message = " * Usage: php entity_generator.php [" . implode('|', $generatedEntities) + . "] <required_entity_class_name>\n" + . " * Example: php entity_generator.php factory Mage_Tag_Model_Tag" + . " - will generate file var/generation/Mage/Tag/Model/TagFactory.php\n"; + print($message); + exit(); +} + +$entityType = $argv[1]; +if (!in_array($argv[1], $generatedEntities)) { + print "Error! Unknown entity type.\n"; + exit(); +} + +if (!isset($argv[2])) { + print "Error! Please, specify class name.\n"; + exit(); +} +$className = $argv[2] . ucfirst($entityType); + +try { + if ($generator->generateClass($className)) { + print("Class {$className} was successfully generated.\n"); + } else { + print("Can't generate class {$className}. This class either not generated entity, or it already exists.\n"); + } +} catch (Magento_Exception $e) { + print("Error! {$e->getMessage()}\n"); +} diff --git a/lib/Magento/Autoload/IncludePath.php b/lib/Magento/Autoload/IncludePath.php index 869b874cc59c8d7afff1c7e8f4567fcc3925460b..225b059bc6f395f6426c2b51fef8122857838f41 100644 --- a/lib/Magento/Autoload/IncludePath.php +++ b/lib/Magento/Autoload/IncludePath.php @@ -37,12 +37,24 @@ class Magento_Autoload_IncludePath * @return string|bool */ public static function getFile($class) + { + $relativePath = self::getFilePath($class); + return stream_resolve_include_path($relativePath); + } + + /** + * Get relative file path for specified class + * + * @static + * @param string $class + * @return string + */ + public static function getFilePath($class) { if (strpos($class, self::NS_SEPARATOR) !== false) { $class = ltrim(str_replace(self::NS_SEPARATOR, '_', $class), '_'); } - $relativePath = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php'; - return stream_resolve_include_path($relativePath); + return str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php'; } /** diff --git a/lib/Magento/Convert/Excel.php b/lib/Magento/Convert/Excel.php index 5b2e5d4d9a736f2ea347daa066238a9c6cdae289..0db29260f163c1c6723fa2f4ce0cd06dc7b9d4e9 100644 --- a/lib/Magento/Convert/Excel.php +++ b/lib/Magento/Convert/Excel.php @@ -181,6 +181,7 @@ class Magento_Convert_Excel /** * Convert Data to Excel XML Document * + * @param string $sheetName * @return string */ public function convert($sheetName = '') @@ -197,14 +198,17 @@ class Magento_Convert_Excel /** * Write Converted XML Data to Temporary File + * + * @param Magento_Filesystem_StreamInterface $stream + * @param string $sheetName */ - public function write(Varien_Io_Abstract $ioStream, $sheetName = '') + public function write(Magento_Filesystem_StreamInterface $stream, $sheetName = '') { - $ioStream->streamWrite($this->_getXmlHeader($sheetName)); + $stream->write($this->_getXmlHeader($sheetName)); foreach ($this->_iterator as $dataRow) { - $ioStream->streamWrite($this->_getXmlRow($dataRow, true)); + $stream->write($this->_getXmlRow($dataRow, true)); } - $ioStream->streamWrite($this->_getXmlFooter()); + $stream->write($this->_getXmlFooter()); } } \ No newline at end of file diff --git a/lib/Magento/Date/Jquery/Calendar.php b/lib/Magento/Date/Jquery/Calendar.php deleted file mode 100644 index 218f36b081728bcf4139fa370f178e530d370fe3..0000000000000000000000000000000000000000 --- a/lib/Magento/Date/Jquery/Calendar.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category Magento - * @package Magento_Date_Jquery - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Converter of calendar date formats used by the jQuery datepicker. - * - * @category Magento - * @package Magento_Date_Jquery - * @author Magento Core Team <core@magentocommerce.com> - */ -class Magento_Date_Jquery_Calendar -{ - /** - * Mapping that converts Zend and old calendar formats to jQuery datepicker compatible formats. - * - * @var array - */ - private static $_toJavascriptDateFormatMap - = array( - 'EEEEE' => 'D', /* Day of the week, abbreviated, three characters. */ - 'EEEE' => 'DD', /* Day of the week, complete. */ - 'EEE' => 'D', - 'ee' => 'dd', /* Day of the week, two digits. */ - 'e' => 'd', /* Day of the week, one digit. */ - 'MMMMM' => 'M', /* Month, abbreviated, three characters. */ - 'MMMM' => 'MM', /* Month, complete. */ - 'MMM' => 'M', - 'MM' => 'mm', /* Month, two digit. */ - 'M' => 'm', /* Month, one or two digits. */ - 'YYYYY' => 'yy', /* Year, up to four digits. */ - 'YYYY' => 'yy', - 'YYY' => 'yy', - 'YY' => 'yy', - 'Y' => 'y', /* Year, up to two digits. */ - 'yyyyy' => 'yy', - 'yyyy' => 'yy', - 'yyy' => 'yy', - '%c' => 'yy-MM-dd', - '%A' => 'DD', - '%a' => 'D', - '%j' => 'D', - '%B' => 'MM', - '%b' => 'M', - '%m' => 'mm', - '%d' => 'dd', - '%e' => 'd', - '%Y' => 'yy' - ); - - /** - * Mapping that converts Zend time formats to formats compatible with the old calendar. - * - * @var array - */ - private static $_toCalendarTimeFormatMap - = array( - 'a' => '%p', - 'hh' => '%I', - 'h' => '%I', - 'HH' => '%H', - 'H' => '%H', - 'mm' => '%M', - 'ss' => '%S', - 'z' => '%Z', - 'v' => '%Z' - ); - - /** - * Convert from Zend and old calendar date formats to jQuery datepicker compatible date formats. - * Convert from Zend time formats to old calendar time formats. - * - * @param string $value - * @param boolean $convertDate: Converts to jQuery compatible date format (e.g. %m/%d/%Y -> mm/dd/yy). - * @param boolean $convertTime: Converts to old calendar time format (e.g. HH:mm:ss -> %H:%M:%S). - * - * @return string - */ - public static function convertToDateTimeFormat($value, $convertDate = true, $convertTime = true) - { - if ($convertTime) { - /* Converts from Zend time formats to old calendar time formats. */ - $value = self::_convert($value, self::$_toCalendarTimeFormatMap); - } - if ($convertDate) { - /* Converts from Zend and old calendar date formats to jQuery datepicker compatible date formats. */ - $value = self::_convert($value, self::$_toJavascriptDateFormatMap); - } - return $value; - } - - /** - * Convert value by dictionary. - * - * @param string $value - * @param array $dictionary - * - * @return string - */ - protected static function _convert($value, $dictionary) - { - foreach ($dictionary as $search => $replace) { - $value = preg_replace('/(^|[^%])' . $search . '/', '$1' . $replace, $value); - } - return $value; - } -} diff --git a/lib/Magento/Di/Definition/CompilerDefinition/Zend.php b/lib/Magento/Di/Definition/CompilerDefinition/Zend.php index 514948958779b47211a1144806883b28e26d7c30..fc57a554e8eb1f5e054f6951e88a83d0cbd86374 100644 --- a/lib/Magento/Di/Definition/CompilerDefinition/Zend.php +++ b/lib/Magento/Di/Definition/CompilerDefinition/Zend.php @@ -25,11 +25,29 @@ */ use Zend\Di\Exception, - Zend\Code\Reflection; + Zend\Code\Reflection, + Zend\Di\Definition\IntrospectionStrategy; class Magento_Di_Definition_CompilerDefinition_Zend extends Zend\Di\Definition\CompilerDefinition implements Magento_Di_Definition_CompilerDefinition { + /** + * @var Magento_Di_Generator_Class + */ + protected $_classGenerator; + + /** + * @param Magento_Di_Generator_Class $classGenerator + * @param Zend\Di\Definition\IntrospectionStrategy $strategy + */ + public function __construct( + IntrospectionStrategy $strategy = null, + Magento_Di_Generator_Class $classGenerator = null + ) { + parent::__construct($strategy); + $this->_classGenerator = $classGenerator ?: new Magento_Di_Generator_Class(); + } + /** * Process class method parameters * @@ -78,4 +96,13 @@ class Magento_Di_Definition_CompilerDefinition_Zend extends Zend\Di\Definition\C $this->classes ); } + + /** + * @param string $class + */ + protected function processClass($class) + { + $this->_classGenerator->generateForConstructor($class); + parent::processClass($class); + } } diff --git a/lib/Magento/Di/Definition/RuntimeDefinition/Zend.php b/lib/Magento/Di/Definition/RuntimeDefinition/Zend.php index 48f3ef893880562ba37539e84176115c10c91353..352a35befc6e2306a2c393af4342e21232f4371e 100644 --- a/lib/Magento/Di/Definition/RuntimeDefinition/Zend.php +++ b/lib/Magento/Di/Definition/RuntimeDefinition/Zend.php @@ -24,11 +24,31 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -use Zend\Code\Reflection; +use Zend\Code\Reflection, + Zend\Di\Definition\IntrospectionStrategy; class Magento_Di_Definition_RuntimeDefinition_Zend extends Zend\Di\Definition\RuntimeDefinition implements Magento_Di_Definition_RuntimeDefinition { + /** + * @var Magento_Di_Generator_Class + */ + protected $_classGenerator; + + /** + * @param Zend\Di\Definition\IntrospectionStrategy $strategy + * @param array $explicitClasses + * @param Magento_Di_Generator_Class $classGenerator + */ + public function __construct( + IntrospectionStrategy $strategy = null, + array $explicitClasses = null, + Magento_Di_Generator_Class $classGenerator = null + ) { + parent::__construct($strategy, $explicitClasses); + $this->_classGenerator = $classGenerator ?: new Magento_Di_Generator_Class(); + } + /** * Process method parameters * @@ -67,4 +87,14 @@ class Magento_Di_Definition_RuntimeDefinition_Zend extends Zend\Di\Definition\Ru } } + + /** + * @param string $class + * @return array|string + */ + public function getInstantiator($class) + { + $this->_classGenerator->generateForConstructor($class); + return parent::getInstantiator($class); + } } diff --git a/lib/Magento/Di/Generator.php b/lib/Magento/Di/Generator.php new file mode 100644 index 0000000000000000000000000000000000000000..0cac4b05c3abf77e399c1db425424d49958002f1 --- /dev/null +++ b/lib/Magento/Di/Generator.php @@ -0,0 +1,148 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator +{ + /** + * @var Magento_Di_Generator_EntityAbstract + */ + protected $_generator; + + /** + * @var Magento_Autoload_IncludePath + */ + protected $_autoloader; + + /** + * @var Magento_Di_Generator_Io + */ + protected $_ioObject; + + /** + * @var array + */ + protected $_generatedEntities = array( + Magento_Di_Generator_Factory::ENTITY_TYPE, + Magento_Di_Generator_Proxy::ENTITY_TYPE + ); + + /** + * @param Magento_Di_Generator_EntityAbstract $generator + * @param Magento_Autoload_IncludePath $autoloader + * @param Magento_Di_Generator_Io $ioObject + */ + public function __construct( + Magento_Di_Generator_EntityAbstract $generator = null, + Magento_Autoload_IncludePath $autoloader = null, + Magento_Di_Generator_Io $ioObject = null + ) { + $this->_generator = $generator; + $this->_autoloader = $autoloader ? : new Magento_Autoload_IncludePath(); + $this->_ioObject = $ioObject ? : new Magento_Di_Generator_Io(new Varien_Io_File(), $this->_autoloader); + } + + /** + * @return array + */ + public function getGeneratedEntities() + { + return $this->_generatedEntities; + } + + /** + * @param $className + * @return bool + * @throws Magento_Exception + */ + public function generateClass($className) + { + // check if source class a generated entity + $entity = null; + $entityName = null; + foreach ($this->_generatedEntities as $entityType) { + $entitySuffix = ucfirst($entityType); + // if $className string ends on $entitySuffix substring + if (strrpos($className, $entitySuffix) === strlen($className) - strlen($entitySuffix)) { + $entity = $entityType; + $entityName = rtrim(substr($className, 0, -1 * strlen($entitySuffix)), '_'); + break; + } + } + if (!$entity || !$entityName) { + return false; + } + + // check if file already exists + $autoloader = $this->_autoloader; + if ($autoloader::getFile($className)) { + return false; + } + + // generate class file + $this->_initGenerator($entity, $entityName, $className); + if (!$this->_generator->generate()) { + $errors = $this->_generator->getErrors(); + throw new Magento_Exception(implode(' ', $errors)); + } + + // remove generator + $this->_generator = null; + + return true; + } + + /** + * Get generator by entity type + * + * @param string $entity + * @param string $sourceClassName + * @param string $resultClassName + * @return Magento_Di_Generator_EntityAbstract|Magento_Di_Generator_Factory|Magento_Di_Generator_Proxy + * @throws InvalidArgumentException + */ + protected function _initGenerator($entity, $sourceClassName, $resultClassName) + { + if (!$this->_generator) { + switch ($entity) { + case Magento_Di_Generator_Factory::ENTITY_TYPE: + $this->_generator = new Magento_Di_Generator_Factory($sourceClassName, $resultClassName, + $this->_ioObject + ); + break; + case Magento_Di_Generator_Proxy::ENTITY_TYPE: + $this->_generator = new Magento_Di_Generator_Proxy($sourceClassName, $resultClassName, + $this->_ioObject + ); + break; + default: + throw new InvalidArgumentException('Unknown generation entity.'); + break; + } + } + + return $this->_generator; + } +} diff --git a/lib/Magento/Di/Generator/Class.php b/lib/Magento/Di/Generator/Class.php new file mode 100644 index 0000000000000000000000000000000000000000..ac337e0f8d22e15cd5c4bbf7461ef0f5bd1a7013 --- /dev/null +++ b/lib/Magento/Di/Generator/Class.php @@ -0,0 +1,62 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_Class +{ + /** + * @var Magento_Di_Generator + */ + protected $_generator; + + /** + * @param Magento_Di_Generator $generator + */ + public function __construct(Magento_Di_Generator $generator = null) + { + $this->_generator = $generator ?: new Magento_Di_Generator(); + } + + /** + * Generate all not existing entity classes in constructor + * + * @param string $className + */ + public function generateForConstructor($className) + { + $reflectionClass = new ReflectionClass($className); + if ($reflectionClass->hasMethod('__construct')) { + $constructor = $reflectionClass->getMethod('__construct'); + $parameters = $constructor->getParameters(); + /** @var $parameter ReflectionParameter */ + foreach ($parameters as $parameter) { + preg_match('/\[\s\<\w+?>\s([\w\\\\]+)/s', $parameter->__toString(), $matches); + if (isset($matches[1])) { + $this->_generator->generateClass($matches[1]); + } + } + } + } +} diff --git a/lib/Magento/Di/Generator/CodeGenerator/Interface.php b/lib/Magento/Di/Generator/CodeGenerator/Interface.php new file mode 100644 index 0000000000000000000000000000000000000000..fa0af4e56445adaacd39d4d2504cd30cce5cb1aa --- /dev/null +++ b/lib/Magento/Di/Generator/CodeGenerator/Interface.php @@ -0,0 +1,66 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +interface Magento_Di_Generator_CodeGenerator_Interface extends \Zend\Code\Generator\GeneratorInterface +{ + /** + * @param string $name + * @return Magento_Di_Generator_CodeGenerator_Interface + */ + public function setName($name); + + /** + * @param array $docBlock + * @return Magento_Di_Generator_CodeGenerator_Interface + */ + public function setClassDocBlock(array $docBlock); + + /** + * @param array $properties + * @return Magento_Di_Generator_CodeGenerator_Interface + */ + public function addProperties(array $properties); + + /** + * @param array $methods + * @return Magento_Di_Generator_CodeGenerator_Interface + */ + public function addMethods(array $methods); + + /** + * @param string $extendedClass + * @return Magento_Di_Generator_CodeGenerator_Interface + */ + public function setExtendedClass($extendedClass); + + /** + * setImplementedInterfaces() + * + * @param array $interfaces + * @return Magento_Di_Generator_CodeGenerator_Interface + */ + public function setImplementedInterfaces(array $interfaces); +} diff --git a/lib/Magento/Di/Generator/CodeGenerator/Zend.php b/lib/Magento/Di/Generator/CodeGenerator/Zend.php new file mode 100644 index 0000000000000000000000000000000000000000..36f1f5f0ef652695490ff2b0e390db906a633b20 --- /dev/null +++ b/lib/Magento/Di/Generator/CodeGenerator/Zend.php @@ -0,0 +1,209 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_CodeGenerator_Zend extends Zend\Code\Generator\ClassGenerator + implements Magento_Di_Generator_CodeGenerator_Interface +{ + /** + * Possible doc block options + * + * @var array + */ + protected $_docBlockOptions = array( + 'shortDescription' => 'setShortDescription', + 'longDescription' => 'setLongDescription', + 'tags' => 'setTags' + ); + + /** + * Possible class property options + * + * @var array + */ + protected $_propertyOptions = array( + 'name' => 'setName', + 'const' => 'setConst', + 'static' => 'setStatic', + 'visibility' => 'setVisibility', + 'defaultValue' => 'setDefaultValue', + ); + + /** + * Possible class method options + * + * @var array + */ + protected $_methodOptions = array( + 'name' => 'setName', + 'final' => 'setFinal', + 'static' => 'setStatic', + 'abstract' => 'setAbstract', + 'visibility' => 'setVisibility', + 'body' => 'setBody', + ); + + /** + * Possible method parameter options + * + * @var array + */ + protected $_parameterOptions = array( + 'name' => 'setName', + 'type' => 'setType', + 'defaultValue' => 'setDefaultValue', + 'passedByReference' => 'setPassedByReference' + ); + + /** + * @param object $object + * @param array $data + * @param array $map + * @return void + */ + protected function _setDataToObject($object, array $data, array $map) + { + foreach ($map as $arrayKey => $setterName) { + if (isset($data[$arrayKey])) { + $object->{$setterName}($data[$arrayKey]); + } + } + } + + /** + * Set class dock block + * + * @param array $docBlock + * @return Magento_Di_Generator_CodeGenerator_Zend + */ + public function setClassDocBlock(array $docBlock) + { + $docBlockObject = new Zend\Code\Generator\DocBlockGenerator(); + $this->_setDataToObject($docBlockObject, $docBlock, $this->_docBlockOptions); + + return parent::setDocBlock($docBlockObject); + } + + /** + * addMethods() + * + * @param array $methods + * @return Magento_Di_Generator_CodeGenerator_Zend + */ + public function addMethods(array $methods) + { + foreach ($methods as $methodOptions) { + $methodObject = new Zend\Code\Generator\MethodGenerator(); + $this->_setDataToObject($methodObject, $methodOptions, $this->_methodOptions); + + if (isset($methodOptions['parameters']) && is_array($methodOptions['parameters']) + && count($methodOptions['parameters']) > 0 + ) { + $parametersArray = array(); + foreach ($methodOptions['parameters'] as $parameterOptions) { + $parameterObject = new Zend\Code\Generator\ParameterGenerator(); + $this->_setDataToObject($parameterObject, $parameterOptions, $this->_parameterOptions); + $parametersArray[] = $parameterObject; + } + + $methodObject->setParameters($parametersArray); + } + + if (isset($methodOptions['docblock']) && is_array($methodOptions['docblock'])) { + $docBlockObject = new Zend\Code\Generator\DocBlockGenerator(); + $this->_setDataToObject($docBlockObject, $methodOptions['docblock'], $this->_docBlockOptions); + + $methodObject->setDocBlock($docBlockObject); + } + + $this->addMethodFromGenerator($methodObject); + } + return $this; + } + + /** + * Add method from MethodGenerator + * + * @param Zend\Code\Generator\MethodGenerator $method + * @return Magento_Di_Generator_CodeGenerator_Zend + * @throws InvalidArgumentException + */ + public function addMethodFromGenerator(Zend\Code\Generator\MethodGenerator $method) + { + if (!is_string($method->getName())) { + throw new InvalidArgumentException( + 'addMethodFromGenerator() expects string for name' + ); + } + + return parent::addMethodFromGenerator($method); + } + + /** + * addProperties() + * + * @param array $properties + * @return Magento_Di_Generator_CodeGenerator_Zend + * @throws InvalidArgumentException + */ + public function addProperties(array $properties) + { + foreach ($properties as $propertyOptions) { + $propertyObject = new Zend\Code\Generator\PropertyGenerator(); + $this->_setDataToObject($propertyObject, $propertyOptions, $this->_propertyOptions); + + if (isset($propertyOptions['docblock'])) { + $docBlock = $propertyOptions['docblock']; + if (is_array($docBlock)) { + $docBlockObject = new Zend\Code\Generator\DocBlockGenerator(); + $this->_setDataToObject($docBlockObject, $docBlock, $this->_docBlockOptions); + $propertyObject->setDocBlock($docBlockObject); + } + } + + $this->addPropertyFromGenerator($propertyObject); + } + + return $this; + } + + /** + * Add property from PropertyGenerator + * + * @param Zend\Code\Generator\PropertyGenerator $property + * @throws InvalidArgumentException + * @return Magento_Di_Generator_CodeGenerator_Zend + */ + public function addPropertyFromGenerator(Zend\Code\Generator\PropertyGenerator $property) + { + if (!is_string($property->getName())) { + throw new InvalidArgumentException( + 'addPropertyFromGenerator() expects string for name' + ); + } + + return parent::addPropertyFromGenerator($property); + } +} diff --git a/lib/Magento/Di/Generator/EntityAbstract.php b/lib/Magento/Di/Generator/EntityAbstract.php new file mode 100644 index 0000000000000000000000000000000000000000..5ff7980fee6d4fb1728c2b5c58ed97d4620bf715 --- /dev/null +++ b/lib/Magento/Di/Generator/EntityAbstract.php @@ -0,0 +1,351 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +abstract class Magento_Di_Generator_EntityAbstract +{ + /** + * Entity type + */ + const ENTITY_TYPE = 'abstract'; + + /** + * @var array + */ + private $_errors = array(); + + /** + * Source model class name + * + * @var string + */ + private $_sourceClassName; + + /** + * Result model class name + * + * @var string + */ + private $_resultClassName; + + /** + * @var Magento_Di_Generator_Io + */ + private $_ioObject; + + /** + * Autoloader instance + * + * @var Magento_Autoload_IncludePath + */ + private $_autoloader; + + /** + * Class generator object + * + * @var Magento_Di_Generator_CodeGenerator_Interface + */ + protected $_classGenerator; + + /** + * @param string $sourceClassName + * @param string $resultClassName + * @param Magento_Di_Generator_Io $ioObject + * @param Magento_Di_Generator_CodeGenerator_Interface $classGenerator + * @param Magento_Autoload_IncludePath $autoLoader + */ + public function __construct( + $sourceClassName = null, + $resultClassName = null, + Magento_Di_Generator_Io $ioObject = null, + Magento_Di_Generator_CodeGenerator_Interface $classGenerator = null, + Magento_Autoload_IncludePath $autoLoader = null + ) { + if ($autoLoader) { + $this->_autoloader = $autoLoader; + } else { + $this->_autoloader = new Magento_Autoload_IncludePath(); + } + if ($ioObject) { + $this->_ioObject = $ioObject; + } else { + $this->_ioObject = new Magento_Di_Generator_Io(new Varien_Io_File(), $this->_autoloader); + } + if ($classGenerator) { + $this->_classGenerator = $classGenerator; + } else { + $this->_classGenerator = new Magento_Di_Generator_CodeGenerator_Zend(); + } + + $this->_sourceClassName = ltrim($sourceClassName, Magento_Autoload_IncludePath::NS_SEPARATOR); + if ($resultClassName) { + $this->_resultClassName = $resultClassName; + } elseif ($sourceClassName) { + $this->_resultClassName = $this->_getDefaultResultClassName($sourceClassName); + } + } + + /** + * Generation template method + * + * @return bool + */ + public function generate() + { + try { + if ($this->_validateData()) { + $sourceCode = $this->_generateCode(); + if ($sourceCode) { + $fileName = $this->_ioObject->getResultFileName($this->_getResultClassName()); + $this->_ioObject->writeResultFile($fileName, $sourceCode); + return true; + } else { + $this->_addError('Can\'t generate source code.'); + } + } + } catch (Exception $e) { + $this->_addError($e->getMessage()); + } + return false; + } + + /** + * List of occurred generation errors + * + * @return array + */ + public function getErrors() + { + return $this->_errors; + } + + /** + * @return string + */ + protected function _getSourceClassName() + { + return $this->_sourceClassName; + } + + /** + * @param string $className + * @return string + */ + protected function _getFullyQualifiedClassName($className) + { + return Magento_Autoload_IncludePath::NS_SEPARATOR + . ltrim($className, Magento_Autoload_IncludePath::NS_SEPARATOR); + } + + /** + * @return string + */ + protected function _getResultClassName() + { + return $this->_resultClassName; + } + + /** + * @param string $modelClassName + * @return string + */ + protected function _getDefaultResultClassName($modelClassName) + { + return $modelClassName . ucfirst(static::ENTITY_TYPE); + } + + /** + * Returns list of properties for class generator + * + * @return array + */ + protected function _getClassProperties() + { + // const CLASS_NAME = '<source_class_name>'; + $className = array( + 'name' => 'CLASS_NAME', + 'const' => true, + 'defaultValue' => $this->_getSourceClassName(), + 'docblock' => array('shortDescription' => 'Entity class name'), + ); + + // protected $_objectManager = null; + $objectManager = array( + 'name' => '_objectManager', + 'visibility' => 'protected', + 'docblock' => array( + 'shortDescription' => 'Object Manager instance', + 'tags' => array( + array('name' => 'var', 'description' => '\Magento_ObjectManager') + ) + ), + ); + + return array($className, $objectManager); + } + + /** + * Get default constructor definition for generated class + * + * @return array + */ + protected function _getDefaultConstructorDefinition() + { + // public function __construct(\Magento_ObjectManager $objectManager) + return array( + 'name' => '__construct', + 'parameters' => array( + array('name' => 'objectManager', 'type' => '\Magento_ObjectManager'), + ), + 'body' => '$this->_objectManager = $objectManager;', + 'docblock' => array( + 'shortDescription' => ucfirst(static::ENTITY_TYPE) . ' constructor', + 'tags' => array( + array( + 'name' => 'param', + 'description' => '\Magento_ObjectManager $objectManager' + ), + ), + ), + ); + } + + /** + * Returns list of methods for class generator + * + * @return mixed + */ + abstract protected function _getClassMethods(); + + /** + * @return string + */ + protected function _generateCode() + { + $this->_classGenerator + ->setName($this->_getResultClassName()) + ->addProperties($this->_getClassProperties()) + ->addMethods($this->_getClassMethods()) + ->setClassDocBlock($this->_getClassDocBlock()); + + return $this->_getGeneratedCode(); + } + + /** + * @param string $message + * @return Magento_Di_Generator_EntityAbstract + */ + protected function _addError($message) + { + $this->_errors[] = $message; + return $this; + } + + /** + * @return bool + */ + protected function _validateData() + { + $sourceClassName = $this->_getSourceClassName(); + $resultClassName = $this->_getResultClassName(); + $resultFileName = $this->_ioObject->getResultFileName($resultClassName); + + $autoloader = $this->_autoloader; + + if (!$autoloader::getFile($sourceClassName)) { + $this->_addError('Source class ' . $sourceClassName . ' doesn\'t exist.'); + return false; + } elseif ($autoloader::getFile($resultClassName)) { + $this->_addError('Result class ' . $resultClassName . ' already exists.'); + return false; + } elseif (!$this->_ioObject->makeGenerationDirectory()) { + $this->_addError('Can\'t create directory ' . $this->_ioObject->getGenerationDirectory() . '.'); + return false; + } elseif (!$this->_ioObject->makeResultFileDirectory($resultClassName)) { + $this->_addError( + 'Can\'t create directory ' . $this->_ioObject->getResultFileDirectory($resultClassName) . '.' + ); + return false; + } elseif ($this->_ioObject->fileExists($resultFileName)) { + $this->_addError('Result file ' . $resultFileName . ' already exists.'); + return false; + } + return true; + } + + /** + * @return array + */ + protected function _getClassDocBlock() + { + $description = ucfirst(static::ENTITY_TYPE) . ' class for ' . $this->_getSourceClassName(); + return array('shortDescription' => $description); + } + + /** + * @return string + */ + protected function _getGeneratedCode() + { + $sourceCode = $this->_classGenerator->generate(); + return $this->_fixCodeStyle($sourceCode); + } + + /** + * @param string $sourceCode + * @return mixed + */ + protected function _fixCodeStyle($sourceCode) + { + $sourceCode = str_replace(' array (', ' array(', $sourceCode); + $sourceCode = preg_replace("/{\n{2,}/m", "{\n", $sourceCode); + $sourceCode = preg_replace("/\n{2,}}/m", "\n}", $sourceCode); + return $sourceCode; + } + + /** + * Escape method parameter default value + * + * @param string $value + * @return string + */ + protected function _escapeDefaultValue($value) + { + // escape slashes + return str_replace('\\', '\\\\', $value); + } + + /** + * Get value generator for null default value + * + * @return \Zend\Code\Generator\ValueGenerator + */ + protected function _getNullDefaultValue() + { + $value = new \Zend\Code\Generator\ValueGenerator(null, \Zend\Code\Generator\ValueGenerator::TYPE_NULL); + + return $value; + } +} diff --git a/lib/Magento/Di/Generator/Factory.php b/lib/Magento/Di/Generator/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..129522392bafe92df6ba12e201092b360a9181b8 --- /dev/null +++ b/lib/Magento/Di/Generator/Factory.php @@ -0,0 +1,80 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_Factory extends Magento_Di_Generator_EntityAbstract +{ + /** + * Entity type + */ + const ENTITY_TYPE = 'factory'; + + /** + * Generic object manager factory interface + */ + const FACTORY_INTERFACE = '\Magento_ObjectManager_Factory'; + + /** + * @return string + */ + protected function _generateCode() + { + $this->_classGenerator->setImplementedInterfaces(array(self::FACTORY_INTERFACE)); + + return parent::_generateCode(); + } + + /** + * @return array + */ + protected function _getClassMethods() + { + $construct = $this->_getDefaultConstructorDefinition(); + + // public function createFromArray(array $data = array()) + $createFromArray = array( + 'name' => 'createFromArray', + 'parameters' => array( + array('name' => 'data', 'type' => 'array', 'defaultValue' => array()), + ), + 'body' => 'return $this->_objectManager->create(self::CLASS_NAME, $data, false);', + 'docblock' => array( + 'shortDescription' => 'Create class instance with specified parameters', + 'tags' => array( + array( + 'name' => 'param', + 'description' => 'array $data' + ), + array( + 'name' => 'return', + 'description' => $this->_getFullyQualifiedClassName($this->_getSourceClassName()) + ), + ), + ), + ); + + return array($construct, $createFromArray); + } +} diff --git a/lib/Magento/Di/Generator/Io.php b/lib/Magento/Di/Generator/Io.php new file mode 100644 index 0000000000000000000000000000000000000000..f8a4ccf89ef0944dcf8235a46496e5d0c72b4bf4 --- /dev/null +++ b/lib/Magento/Di/Generator/Io.php @@ -0,0 +1,165 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_Io +{ + /** + * Default code generation directory + */ + const DEFAULT_DIRECTORY = 'var/generation'; + + /** + * Directory permission for created directories + */ + const DIRECTORY_PERMISSION = 0777; + + /** + * Path to directory where new file must be created + * + * @var string + */ + private $_generationDirectory; + + /** + * @var Varien_Io_Interface + */ + private $_ioObject; + + /** + * Autoloader instance + * + * @var Magento_Autoload_IncludePath + */ + private $_autoloader; + + /** + * @var string + */ + private $_directorySeparator; + + /** + * @param Varien_Io_Interface $ioObject + * @param Magento_Autoload_IncludePath $autoLoader + * @param string $generationDirectory + */ + public function __construct(Varien_Io_Interface $ioObject = null, Magento_Autoload_IncludePath $autoLoader = null, + $generationDirectory = null + ) { + $this->_ioObject = $ioObject ? : new Varien_Io_File(); + $this->_autoloader = $autoLoader ? : new Magento_Autoload_IncludePath(); + $this->_directorySeparator = $this->_ioObject->dirsep(); + + if ($generationDirectory) { + $this->_generationDirectory + = rtrim($generationDirectory, $this->_directorySeparator) . $this->_directorySeparator; + } else { + $this->_generationDirectory + = realpath(__DIR__ . str_replace('/', $this->_directorySeparator, '/../../../../')) + . $this->_directorySeparator . self::DEFAULT_DIRECTORY . $this->_directorySeparator; + } + } + + /** + * @param string $className + * @return string + */ + public function getResultFileDirectory($className) + { + $fileName = $this->getResultFileName($className); + $pathParts = explode($this->_directorySeparator, $fileName); + unset($pathParts[count($pathParts) - 1]); + + return implode($this->_directorySeparator, $pathParts) . $this->_directorySeparator; + } + + /** + * @param string $className + * @return string + */ + public function getResultFileName($className) + { + $autoloader = $this->_autoloader; + $resultFileName = $autoloader::getFilePath($className); + return $this->_generationDirectory . $resultFileName; + } + + /** + * @param string $fileName + * @param string $content + * @return bool + */ + public function writeResultFile($fileName, $content) + { + $content = "<?php\n" . $content; + return $this->_ioObject->write($fileName, $content); + } + + /** + * @return bool + */ + public function makeGenerationDirectory() + { + return $this->_makeDirectory($this->_generationDirectory); + } + + /** + * @param string $className + * @return bool + */ + public function makeResultFileDirectory($className) + { + return $this->_makeDirectory($this->getResultFileDirectory($className)); + } + + /** + * @return string + */ + public function getGenerationDirectory() + { + return $this->_generationDirectory; + } + + /** + * @param string $fileName + * @return bool + */ + public function fileExists($fileName) + { + return $this->_ioObject->fileExists($fileName, true); + } + + /** + * @param string $directory + * @return bool + */ + private function _makeDirectory($directory) + { + if ($this->_ioObject->isWriteable($directory)) { + return true; + } + return $this->_ioObject->mkdir($directory, self::DIRECTORY_PERMISSION, true); + } +} diff --git a/lib/Magento/Di/Generator/Proxy.php b/lib/Magento/Di/Generator/Proxy.php new file mode 100644 index 0000000000000000000000000000000000000000..db03002296fc232576103140c26ed3107cfeb329 --- /dev/null +++ b/lib/Magento/Di/Generator/Proxy.php @@ -0,0 +1,141 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Di + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Magento_Di_Generator_Proxy extends Magento_Di_Generator_EntityAbstract +{ + /** + * Entity type + */ + const ENTITY_TYPE = 'proxy'; + + /** + * @return array + */ + protected function _getClassMethods() + { + $construct = $this->_getDefaultConstructorDefinition(); + + // create proxy methods for all non-static and non-final public methods (excluding constructor) + $methods = array($construct); + $reflectionClass = new ReflectionClass($this->_getSourceClassName()); + $publicMethods = $reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC); + foreach ($publicMethods as $method) { + if (!($method->isConstructor() || $method->isFinal() || $method->isStatic())) { + $methods[] = $this->_getMethodInfo($method); + } + } + + return $methods; + } + + /** + * @return string + */ + protected function _generateCode() + { + $this->_classGenerator->setExtendedClass($this->_getFullyQualifiedClassName($this->_getSourceClassName())); + + return parent::_generateCode(); + } + + /** + * Collect method info + * + * @param ReflectionMethod $method + * @return array + */ + protected function _getMethodInfo(ReflectionMethod $method) + { + $parameterNames = array(); + $parameters = array(); + foreach ($method->getParameters() as $parameter) { + $parameterNames[] = '$' . $parameter->getName(); + $parameters[] = $this->_getMethodParameterInfo($parameter); + } + + $methodInfo = array( + 'name' => $method->getName(), + 'parameters' => $parameters, + 'body' => $this->_getMethodBody($method->getName(), $parameterNames), + 'docblock' => array( + 'shortDescription' => '{@inheritdoc}', + ), + ); + + return $methodInfo; + } + + /** + * Collect method parameter info + * + * @param ReflectionParameter $parameter + * @return array + */ + protected function _getMethodParameterInfo(ReflectionParameter $parameter) + { + $parameterInfo = array( + 'name' => $parameter->getName(), + 'passedByReference' => $parameter->isPassedByReference() + ); + + if ($parameter->isArray()) { + $parameterInfo['type'] = 'array'; + } elseif ($parameter->getClass()) { + $parameterInfo['type'] = $this->_getFullyQualifiedClassName($parameter->getClass()->getName()); + } + + if ($parameter->isOptional() && $parameter->isDefaultValueAvailable()) { + $defaultValue = $parameter->getDefaultValue(); + if (is_string($defaultValue)) { + $parameterInfo['defaultValue'] = $this->_escapeDefaultValue($parameter->getDefaultValue()); + } elseif ($defaultValue === null) { + $parameterInfo['defaultValue'] = $this->_getNullDefaultValue(); + } else { + $parameterInfo['defaultValue'] = $defaultValue; + } + } + + return $parameterInfo; + } + + /** + * Build proxy method body + * + * @param string $name + * @param array $parameters + * @return string + */ + protected function _getMethodBody($name, array $parameters = array()) + { + if (count($parameters) == 0) { + $methodCall = sprintf('%s()', $name); + } else { + $methodCall = sprintf('%s(%s)', $name, implode(', ', $parameters)); + } + + return 'return $this->_objectManager->get(self::CLASS_NAME)->' . $methodCall . ';'; + } +} diff --git a/lib/Magento/Di/InstanceManager.php b/lib/Magento/Di/InstanceManager.php index 2cc14cf0686e5d559e94d8d117c872fb4d804a83..419b48db9a16adb9f3206a434556931c010fa67a 100644 --- a/lib/Magento/Di/InstanceManager.php +++ b/lib/Magento/Di/InstanceManager.php @@ -50,4 +50,21 @@ interface Magento_Di_InstanceManager * @return Magento_Di_InstanceManager */ public function removeSharedInstance($classOrAlias); + + /** + * Add type preference + * + * @param string $interfaceOrAbstract + * @param string $implementation + * @return Zend\Di\InstanceManager + */ + public function addTypePreference($interfaceOrAbstract, $implementation); + + /** + * Set parameters + * + * @param string $aliasOrClass + * @param array $parameters + */ + public function setParameters($aliasOrClass, array $parameters); } diff --git a/lib/Magento/Di/InstanceManager/Zend.php b/lib/Magento/Di/InstanceManager/Zend.php index a73db62b951afde756783b27b5d44f86031d5b7b..783f3e6247a77f71735cb5c08dc9d041b68372a9 100644 --- a/lib/Magento/Di/InstanceManager/Zend.php +++ b/lib/Magento/Di/InstanceManager/Zend.php @@ -28,6 +28,19 @@ use Zend\Di\InstanceManager; class Magento_Di_InstanceManager_Zend extends InstanceManager implements Magento_Di_InstanceManager { + /** + * @var Magento_Di_Generator + */ + protected $_generator; + + /** + * @param Magento_Di_Generator $classGenerator + */ + public function __construct(Magento_Di_Generator $classGenerator = null) + { + $this->_generator = $classGenerator ?: new Magento_Di_Generator(); + } + /** * Remove shared instance * @@ -40,4 +53,33 @@ class Magento_Di_InstanceManager_Zend extends InstanceManager implements Magento return $this; } + + /** + * Add type preference from configuration + * + * @param string $interfaceOrAbstract + * @param string $implementation + * @return Zend\Di\InstanceManager + */ + public function addTypePreference($interfaceOrAbstract, $implementation) + { + $this->_generator->generateClass($implementation); + return parent::addTypePreference($interfaceOrAbstract, $implementation); + } + + /** + * Set parameters from configuration + * + * @param string $aliasOrClass + * @param array $parameters + */ + public function setParameters($aliasOrClass, array $parameters) + { + foreach ($parameters as $parameter) { + if (is_string($parameter)) { + $this->_generator->generateClass($parameter); + } + } + parent::setParameters($aliasOrClass, $parameters); + } } diff --git a/lib/Magento/File/Size.php b/lib/Magento/File/Size.php new file mode 100644 index 0000000000000000000000000000000000000000..65c6ce9f1d4ebdbb0e36ed5440071562f2718816 --- /dev/null +++ b/lib/Magento/File/Size.php @@ -0,0 +1,155 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Framework + * @subpackage File + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Magento file size lib + */ +class Magento_File_Size +{ + /** + * Maximum file size for MAX_FILE_SIZE attribute of a form + * + * @link http://www.php.net/manual/en/features.file-upload.post-method.php + * @var integer + */ + protected static $_maxFileSize = -1; + + /** + * Get post max size + * + * @return string + */ + public function getPostMaxSize() + { + return $this->_iniGet('post_max_size'); + } + + /** + * Get upload max size + * + * @return string + */ + public function getUploadMaxSize() + { + return $this->_iniGet('upload_max_filesize'); + } + + /** + * Get max file size in megabytes + * + * @param int $precision + * @param int $mode + * @return float + */ + public function getMaxFileSizeInMb($precision = 0, $mode = PHP_ROUND_HALF_DOWN) + { + return $this->getFileSizeInMb($this->getMaxFileSize(), $precision, $mode); + } + + /** + * Get file size in megabytes + * + * @param int $fileSize + * @param int $precision + * @param int $mode + * @return float + */ + public function getFileSizeInMb($fileSize, $precision = 0, $mode = PHP_ROUND_HALF_DOWN) + { + return round($fileSize / (1024 * 1024), $precision, $mode); + } + + /** + * Get the maximum file size of the a form in bytes + * + * @return integer + */ + public function getMaxFileSize() + { + if (self::$_maxFileSize < 0) { + $postMaxSize = $this->convertSizeToInteger($this->getPostMaxSize()); + $uploadMaxSize = $this->convertSizeToInteger($this->getUploadMaxSize()); + $min = max($postMaxSize, $uploadMaxSize); + + if ($postMaxSize > 0) { + $min = min($min, $postMaxSize); + } + + if ($uploadMaxSize > 0) { + $min = min($min, $uploadMaxSize); + } + + self::$_maxFileSize = $min; + } + + return self::$_maxFileSize; + } + + /** + * Converts a ini setting to a integer value + * + * @param string $size + * @return integer + */ + public function convertSizeToInteger($size) + { + if (!is_numeric($size)) { + $type = strtoupper(substr($size, -1)); + $size = (integer)$size; + + switch ($type) { + case 'K': + $size *= 1024; + break; + + case 'M': + $size *= 1024 * 1024; + break; + + case 'G': + $size *= 1024 * 1024 * 1024; + break; + + default: + break; + } + } + return (integer)$size; + } + + /** + * Gets the value of a configuration option + * + * @link http://php.net/manual/en/function.ini-get.php + * @param string $param The configuration option name + * @return string + */ + protected function _iniGet($param) + { + return trim(ini_get($param)); + } +} diff --git a/lib/Magento/Filesystem.php b/lib/Magento/Filesystem.php index 6121d38745c51d7fa033fa2569195b71154c02fb..dd6bc1aaacfaa6664587ec390647fa234128d743 100644 --- a/lib/Magento/Filesystem.php +++ b/lib/Magento/Filesystem.php @@ -67,6 +67,7 @@ class Magento_Filesystem */ public function setWorkingDirectory($dir) { + $dir = self::getAbsolutePath($dir); if (!$this->_adapter->isDirectory($dir)) { throw new InvalidArgumentException(sprintf('Working directory "%s" does not exists', $dir)); } @@ -74,6 +75,16 @@ class Magento_Filesystem return $this; } + /** + * Get current working directory. + * + * @return string + */ + public function getWorkingDirectory() + { + return $this->_workingDirectory; + } + /** * Allows to create directories when process operations * @@ -141,7 +152,6 @@ class Magento_Filesystem public function delete($key, $workingDirectory = null) { $path = $this->_getCheckedPath($key, $workingDirectory); - $this->_checkExists($path); return $this->_adapter->delete($path); } @@ -187,7 +197,6 @@ class Magento_Filesystem return $this->_adapter->copy($sourcePath, $targetPath); } - /** * Check if key is directory. * @@ -261,6 +270,28 @@ class Magento_Filesystem return $this->_adapter->getNestedKeys($this->_getCheckedPath($key, $workingDirectory)); } + /** + * Gets list of all matched keys + * + * @param string $baseDirectory + * @param string $pattern + * @return array + */ + public function searchKeys($baseDirectory, $pattern) + { + $baseDirectory = $this->_getCheckedPath($baseDirectory); + $this->_checkPathInWorkingDirectory( + rtrim($baseDirectory, self::DIRECTORY_SEPARATOR) + . self::DIRECTORY_SEPARATOR + . ltrim($pattern, self::DIRECTORY_SEPARATOR) + ); + return $this->_adapter->searchKeys( + rtrim($baseDirectory, self::DIRECTORY_SEPARATOR) + . self::DIRECTORY_SEPARATOR + . ltrim(self::fixSeparator($pattern), self::DIRECTORY_SEPARATOR) + ); + } + /** * Creates new directory * @@ -301,13 +332,42 @@ class Magento_Filesystem * Sets access and modification time of file. * * @param string $key + * @param int|null $fileModificationTime * @param string|null $workingDirectory */ - public function touch($key, $workingDirectory = null) + public function touch($key, $fileModificationTime = null, $workingDirectory = null) { $key = $this->_getCheckedPath($key, $workingDirectory); $this->ensureDirectoryExists(dirname($key), $this->_newDirPermissions); - $this->_adapter->touch($key); + $this->_adapter->touch($key, $fileModificationTime); + } + + /** + * Get file modification time. + * + * @param string $key + * @param string|null $workingDirectory + * @return int + */ + public function getMTime($key, $workingDirectory = null) + { + $key = $this->_getCheckedPath($key, $workingDirectory); + $this->_checkExists($key); + return $this->_adapter->getMTime($key); + } + + /** + * Get file size. + * + * @param string $key + * @param string|null $workingDirectory + * @return int + */ + public function getFileSize($key, $workingDirectory = null) + { + $key = $this->_getCheckedPath($key, $workingDirectory); + $this->_checkFileExists($key); + return $this->_adapter->getFileSize($key); } /** @@ -333,21 +393,34 @@ class Magento_Filesystem * * @param string $key * @param Magento_Filesystem_Stream_Mode|string $mode + * @param string|null $workingDirectory * @return Magento_Filesystem_StreamInterface * @throws InvalidArgumentException */ - public function createAndOpenStream($key, $mode) + public function createAndOpenStream($key, $mode, $workingDirectory = null) { - $stream = $this->createStream($key); - if (is_string($mode)) { - $mode = new Magento_Filesystem_Stream_Mode($mode); - } elseif (!$mode instanceof Magento_Filesystem_Stream_Mode) { + $stream = $this->createStream($key, $workingDirectory); + if (!$mode instanceof Magento_Filesystem_Stream_Mode && !is_string($mode)) { throw new InvalidArgumentException('Wrong mode parameter'); } $stream->open($mode); return $stream; } + /** + * Calculates the md5 hash of a given file + * + * @param string $key + * @param string $workingDirectory + * @return string + */ + public function getFileMd5($key, $workingDirectory = null) + { + $key = $this->_getCheckedPath($key, $workingDirectory); + $this->_checkFileExists($key); + return $this->_adapter->getFileMd5($key); + } + /** * Check that file exists * @@ -383,27 +456,23 @@ class Magento_Filesystem */ protected function _getCheckedPath($key, $workingDirectory = null) { - $path = self::getAbsolutePath($key); - $this->_checkPath($path, $workingDirectory); - return $path; + $this->_checkPathInWorkingDirectory($key, $workingDirectory); + return self::getAbsolutePath($key); } /** - * Check path isolation + * Asserts path in working directory * * @param string $key * @param string|null $workingDirectory + * @return string * @throws InvalidArgumentException */ - protected function _checkPath($key, $workingDirectory = null) + protected function _checkPathInWorkingDirectory($key, $workingDirectory = null) { - if (!$workingDirectory) { - $workingDirectory = $this->_workingDirectory; - } - if ($workingDirectory) { - if (0 !== strpos($key, $workingDirectory)) { - throw new InvalidArgumentException('Invalid path'); - } + $workingDirectory = $workingDirectory ? $workingDirectory : $this->_workingDirectory; + if (!self::isPathInDirectory($key, $workingDirectory)) { + throw new InvalidArgumentException("Path '$key' is out of working directory '$workingDirectory'"); } } @@ -442,6 +511,7 @@ class Magento_Filesystem */ public static function getPathFromArray(array $path, $isAbsolute = true) { + $path = array_map(array('Magento_Filesystem', 'fixSeparator'), $path); if (!count($path)) { throw new InvalidArgumentException('Path must contain at least one node'); } @@ -462,10 +532,22 @@ class Magento_Filesystem */ public static function getPathAsArray($path) { - $path = str_replace('\\', self::DIRECTORY_SEPARATOR, $path); + $path = self::fixSeparator($path); return explode(self::DIRECTORY_SEPARATOR, ltrim($path, self::DIRECTORY_SEPARATOR)); } + /** + * Update directory separator + * + * @static + * @param string $path + * @return string + */ + public static function fixSeparator($path) + { + return rtrim(str_replace('\\', self::DIRECTORY_SEPARATOR, $path), self::DIRECTORY_SEPARATOR); + } + /** * Check is path absolute * @@ -474,6 +556,18 @@ class Magento_Filesystem */ public static function isAbsolutePath($path) { - return $path == self::getAbsolutePath($path); + return self::fixSeparator($path) == self::getAbsolutePath($path); + } + + /** + * Checks is directory contains path + * + * @param string $path + * @param string $directory + * @return bool + */ + public static function isPathInDirectory($path, $directory) + { + return 0 === strpos(self::getAbsolutePath($path), self::getAbsolutePath($directory)); } } diff --git a/lib/Magento/Filesystem/Adapter/Local.php b/lib/Magento/Filesystem/Adapter/Local.php index 9c66478b43df106e1ff51d13232a93204d806fe6..176a89978e5b90c37b2f589ecabbd173232841cd 100644 --- a/lib/Magento/Filesystem/Adapter/Local.php +++ b/lib/Magento/Filesystem/Adapter/Local.php @@ -85,6 +85,22 @@ class Magento_Filesystem_Adapter_Local implements return copy($source, $target); } + /** + * Calculates the MD5 hash of the file specified + * + * @param $key + * @return string + * @throws Magento_Filesystem_Exception + */ + public function getFileMd5($key) + { + $hash = @md5_file($key); + if (false === $hash) { + throw new Magento_Filesystem_Exception('Unable to get file hash'); + } + return $hash; + } + /** * Deletes the file or directory recursively. * @@ -120,14 +136,20 @@ class Magento_Filesystem_Adapter_Local implements protected function _deleteNestedKeys($key) { foreach ($this->getNestedKeys($key) as $nestedKey) { - if (is_dir($nestedKey) && !is_link($nestedKey) && true !== @rmdir($nestedKey)) { - throw new Magento_Filesystem_Exception(sprintf('Failed to remove directory %s', $nestedKey)); + if (is_dir($nestedKey) && !is_link($nestedKey)) { + if (true !== @rmdir($nestedKey)) { + throw new Magento_Filesystem_Exception(sprintf('Failed to remove directory %s', $nestedKey)); + } } else { // https://bugs.php.net/bug.php?id=52176 - if (defined('PHP_WINDOWS_VERSION_MAJOR') && is_dir($nestedKey) && true !== @rmdir($nestedKey)) { - throw new Magento_Filesystem_Exception(sprintf('Failed to remove file %s', $nestedKey)); - } elseif (true !== @unlink($nestedKey)) { - throw new Magento_Filesystem_Exception(sprintf('Failed to remove file %s', $nestedKey)); + if (defined('PHP_WINDOWS_VERSION_MAJOR') && is_dir($nestedKey)) { + if (true !== @rmdir($nestedKey)) { + throw new Magento_Filesystem_Exception(sprintf('Failed to remove file %s', $nestedKey)); + } + } else { + if (true !== @unlink($nestedKey)) { + throw new Magento_Filesystem_Exception(sprintf('Failed to remove file %s', $nestedKey)); + } } } } @@ -189,6 +211,18 @@ class Magento_Filesystem_Adapter_Local implements return $result; } + /** + * Gets list of all matched keys + * + * @param string $pattern + * @return array + * @throws Magento_Filesystem_Exception + */ + public function searchKeys($pattern) + { + return glob($pattern); + } + /** * Check if key is a directory. * @@ -251,15 +285,48 @@ class Magento_Filesystem_Adapter_Local implements * Touches a file * * @param string $key + * @param int|null $fileModificationTime * @throws Magento_Filesystem_Exception */ - public function touch($key) + public function touch($key, $fileModificationTime = null) { - if (!@touch($key)) { + if (!@touch($key, $fileModificationTime)) { throw new Magento_Filesystem_Exception(sprintf('Failed to touch %s', $key)); } } + /** + * Get file modification time. + * + * @param string $key + * @return int + * @throws Magento_Filesystem_Exception + */ + public function getMTime($key) + { + $mtime = filemtime($key); + if (false === $mtime) { + throw new Magento_Filesystem_Exception(sprintf('Failed to get modification time %s', $key)); + } + return $mtime; + } + + /** + * Get file size. + * + * @param string $key + * @return int + * @throws Magento_Filesystem_Exception + */ + public function getFileSize($key) + { + $size = @filesize($key); + if (!$size) { + throw new Magento_Filesystem_Exception(sprintf('Failed to get file size %s', $key)); + } + return $size; + } + /** * Create stream object * diff --git a/lib/Magento/Filesystem/Adapter/Zlib.php b/lib/Magento/Filesystem/Adapter/Zlib.php new file mode 100644 index 0000000000000000000000000000000000000000..5dcd3d364e870923f2ae7580b3c89cd37a74b652 --- /dev/null +++ b/lib/Magento/Filesystem/Adapter/Zlib.php @@ -0,0 +1,127 @@ +<?php +/** + * Adapter for local compressed filesystem + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Magento_Filesystem_Adapter_Zlib extends Magento_Filesystem_Adapter_Local +{ + /** + * @var int + */ + protected $_compressRatio; + + /** + * @var string + */ + protected $_strategy; + + /** + * @var null|bool + */ + protected $_hasCompression = null; + + /** + * Initialize Zlib adapter. + * + * @param int $ratio + * @param string $strategy + */ + public function __construct($ratio = 1, $strategy = '') + { + $this->_compressRatio = $ratio; + $this->_strategy = $strategy; + } + + /** + * Read compressed file file + * + * @param string $key + * @return string + * @throws Magento_Filesystem_Exception + */ + public function read($key) + { + $stream = $this->createStream($key); + $stream->open('rb'); + + $info = unpack("lcompress/llength", $stream->read(8)); + + $compressed = (bool)$info['compress']; + if ($compressed && !$this->_isCompressionAvailable()) { + $stream->close(); + throw new Magento_Filesystem_Exception('The file was compressed, but zlib extension is not installed.'); + } + if ($compressed) { + $content = gzuncompress($stream->read($info['length'])); + } else { + $content = $stream->read($info['length']); + } + + $stream->close(); + return $content; + } + + /** + * Write compressed file. + * + * @param string $key + * @param string $content + * @return bool + */ + public function write($key, $content) + { + $compress = $this->_isCompressionAvailable(); + if ($compress) { + $rawContent = gzcompress($content, $this->_compressRatio); + } else { + $rawContent = $content; + } + + $fileHeaders = pack("ll", (int)$compress, strlen($rawContent)); + return parent::write($key, $fileHeaders . $rawContent); + } + + /** + * Create Zlib stream + * + * @param string $path + * @return Magento_Filesystem_Stream_Zlib + */ + public function createStream($path) + { + return new Magento_Filesystem_Stream_Zlib($path); + } + + /** + * Check that zlib extension loaded. + * + * @return bool + */ + protected function _isCompressionAvailable() + { + if (is_null($this->_hasCompression)) { + $this->_hasCompression = extension_loaded("zlib"); + } + return $this->_hasCompression; + } +} diff --git a/lib/Magento/Filesystem/AdapterInterface.php b/lib/Magento/Filesystem/AdapterInterface.php index f080126ba616703be673da89a40523b7614ae216..9ed4868a1084004c73b50d29e7e251d31d0d0356 100644 --- a/lib/Magento/Filesystem/AdapterInterface.php +++ b/lib/Magento/Filesystem/AdapterInterface.php @@ -95,6 +95,15 @@ interface Magento_Filesystem_AdapterInterface */ public function getNestedKeys($key); + /** + * Gets list of all matched keys + * + * @param string $pattern + * @return array + * @throws Magento_Filesystem_Exception + */ + public function searchKeys($pattern); + /** * Check if key is directory. * @@ -127,6 +136,15 @@ interface Magento_Filesystem_AdapterInterface */ public function isReadable($key); + /** + * Calculates the MD5 hash of the file specified + * + * @param $key + * @return string + * @throws Magento_Filesystem_Exception + */ + public function getFileMd5($key); + /** * Creates new directory * @@ -140,7 +158,24 @@ interface Magento_Filesystem_AdapterInterface * Touches a file * * @param string $key + * @param int|null $fileModificationTime * @throws Magento_Filesystem_Exception */ - public function touch($key); + public function touch($key, $fileModificationTime = null); + + /** + * Get file modification time. + * + * @param string $key + * @return int + */ + public function getMTime($key); + + /** + * Get file size. + * + * @param string $key + * @return int + */ + public function getFileSize($key); } diff --git a/lib/Magento/Filesystem/Stream/Local.php b/lib/Magento/Filesystem/Stream/Local.php index c1f8d46ef5a797c780e7feb046d09dde88dead97..b4003ca85980da024fc00a67f44bcbe0b788a534 100644 --- a/lib/Magento/Filesystem/Stream/Local.php +++ b/lib/Magento/Filesystem/Stream/Local.php @@ -51,6 +51,13 @@ class Magento_Filesystem_Stream_Local implements Magento_Filesystem_StreamInterf */ protected $_fileHandle; + /** + * Is stream locked + * + * @var bool + */ + protected $_isLocked = false; + /** * Constructor * @@ -64,11 +71,14 @@ class Magento_Filesystem_Stream_Local implements Magento_Filesystem_StreamInterf /** * Opens the stream in the specified mode * - * @param Magento_Filesystem_Stream_Mode $mode + * @param Magento_Filesystem_Stream_Mode|string $mode * @throws Magento_Filesystem_Exception If stream cannot be opened */ - public function open(Magento_Filesystem_Stream_Mode $mode) + public function open($mode) { + if (is_string($mode)) { + $mode = new Magento_Filesystem_Stream_Mode($mode); + } $fileHandle = @fopen($this->_path, $mode->getMode()); if (false === $fileHandle) { throw new Magento_Filesystem_Exception(sprintf('The stream "%s" cannot be opened', $this->_path)); @@ -165,6 +175,9 @@ class Magento_Filesystem_Stream_Local implements Magento_Filesystem_StreamInterf public function close() { $this->_assertOpened(); + if ($this->_isLocked) { + $this->unlock(); + } $result = @fclose($this->_fileHandle); if (false === $result) { @@ -240,7 +253,7 @@ class Magento_Filesystem_Stream_Local implements Magento_Filesystem_StreamInterf protected function _assertReadable() { $this->_assertOpened(); - if (false === $this->_mode->allowsRead()) { + if (false === $this->_mode->isReadAllowed()) { throw new Magento_Filesystem_Exception('The stream does not allow read.'); } } @@ -253,7 +266,7 @@ class Magento_Filesystem_Stream_Local implements Magento_Filesystem_StreamInterf protected function _assertWritable() { $this->_assertOpened(); - if (false === $this->_mode->allowsWrite()) { + if (false === $this->_mode->isWriteAllowed()) { throw new Magento_Filesystem_Exception('The stream does not allow write.'); } } @@ -269,4 +282,36 @@ class Magento_Filesystem_Stream_Local implements Magento_Filesystem_StreamInterf throw new Magento_Filesystem_Exception(sprintf('The stream "%s" is not opened', $this->_path)); } } + + /** + * Portable advisory file locking + * + * @param bool $exclusive + * @throws Magento_Filesystem_Exception + */ + public function lock($exclusive = true) + { + $this->_assertOpened(); + $lock = $exclusive ? LOCK_EX : LOCK_SH; + $this->_isLocked = flock($this->_fileHandle, $lock); + if (!$this->_isLocked) { + throw new Magento_Filesystem_Exception(sprintf('The stream "%s" can not be locked', $this->_path)); + } + } + + /** + * File unlocking + * + * @throws Magento_Filesystem_Exception + */ + public function unlock() + { + $this->_assertOpened(); + if ($this->_isLocked) { + if (!flock($this->_fileHandle, LOCK_UN)) { + throw new Magento_Filesystem_Exception(sprintf('The stream "%s" can not be unlocked', $this->_path)); + } + } + $this->_isLocked = false; + } } diff --git a/lib/Magento/Filesystem/Stream/Mode.php b/lib/Magento/Filesystem/Stream/Mode.php index f3493a445329460f8f1c07442f27225c1568f7b7..d0caf11f2e61782107150271897a44ac81c97926 100644 --- a/lib/Magento/Filesystem/Stream/Mode.php +++ b/lib/Magento/Filesystem/Stream/Mode.php @@ -85,7 +85,7 @@ class Magento_Filesystem_Stream_Mode * * @return bool */ - public function allowsRead() + public function isReadAllowed() { if ($this->_plus) { return true; @@ -99,7 +99,7 @@ class Magento_Filesystem_Stream_Mode * * @return bool */ - public function allowsWrite() + public function isWriteAllowed() { if ($this->_plus) { return true; @@ -113,7 +113,7 @@ class Magento_Filesystem_Stream_Mode * * @return bool */ - public function allowsExistingFileOpening() + public function isExistingFileOpenAllowed() { return 'x' !== $this->_base; } @@ -123,7 +123,7 @@ class Magento_Filesystem_Stream_Mode * * @return bool */ - public function allowsNewFileOpening() + public function isNewFileOpenAllowed() { return 'r' !== $this->_base; } @@ -133,7 +133,7 @@ class Magento_Filesystem_Stream_Mode * * @return bool */ - public function impliesExistingContentDeletion() + public function isExistingContentDeletionImplied() { return 'w' === $this->_base; } @@ -143,7 +143,7 @@ class Magento_Filesystem_Stream_Mode * * @return bool */ - public function impliesPositioningCursorAtTheBeginning() + public function isPositioningCursorAtTheBeginningImplied() { return 'a' !== $this->_base; } @@ -153,7 +153,7 @@ class Magento_Filesystem_Stream_Mode * * @return bool */ - public function impliesPositioningCursorAtTheEnd() + public function isPositioningCursorAtTheEndImplied() { return 'a' === $this->_base; } diff --git a/lib/Magento/Filesystem/Stream/Mode/Zlib.php b/lib/Magento/Filesystem/Stream/Mode/Zlib.php new file mode 100644 index 0000000000000000000000000000000000000000..c9a2438dfb0adbc29f2da96f9ead3e6148cf1991 --- /dev/null +++ b/lib/Magento/Filesystem/Stream/Mode/Zlib.php @@ -0,0 +1,78 @@ +<?php +/** + * Magento filesystem zlib stream mode + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Magento_Filesystem_Stream_Mode_Zlib extends Magento_Filesystem_Stream_Mode +{ + /** + * Compression ratio + * + * @var int + */ + protected $_ratio = 1; + + /** + * Compression strategy + * + * @var string + */ + protected $_strategy = ''; + + /** + * @param string $mode + */ + public function __construct($mode) + { + $searchPattern = '/(r|w|a|x|c)(b)?(\+)?(\d*)(f|h)?/'; + preg_match($searchPattern, $mode, $ratios); + if (count($ratios) > 4 && $ratios[4]) { + $this->_ratio = (int)$ratios[4]; + } + if (count($ratios) == 6) { + $this->_strategy = $ratios[5]; + } + $mode = preg_replace($searchPattern, '\1\2\3', $mode); + parent::__construct($mode); + } + + /** + * Get compression ratio + * + * @return int + */ + public function getRatio() + { + return $this->_ratio; + } + + /** + * Get compression strategy + * + * @return null|string + */ + public function getStrategy() + { + return $this->_strategy; + } +} diff --git a/lib/Magento/Filesystem/Stream/Zlib.php b/lib/Magento/Filesystem/Stream/Zlib.php new file mode 100644 index 0000000000000000000000000000000000000000..705caef9bf75319884c53611db364b78b64e95cb --- /dev/null +++ b/lib/Magento/Filesystem/Stream/Zlib.php @@ -0,0 +1,41 @@ +<?php +/** + * Magento filesystem zlib local stream + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class Magento_Filesystem_Stream_Zlib extends Magento_Filesystem_Stream_Local +{ + /** + * Opens the stream in the specified mode + * + * @param Magento_Filesystem_Stream_Mode|string $mode + */ + public function open($mode) + { + if ($mode instanceof Magento_Filesystem_Stream_Mode) { + $mode = $mode->getMode(); + } + $mode = new Magento_Filesystem_Stream_Mode_Zlib($mode); + parent::open($mode); + } +} diff --git a/lib/Magento/Filesystem/StreamInterface.php b/lib/Magento/Filesystem/StreamInterface.php index 17a53e14083fb4ff84fc686263a504b4dfdf9731..d158313f862a1e91d08563a539f428a6b44df7a0 100644 --- a/lib/Magento/Filesystem/StreamInterface.php +++ b/lib/Magento/Filesystem/StreamInterface.php @@ -28,10 +28,10 @@ interface Magento_Filesystem_StreamInterface /** * Opens the stream in the specified mode * - * @param Magento_Filesystem_Stream_Mode $mode + * @param Magento_Filesystem_Stream_Mode|string $mode * @throws Magento_Filesystem_Exception */ - public function open(Magento_Filesystem_Stream_Mode $mode); + public function open($mode); /** * Reads the specified number of bytes from the current position. @@ -116,4 +116,19 @@ interface Magento_Filesystem_StreamInterface * @throws Magento_Filesystem_Exception */ public function eof(); + + /** + * Portable advisory file locking + * + * @param bool $exclusive + * @throws Magento_Filesystem_Exception + */ + public function lock($exclusive = true); + + /** + * File unlocking + * + * @throws Magento_Filesystem_Exception + */ + public function unlock(); } diff --git a/lib/Magento/ObjectManager.php b/lib/Magento/ObjectManager.php index e11c07de71f8c3913f7e60157620c6f9f1375dca..da06c126d5e753a1f66bb9fcb327fca69f9d85e5 100644 --- a/lib/Magento/ObjectManager.php +++ b/lib/Magento/ObjectManager.php @@ -29,7 +29,6 @@ interface Magento_ObjectManager /** * Create new object instance * - * @abstract * @param string $className * @param array $arguments * @param bool $isShared @@ -40,7 +39,6 @@ interface Magento_ObjectManager /** * Retrieve cached object instance * - * @abstract * @param string $className * @param array $arguments * @return mixed @@ -48,13 +46,12 @@ interface Magento_ObjectManager public function get($className, array $arguments = array()); /** - * Load DI configuration for specified ares + * Set DI configuration * - * @abstract - * @param string $areaCode + * @param array $configuration * @return Magento_ObjectManager */ - public function loadAreaConfiguration($areaCode = null); + public function setConfiguration(array $configuration = array()); /** * Add shared instance diff --git a/lib/Magento/ObjectManager/Zend.php b/lib/Magento/ObjectManager/Zend.php index b838e01c6316c01fe9de95a95a762931ecf6d34b..6f28e52e3a4060dfbb1a49aa38e0897bd6b68b14 100644 --- a/lib/Magento/ObjectManager/Zend.php +++ b/lib/Magento/ObjectManager/Zend.php @@ -33,16 +33,6 @@ use Zend\Di\Di, */ class Magento_ObjectManager_Zend implements Magento_ObjectManager { - /** - * Default configuration area name - */ - const CONFIGURATION_AREA = 'global'; - - /** - * Dependency injection configuration node name - */ - const CONFIGURATION_DI_NODE = 'di'; - /** * Dependency injection instance * @@ -100,26 +90,32 @@ class Magento_ObjectManager_Zend implements Magento_ObjectManager /** * Load DI configuration for specified config area * - * @param string $areaCode + * @param array $configuration * @return Magento_ObjectManager_Zend */ - public function loadAreaConfiguration($areaCode = null) + public function setConfiguration(array $configuration = array()) { - if (!$areaCode) { - $areaCode = self::CONFIGURATION_AREA; - } - - /** @var $magentoConfiguration Mage_Core_Model_Config */ - $magentoConfiguration = $this->get('Mage_Core_Model_Config'); - $node = $magentoConfiguration->getNode($areaCode . '/' . self::CONFIGURATION_DI_NODE); - if ($node) { - $diConfiguration = new Config(array('instance' => $node->asArray())); - $diConfiguration->configure($this->_di); + if (isset($configuration['preferences']) && is_array($configuration['preferences'])) { + $this->_unsetOldPreferences($configuration['preferences']); } + $diConfiguration = new Config(array('instance' => $configuration)); + $diConfiguration->configure($this->_di); return $this; } + /** + * Unset old preferences because preferences from some area must override global preferences + * + * @param array $preferences + */ + protected function _unsetOldPreferences(array $preferences) + { + foreach (array_keys($preferences) as $type) { + $this->_di->instanceManager()->unsetTypePreferences($type); + } + } + /** * Add shared instance * diff --git a/lib/Varien/Data/Form/Element/Abstract.php b/lib/Varien/Data/Form/Element/Abstract.php index 53ae59a5c7c7641d1ede4ac2db8020748817a369..e8a74030ca1b0e268cd6252b8b2e3e201742caa8 100644 --- a/lib/Varien/Data/Form/Element/Abstract.php +++ b/lib/Varien/Data/Form/Element/Abstract.php @@ -36,6 +36,7 @@ abstract class Varien_Data_Form_Element_Abstract extends Varien_Data_Form_Abstra { protected $_id; protected $_type; + /** @var Varien_Data_Form */ protected $_form; protected $_elements; protected $_renderer; @@ -100,6 +101,11 @@ abstract class Varien_Data_Form_Element_Abstract extends Varien_Data_Form_Abstra return $this->_type; } + /** + * Get form + * + * @return Varien_Data_Form + */ public function getForm() { return $this->_form; diff --git a/pub/lib/globalize/cultures/globalize.culture.af-ZA.js b/pub/lib/globalize/cultures/globalize.culture.af-ZA.js deleted file mode 100644 index 0c22387aa2d6d382e94f0b6144ccf348d3a1940f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.af-ZA.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture af-ZA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "af-ZA", "default", { - name: "af-ZA", - englishName: "Afrikaans (South Africa)", - nativeName: "Afrikaans (Suid Afrika)", - language: "af", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"], - namesAbbr: ["Son","Maan","Dins","Woen","Dond","Vry","Sat"], - namesShort: ["So","Ma","Di","Wo","Do","Vr","Sa"] - }, - months: { - names: ["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember",""], - namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.af.js b/pub/lib/globalize/cultures/globalize.culture.af.js deleted file mode 100644 index 1873710ef8496c4c5ff542056bbdf5844e198e93..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.af.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture af - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "af", "default", { - name: "af", - englishName: "Afrikaans", - nativeName: "Afrikaans", - language: "af", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"], - namesAbbr: ["Son","Maan","Dins","Woen","Dond","Vry","Sat"], - namesShort: ["So","Ma","Di","Wo","Do","Vr","Sa"] - }, - months: { - names: ["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember",""], - namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.am-ET.js b/pub/lib/globalize/cultures/globalize.culture.am-ET.js deleted file mode 100644 index 1462b53bedc8ec291fbd915e018c8e9d10bc8f35..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.am-ET.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Globalize Culture am-ET - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "am-ET", "default", { - name: "am-ET", - englishName: "Amharic (Ethiopia)", - nativeName: "አማáˆáŠ› (ኢትዮጵያ)", - language: "am", - numberFormat: { - decimals: 1, - groupSizes: [3,0], - "NaN": "NAN", - percent: { - pattern: ["-n%","n%"], - decimals: 1, - groupSizes: [3,0] - }, - currency: { - pattern: ["-$n","$n"], - groupSizes: [3,0], - symbol: "ETB" - } - }, - calendars: { - standard: { - days: { - names: ["እሑድ","ሰኞ","ማáŠáˆ°áŠž","ረቡዕ","áˆáˆ™áˆµ","á‹“áˆá‰¥","ቅዳሜ"], - namesAbbr: ["እሑድ","ሰኞ","ማáŠáˆ°","ረቡዕ","áˆáˆ™áˆµ","á‹“áˆá‰¥","ቅዳሜ"], - namesShort: ["እ","ሰ","ማ","ረ","áˆ","á‹“","ቅ"] - }, - months: { - names: ["ጃንዩወሪ","áŒá‰¥áˆ©á‹ˆáˆª","ማáˆá‰½","ኤá•ረáˆ","ሜá‹","áŒáŠ•","áŒáˆ‹á‹","ኦገስት","ሴá•ቴáˆá‰ áˆ","ኦáŠá‰°á‹á‰ áˆ","ኖቬáˆá‰ áˆ","ዲሴáˆá‰ áˆ",""], - namesAbbr: ["ጃንዩ","áŒá‰¥áˆ©","ማáˆá‰½","ኤá•ረ","ሜá‹","áŒáŠ•","áŒáˆ‹á‹","ኦገስ","ሴá•ቴ","ኦáŠá‰°","ኖቬáˆ","ዲሴáˆ",""] - }, - AM: ["ጡዋት","ጡዋት","ጡዋት"], - PM: ["ከሰዓት","ከሰዓት","ከሰዓት"], - eras: [{"name":"ዓመተ áˆáˆ•ረት","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "dddd 'á£' MMMM d 'ቀን' yyyy", - f: "dddd 'á£' MMMM d 'ቀን' yyyy h:mm tt", - F: "dddd 'á£' MMMM d 'ቀን' yyyy h:mm:ss tt", - M: "MMMM d ቀን", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.am.js b/pub/lib/globalize/cultures/globalize.culture.am.js deleted file mode 100644 index b59e5aea84cd21ecec01ebca1d10b06909fd2f55..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.am.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Globalize Culture am - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "am", "default", { - name: "am", - englishName: "Amharic", - nativeName: "አማáˆáŠ›", - language: "am", - numberFormat: { - decimals: 1, - groupSizes: [3,0], - "NaN": "NAN", - percent: { - pattern: ["-n%","n%"], - decimals: 1, - groupSizes: [3,0] - }, - currency: { - pattern: ["-$n","$n"], - groupSizes: [3,0], - symbol: "ETB" - } - }, - calendars: { - standard: { - days: { - names: ["እሑድ","ሰኞ","ማáŠáˆ°áŠž","ረቡዕ","áˆáˆ™áˆµ","á‹“áˆá‰¥","ቅዳሜ"], - namesAbbr: ["እሑድ","ሰኞ","ማáŠáˆ°","ረቡዕ","áˆáˆ™áˆµ","á‹“áˆá‰¥","ቅዳሜ"], - namesShort: ["እ","ሰ","ማ","ረ","áˆ","á‹“","ቅ"] - }, - months: { - names: ["ጃንዩወሪ","áŒá‰¥áˆ©á‹ˆáˆª","ማáˆá‰½","ኤá•ረáˆ","ሜá‹","áŒáŠ•","áŒáˆ‹á‹","ኦገስት","ሴá•ቴáˆá‰ áˆ","ኦáŠá‰°á‹á‰ áˆ","ኖቬáˆá‰ áˆ","ዲሴáˆá‰ áˆ",""], - namesAbbr: ["ጃንዩ","áŒá‰¥áˆ©","ማáˆá‰½","ኤá•ረ","ሜá‹","áŒáŠ•","áŒáˆ‹á‹","ኦገስ","ሴá•ቴ","ኦáŠá‰°","ኖቬáˆ","ዲሴáˆ",""] - }, - AM: ["ጡዋት","ጡዋት","ጡዋት"], - PM: ["ከሰዓት","ከሰዓት","ከሰዓት"], - eras: [{"name":"ዓመተ áˆáˆ•ረት","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "dddd 'á£' MMMM d 'ቀን' yyyy", - f: "dddd 'á£' MMMM d 'ቀን' yyyy h:mm tt", - F: "dddd 'á£' MMMM d 'ቀን' yyyy h:mm:ss tt", - M: "MMMM d ቀን", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-AE.js b/pub/lib/globalize/cultures/globalize.culture.ar-AE.js deleted file mode 100644 index 36672c300313849832373cc3236ad685b2fa8dd9..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-AE.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * Globalize Culture ar-AE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-AE", "default", { - name: "ar-AE", - englishName: "Arabic (U.A.E.)", - nativeName: "العربية (الإمارات العربية Ø§Ù„Ù…ØªØØ¯Ø©)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "د.Ø¥.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-BH.js b/pub/lib/globalize/cultures/globalize.culture.ar-BH.js deleted file mode 100644 index 170221c07b1824bd3c0cc1c1e83c4800136799a7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-BH.js +++ /dev/null @@ -1,462 +0,0 @@ -/** - * Globalize Culture ar-BH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-BH", "default", { - name: "ar-BH", - englishName: "Arabic (Bahrain)", - nativeName: "العربية (Ø§Ù„Ø¨ØØ±ÙŠÙ†)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "د.ب.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-DZ.js b/pub/lib/globalize/cultures/globalize.culture.ar-DZ.js deleted file mode 100644 index e3ac4dbd19fa1f045278b4f5f0ebd5de59ee60f7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-DZ.js +++ /dev/null @@ -1,458 +0,0 @@ -/** - * Globalize Culture ar-DZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-DZ", "default", { - name: "ar-DZ", - englishName: "Arabic (Algeria)", - nativeName: "العربية (الجزائر)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "د.ج.\u200f" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MM/yyyy H:mm", - F: "dd/MM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MMMM/yyyy H:mm", - F: "dd/MMMM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-EG.js b/pub/lib/globalize/cultures/globalize.culture.ar-EG.js deleted file mode 100644 index 1740fb478e5b9d2a7e2c3d3f10115ff044f73bcc..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-EG.js +++ /dev/null @@ -1,484 +0,0 @@ -/** - * Globalize Culture ar-EG - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-EG", "default", { - name: "ar-EG", - englishName: "Arabic (Egypt)", - nativeName: "العربية (مصر)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - symbol: "ج.Ù….\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-IQ.js b/pub/lib/globalize/cultures/globalize.culture.ar-IQ.js deleted file mode 100644 index 9adcfcfc305f8f7194d2207365ca0f5ee50b1ddd..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-IQ.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * Globalize Culture ar-IQ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-IQ", "default", { - name: "ar-IQ", - englishName: "Arabic (Iraq)", - nativeName: "العربية (العراق)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "د.ع.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-JO.js b/pub/lib/globalize/cultures/globalize.culture.ar-JO.js deleted file mode 100644 index 19d0ad18f4ca95e288aebb0fbb2f73763043ed83..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-JO.js +++ /dev/null @@ -1,462 +0,0 @@ -/** - * Globalize Culture ar-JO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-JO", "default", { - name: "ar-JO", - englishName: "Arabic (Jordan)", - nativeName: "العربية (الأردن)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "د.ا.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-KW.js b/pub/lib/globalize/cultures/globalize.culture.ar-KW.js deleted file mode 100644 index c130961bd9a2fddd1788e4aae3b7d52a0f68f29d..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-KW.js +++ /dev/null @@ -1,462 +0,0 @@ -/** - * Globalize Culture ar-KW - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-KW", "default", { - name: "ar-KW", - englishName: "Arabic (Kuwait)", - nativeName: "العربية (الكويت)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "د.Ùƒ.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-LB.js b/pub/lib/globalize/cultures/globalize.culture.ar-LB.js deleted file mode 100644 index 355744dfbcef3b675637e4d14386b0f8e8577160..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-LB.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * Globalize Culture ar-LB - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-LB", "default", { - name: "ar-LB", - englishName: "Arabic (Lebanon)", - nativeName: "العربية (لبنان)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "Ù„.Ù„.\u200f" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-LY.js b/pub/lib/globalize/cultures/globalize.culture.ar-LY.js deleted file mode 100644 index 8f1ec6d4f141ece93ca4ea6eb2309113f7db89fd..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-LY.js +++ /dev/null @@ -1,462 +0,0 @@ -/** - * Globalize Culture ar-LY - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-LY", "default", { - name: "ar-LY", - englishName: "Arabic (Libya)", - nativeName: "العربية (ليبيا)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$n"], - decimals: 3, - symbol: "د.Ù„.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-MA.js b/pub/lib/globalize/cultures/globalize.culture.ar-MA.js deleted file mode 100644 index 97dc12b792f190246858d236d13111b59d345a01..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-MA.js +++ /dev/null @@ -1,458 +0,0 @@ -/** - * Globalize Culture ar-MA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-MA", "default", { - name: "ar-MA", - englishName: "Arabic (Morocco)", - nativeName: "العربية (المملكة المغربية)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "د.Ù….\u200f" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MM/yyyy H:mm", - F: "dd/MM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MMMM/yyyy H:mm", - F: "dd/MMMM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-OM.js b/pub/lib/globalize/cultures/globalize.culture.ar-OM.js deleted file mode 100644 index c86933474bdabfc16e767a464ea1872a4229a5d1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-OM.js +++ /dev/null @@ -1,458 +0,0 @@ -/** - * Globalize Culture ar-OM - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-OM", "default", { - name: "ar-OM", - englishName: "Arabic (Oman)", - nativeName: "العربية (عمان)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "ر.ع.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-QA.js b/pub/lib/globalize/cultures/globalize.culture.ar-QA.js deleted file mode 100644 index 9faec054769e3cffa69b15d56308aa08d878f5b6..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-QA.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * Globalize Culture ar-QA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-QA", "default", { - name: "ar-QA", - englishName: "Arabic (Qatar)", - nativeName: "العربية (قطر)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "ر.Ù‚.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-SA.js b/pub/lib/globalize/cultures/globalize.culture.ar-SA.js deleted file mode 100644 index a417cbce5b8b7314e3cc010ffde0f8a75a72cc1a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-SA.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * Globalize Culture ar-SA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-SA", "default", { - name: "ar-SA", - englishName: "Arabic (Saudi Arabia)", - nativeName: "العربية (المملكة العربية السعودية)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "ر.س.\u200f" - } - }, - calendars: { - standard: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-SY.js b/pub/lib/globalize/cultures/globalize.culture.ar-SY.js deleted file mode 100644 index 5d21b38e85da43383f063eb90cd2524225a611b3..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-SY.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * Globalize Culture ar-SY - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-SY", "default", { - name: "ar-SY", - englishName: "Arabic (Syria)", - nativeName: "العربية (سوريا)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "Ù„.س.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-TN.js b/pub/lib/globalize/cultures/globalize.culture.ar-TN.js deleted file mode 100644 index 4924b3ab0b8088d7bd71bdccc232359e77c4762b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-TN.js +++ /dev/null @@ -1,463 +0,0 @@ -/** - * Globalize Culture ar-TN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-TN", "default", { - name: "ar-TN", - englishName: "Arabic (Tunisia)", - nativeName: "العربية (تونس)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "د.ت.\u200f" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MM/yyyy H:mm", - F: "dd/MM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MMMM/yyyy H:mm", - F: "dd/MMMM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar-YE.js b/pub/lib/globalize/cultures/globalize.culture.ar-YE.js deleted file mode 100644 index 146ef66d5049e13df4859d3ddec2755f6a7e3f83..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar-YE.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * Globalize Culture ar-YE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar-YE", "default", { - name: "ar-YE", - englishName: "Arabic (Yemen)", - nativeName: "العربية (اليمن)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "ر.ÙŠ.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ar.js b/pub/lib/globalize/cultures/globalize.culture.ar.js deleted file mode 100644 index e19b6dbfebe996e5badec3ef7ba94e1ffe698e27..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ar.js +++ /dev/null @@ -1,457 +0,0 @@ -/** - * Globalize Culture ar - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar", "default", { - name: "ar", - englishName: "Arabic", - nativeName: "العربية", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "ر.س.\u200f" - } - }, - calendars: { - standard: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.arn-CL.js b/pub/lib/globalize/cultures/globalize.culture.arn-CL.js deleted file mode 100644 index 43c885e6bc86e1677faa296f64b18b34bf004f3b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.arn-CL.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture arn-CL - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "arn-CL", "default", { - name: "arn-CL", - englishName: "Mapudungun (Chile)", - nativeName: "Mapudungun (Chile)", - language: "arn", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.arn.js b/pub/lib/globalize/cultures/globalize.culture.arn.js deleted file mode 100644 index 6f0d2ea8be055567b2b0c235604e7027f620ea12..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.arn.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture arn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "arn", "default", { - name: "arn", - englishName: "Mapudungun", - nativeName: "Mapudungun", - language: "arn", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.as-IN.js b/pub/lib/globalize/cultures/globalize.culture.as-IN.js deleted file mode 100644 index 7d81154c6d5ef91d15b203a0f46c43c6d880c59c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.as-IN.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture as-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "as-IN", "default", { - name: "as-IN", - englishName: "Assamese (India)", - nativeName: "অসমীয়া (à¦à¦¾à§°à¦¤)", - language: "as", - numberFormat: { - groupSizes: [3,2], - "NaN": "nan", - negativeInfinity: "-infinity", - positiveInfinity: "infinity", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","n$"], - groupSizes: [3,2], - symbol: "ট" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["সোমবাৰ","মঙà§à¦—লবাৰ","বà§à¦§à¦¬à¦¾à§°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à§°","শà§à¦•à§à¦°à¦¬à¦¾à§°","শনিবাৰ","ৰবিবাৰ"], - namesAbbr: ["সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহ.","শà§à¦•à§à¦°.","শনি.","ৰবি."], - namesShort: ["সো","ম","বà§","বৃ","শà§","শ","র"] - }, - months: { - names: ["জানà§à§±à¦¾à§°à§€","ফেবà§à¦°à§à§±à¦¾à§°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগষà§à¦Ÿ","চেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নবেমà§à¦¬à¦°","ডিচেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§","ফেবà§à¦°à§","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগষà§à¦Ÿ","চেপà§à¦Ÿà§‡","অকà§à¦Ÿà§‹","নবে","ডিচে",""] - }, - AM: ["ৰাতিপà§","ৰাতিপà§","ৰাতিপà§"], - PM: ["আবেলি","আবেলি","আবেলি"], - eras: [{"name":"খà§à¦°à§€à¦·à§à¦Ÿà¦¾à¦¬à§à¦¦","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "yyyy,MMMM dd, dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy,MMMM dd, dddd tt h:mm", - F: "yyyy,MMMM dd, dddd tt h:mm:ss", - M: "dd MMMM", - Y: "MMMM,yy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.as.js b/pub/lib/globalize/cultures/globalize.culture.as.js deleted file mode 100644 index 68f96baf646b910bfdcc6f8a6df6d48084326a4b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.as.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture as - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "as", "default", { - name: "as", - englishName: "Assamese", - nativeName: "অসমীয়া", - language: "as", - numberFormat: { - groupSizes: [3,2], - "NaN": "nan", - negativeInfinity: "-infinity", - positiveInfinity: "infinity", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","n$"], - groupSizes: [3,2], - symbol: "ট" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["সোমবাৰ","মঙà§à¦—লবাৰ","বà§à¦§à¦¬à¦¾à§°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à§°","শà§à¦•à§à¦°à¦¬à¦¾à§°","শনিবাৰ","ৰবিবাৰ"], - namesAbbr: ["সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহ.","শà§à¦•à§à¦°.","শনি.","ৰবি."], - namesShort: ["সো","ম","বà§","বৃ","শà§","শ","র"] - }, - months: { - names: ["জানà§à§±à¦¾à§°à§€","ফেবà§à¦°à§à§±à¦¾à§°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগষà§à¦Ÿ","চেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নবেমà§à¦¬à¦°","ডিচেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§","ফেবà§à¦°à§","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগষà§à¦Ÿ","চেপà§à¦Ÿà§‡","অকà§à¦Ÿà§‹","নবে","ডিচে",""] - }, - AM: ["ৰাতিপà§","ৰাতিপà§","ৰাতিপà§"], - PM: ["আবেলি","আবেলি","আবেলি"], - eras: [{"name":"খà§à¦°à§€à¦·à§à¦Ÿà¦¾à¦¬à§à¦¦","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "yyyy,MMMM dd, dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy,MMMM dd, dddd tt h:mm", - F: "yyyy,MMMM dd, dddd tt h:mm:ss", - M: "dd MMMM", - Y: "MMMM,yy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.az-Cyrl-AZ.js b/pub/lib/globalize/cultures/globalize.culture.az-Cyrl-AZ.js deleted file mode 100644 index d1684ec11efec5cb7c5f09d2dfcaaa1c920c7ac9..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.az-Cyrl-AZ.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture az-Cyrl-AZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "az-Cyrl-AZ", "default", { - name: "az-Cyrl-AZ", - englishName: "Azeri (Cyrillic, Azerbaijan)", - nativeName: "Ðзәрбајҹан (Ðзәрбајҹан)", - language: "az-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "ман." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Базар","Базар ертәÑи","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"], - namesAbbr: ["Б","Бе","Ча","Ч","Ҹа","Ò¸","Ш"], - namesShort: ["Б","Бе","Ча","Ч","Ҹа","Ò¸","Ш"] - }, - months: { - names: ["Јанвар","Феврал","Март","Ðпрел","Мај","Ијун","Ијул","ÐвгуÑÑ‚","Сентјабр","Октјабр","Ðојабр","Декабр",""], - namesAbbr: ["Јан","Фев","Мар","Ðпр","Мај","Ијун","Ијул","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["јанвар","феврал","март","апрел","мај","ијун","ијул","авгуÑÑ‚","Ñентјабр","октјабр","нојабр","декабр",""], - namesAbbr: ["Јан","Фев","Мар","Ðпр","маÑ","ијун","ијул","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.az-Cyrl.js b/pub/lib/globalize/cultures/globalize.culture.az-Cyrl.js deleted file mode 100644 index db99e7534a44516737a204b50ad9f3a2c8a3cd1b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.az-Cyrl.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture az-Cyrl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "az-Cyrl", "default", { - name: "az-Cyrl", - englishName: "Azeri (Cyrillic)", - nativeName: "Ðзәрбајҹан дили", - language: "az-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "ман." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Базар","Базар ертәÑи","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"], - namesAbbr: ["Б","Бе","Ча","Ч","Ҹа","Ò¸","Ш"], - namesShort: ["Б","Бе","Ча","Ч","Ҹа","Ò¸","Ш"] - }, - months: { - names: ["Јанвар","Феврал","Март","Ðпрел","Мај","Ијун","Ијул","ÐвгуÑÑ‚","Сентјабр","Октјабр","Ðојабр","Декабр",""], - namesAbbr: ["Јан","Фев","Мар","Ðпр","Мај","Ијун","Ијул","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["јанвар","феврал","март","апрел","мај","ијун","ијул","авгуÑÑ‚","Ñентјабр","октјабр","нојабр","декабр",""], - namesAbbr: ["Јан","Фев","Мар","Ðпр","маÑ","ијун","ијул","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.az-Latn-AZ.js b/pub/lib/globalize/cultures/globalize.culture.az-Latn-AZ.js deleted file mode 100644 index 44b954b29429fb11f752d83c849cb20c4e77e5ab..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.az-Latn-AZ.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture az-Latn-AZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "az-Latn-AZ", "default", { - name: "az-Latn-AZ", - englishName: "Azeri (Latin, Azerbaijan)", - nativeName: "AzÉ™rbaycan\xadılı (AzÉ™rbaycan)", - language: "az-Latn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "man." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Bazar","Bazar ertÉ™si","ÇərÅŸÉ™nbə axÅŸamı","ÇərÅŸÉ™nbÉ™","Cümə axÅŸamı","CümÉ™","ŞənbÉ™"], - namesAbbr: ["B","Be","Ça","Ç","Ca","C","Åž"], - namesShort: ["B","Be","Ça","Ç","Ca","C","Åž"] - }, - months: { - names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - monthsGenitive: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.az-Latn.js b/pub/lib/globalize/cultures/globalize.culture.az-Latn.js deleted file mode 100644 index 66789a8f24d2c1d49b828405636c15dd93ec070c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.az-Latn.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture az-Latn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "az-Latn", "default", { - name: "az-Latn", - englishName: "Azeri (Latin)", - nativeName: "AzÉ™rbaycan\xadılı", - language: "az-Latn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "man." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Bazar","Bazar ertÉ™si","ÇərÅŸÉ™nbə axÅŸamı","ÇərÅŸÉ™nbÉ™","Cümə axÅŸamı","CümÉ™","ŞənbÉ™"], - namesAbbr: ["B","Be","Ça","Ç","Ca","C","Åž"], - namesShort: ["B","Be","Ça","Ç","Ca","C","Åž"] - }, - months: { - names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - monthsGenitive: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.az.js b/pub/lib/globalize/cultures/globalize.culture.az.js deleted file mode 100644 index de403fd23c6eb394ce8c70a6832c16d793ed5766..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.az.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture az - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "az", "default", { - name: "az", - englishName: "Azeri", - nativeName: "AzÉ™rbaycan\xadılı", - language: "az", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "man." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Bazar","Bazar ertÉ™si","ÇərÅŸÉ™nbə axÅŸamı","ÇərÅŸÉ™nbÉ™","Cümə axÅŸamı","CümÉ™","ŞənbÉ™"], - namesAbbr: ["B","Be","Ça","Ç","Ca","C","Åž"], - namesShort: ["B","Be","Ça","Ç","Ca","C","Åž"] - }, - months: { - names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - monthsGenitive: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ba-RU.js b/pub/lib/globalize/cultures/globalize.culture.ba-RU.js deleted file mode 100644 index 7b587394581243e92fc2679f61f3cb5356489ea7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ba-RU.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture ba-RU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ba-RU", "default", { - name: "ba-RU", - englishName: "Bashkir (Russia)", - nativeName: "Башҡорт (РоÑÑиÑ)", - language: "ba", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ",", - symbol: "Ò»." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Йәкшәмбе","Дүшәмбе","Шишәмбе","Шаршамбы","КеÑаҙна","Йома","Шәмбе"], - namesAbbr: ["Йш","Дш","Шш","Шр","КÑ","Йм","Шб"], - namesShort: ["Йш","Дш","Шш","Шр","КÑ","Йм","Шб"] - }, - months: { - names: ["ғинуар","февраль","март","апрель","май","июнь","июль","авгуÑÑ‚","ÑентÑбрь","октÑбрь","ноÑбрь","декабрь",""], - namesAbbr: ["ғин","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy 'й'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'й' H:mm", - F: "d MMMM yyyy 'й' H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ba.js b/pub/lib/globalize/cultures/globalize.culture.ba.js deleted file mode 100644 index 3e61dad3f32e70e77eca409b98fea871654aee53..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ba.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture ba - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ba", "default", { - name: "ba", - englishName: "Bashkir", - nativeName: "Башҡорт", - language: "ba", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ",", - symbol: "Ò»." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Йәкшәмбе","Дүшәмбе","Шишәмбе","Шаршамбы","КеÑаҙна","Йома","Шәмбе"], - namesAbbr: ["Йш","Дш","Шш","Шр","КÑ","Йм","Шб"], - namesShort: ["Йш","Дш","Шш","Шр","КÑ","Йм","Шб"] - }, - months: { - names: ["ғинуар","февраль","март","апрель","май","июнь","июль","авгуÑÑ‚","ÑентÑбрь","октÑбрь","ноÑбрь","декабрь",""], - namesAbbr: ["ғин","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy 'й'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'й' H:mm", - F: "d MMMM yyyy 'й' H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.be-BY.js b/pub/lib/globalize/cultures/globalize.culture.be-BY.js deleted file mode 100644 index afa586b869f2866fc4bb4eaffc5c761994d3fe64..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.be-BY.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture be-BY - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "be-BY", "default", { - name: "be-BY", - englishName: "Belarusian (Belarus)", - nativeName: "БеларуÑкі (БеларуÑÑŒ)", - language: "be", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["нÑдзелÑ","панÑдзелак","аўторак","Ñерада","чацвер","пÑтніца","Ñубота"], - namesAbbr: ["нд","пн","аў","ÑÑ€","чц","пт","Ñб"], - namesShort: ["нд","пн","аў","ÑÑ€","чц","пт","Ñб"] - }, - months: { - names: ["Студзень","Люты","Сакавік","КраÑавік","Май","ЧÑрвень","Ліпень","Жнівень","ВераÑень","КаÑтрычнік","ЛіÑтапад","Снежань",""], - namesAbbr: ["Сту","Лют","Сак","Кра","Май","ЧÑÑ€","Ліп","Жні","Вер","КаÑ","ЛіÑ","Сне",""] - }, - monthsGenitive: { - names: ["ÑтудзенÑ","лютага","Ñакавіка","краÑавіка","маÑ","чÑрвенÑ","ліпенÑ","жніўнÑ","вераÑнÑ","каÑтрычніка","ліÑтапада","ÑнежнÑ",""], - namesAbbr: ["Сту","Лют","Сак","Кра","Май","ЧÑÑ€","Ліп","Жні","Вер","КаÑ","ЛіÑ","Сне",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.be.js b/pub/lib/globalize/cultures/globalize.culture.be.js deleted file mode 100644 index c70275cc6b0be74161ddb54353f4695a690fa8d7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.be.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture be - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "be", "default", { - name: "be", - englishName: "Belarusian", - nativeName: "БеларуÑкі", - language: "be", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["нÑдзелÑ","панÑдзелак","аўторак","Ñерада","чацвер","пÑтніца","Ñубота"], - namesAbbr: ["нд","пн","аў","ÑÑ€","чц","пт","Ñб"], - namesShort: ["нд","пн","аў","ÑÑ€","чц","пт","Ñб"] - }, - months: { - names: ["Студзень","Люты","Сакавік","КраÑавік","Май","ЧÑрвень","Ліпень","Жнівень","ВераÑень","КаÑтрычнік","ЛіÑтапад","Снежань",""], - namesAbbr: ["Сту","Лют","Сак","Кра","Май","ЧÑÑ€","Ліп","Жні","Вер","КаÑ","ЛіÑ","Сне",""] - }, - monthsGenitive: { - names: ["ÑтудзенÑ","лютага","Ñакавіка","краÑавіка","маÑ","чÑрвенÑ","ліпенÑ","жніўнÑ","вераÑнÑ","каÑтрычніка","ліÑтапада","ÑнежнÑ",""], - namesAbbr: ["Сту","Лют","Сак","Кра","Май","ЧÑÑ€","Ліп","Жні","Вер","КаÑ","ЛіÑ","Сне",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bg-BG.js b/pub/lib/globalize/cultures/globalize.culture.bg-BG.js deleted file mode 100644 index 824073ac5a0c0ce534a67e60429250e0db9b8009..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bg-BG.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture bg-BG - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bg-BG", "default", { - name: "bg-BG", - englishName: "Bulgarian (Bulgaria)", - nativeName: "българÑки (БългариÑ)", - language: "bg", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "- безкрайноÑÑ‚", - positiveInfinity: "+ безкрайноÑÑ‚", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "лв." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["неделÑ","понеделник","вторник","ÑÑ€Ñда","четвъртък","петък","Ñъбота"], - namesAbbr: ["нед","пон","вт","ÑÑ€","четв","пет","Ñъб"], - namesShort: ["н","п","в","Ñ","ч","п","Ñ"] - }, - months: { - names: ["Ñнуари","февруари","март","април","май","юни","юли","авгуÑÑ‚","Ñептември","октомври","ноември","декември",""], - namesAbbr: ["Ñн","февр","март","апр","май","юни","юли","авг","Ñепт","окт","ноември","дек",""] - }, - AM: null, - PM: null, - eras: [{"name":"Ñлед новата ера","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy 'г.'", - D: "dd MMMM yyyy 'г.'", - t: "HH:mm 'ч.'", - T: "HH:mm:ss 'ч.'", - f: "dd MMMM yyyy 'г.' HH:mm 'ч.'", - F: "dd MMMM yyyy 'г.' HH:mm:ss 'ч.'", - M: "dd MMMM", - Y: "MMMM yyyy 'г.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bg.js b/pub/lib/globalize/cultures/globalize.culture.bg.js deleted file mode 100644 index 5a6c1d84c81a71ee9bcd67930a838d40a0735a76..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bg.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture bg - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bg", "default", { - name: "bg", - englishName: "Bulgarian", - nativeName: "българÑки", - language: "bg", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "- безкрайноÑÑ‚", - positiveInfinity: "+ безкрайноÑÑ‚", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "лв." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["неделÑ","понеделник","вторник","ÑÑ€Ñда","четвъртък","петък","Ñъбота"], - namesAbbr: ["нед","пон","вт","ÑÑ€","четв","пет","Ñъб"], - namesShort: ["н","п","в","Ñ","ч","п","Ñ"] - }, - months: { - names: ["Ñнуари","февруари","март","април","май","юни","юли","авгуÑÑ‚","Ñептември","октомври","ноември","декември",""], - namesAbbr: ["Ñн","февр","март","апр","май","юни","юли","авг","Ñепт","окт","ноември","дек",""] - }, - AM: null, - PM: null, - eras: [{"name":"Ñлед новата ера","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy 'г.'", - D: "dd MMMM yyyy 'г.'", - t: "HH:mm 'ч.'", - T: "HH:mm:ss 'ч.'", - f: "dd MMMM yyyy 'г.' HH:mm 'ч.'", - F: "dd MMMM yyyy 'г.' HH:mm:ss 'ч.'", - M: "dd MMMM", - Y: "MMMM yyyy 'г.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bn-BD.js b/pub/lib/globalize/cultures/globalize.culture.bn-BD.js deleted file mode 100644 index bd30f8c717efe063186381c8d7eb5320b3f34650..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bn-BD.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Globalize Culture bn-BD - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bn-BD", "default", { - name: "bn-BD", - englishName: "Bengali (Bangladesh)", - nativeName: "বাংলা (বাংলাদেশ)", - language: "bn", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "à§³" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["রবিবার","সোমবার","মঙà§à¦—লবার","বà§à¦§à¦¬à¦¾à¦°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°","শà§à¦•à§à¦°à¦¬à¦¾à¦°","শনিবার"], - namesAbbr: ["রবি.","সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহসà§à¦ªà¦¤à¦¿.","শà§à¦•à§à¦°.","শনি."], - namesShort: ["র","স","ম","ব","ব","শ","শ"] - }, - months: { - names: ["জানà§à¦¯à¦¼à¦¾à¦°à§€","ফেবà§à¦°à§à¦¯à¦¼à¦¾à¦°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগসà§à¦Ÿ","সেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নà¦à§‡à¦®à§à¦¬à¦°","ডিসেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§.","ফেবà§à¦°à§.","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগ.","সেপà§à¦Ÿà§‡.","অকà§à¦Ÿà§‹.","নà¦à§‡.","ডিসে.",""] - }, - AM: ["পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨"], - PM: ["অপরাহà§à¦¨","অপরাহà§à¦¨","অপরাহà§à¦¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bn-IN.js b/pub/lib/globalize/cultures/globalize.culture.bn-IN.js deleted file mode 100644 index cdd699a6f3337de0773dd0e844dd7d992b623b87..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bn-IN.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Globalize Culture bn-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bn-IN", "default", { - name: "bn-IN", - englishName: "Bengali (India)", - nativeName: "বাংলা (à¦à¦¾à¦°à¦¤)", - language: "bn", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "টা" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["রবিবার","সোমবার","মঙà§à¦—লবার","বà§à¦§à¦¬à¦¾à¦°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°","শà§à¦•à§à¦°à¦¬à¦¾à¦°","শনিবার"], - namesAbbr: ["রবি.","সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহসà§à¦ªà¦¤à¦¿.","শà§à¦•à§à¦°.","শনি."], - namesShort: ["র","স","ম","ব","ব","শ","শ"] - }, - months: { - names: ["জানà§à¦¯à¦¼à¦¾à¦°à§€","ফেবà§à¦°à§à¦¯à¦¼à¦¾à¦°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগসà§à¦Ÿ","সেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নà¦à§‡à¦®à§à¦¬à¦°","ডিসেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§.","ফেবà§à¦°à§.","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগ.","সেপà§à¦Ÿà§‡.","অকà§à¦Ÿà§‹.","নà¦à§‡.","ডিসে.",""] - }, - AM: ["পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨"], - PM: ["অপরাহà§à¦¨","অপরাহà§à¦¨","অপরাহà§à¦¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bn.js b/pub/lib/globalize/cultures/globalize.culture.bn.js deleted file mode 100644 index c6f8a3a64a0377396e29494b931e4fa5432fa075..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bn.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Globalize Culture bn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bn", "default", { - name: "bn", - englishName: "Bengali", - nativeName: "বাংলা", - language: "bn", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "টা" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["রবিবার","সোমবার","মঙà§à¦—লবার","বà§à¦§à¦¬à¦¾à¦°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°","শà§à¦•à§à¦°à¦¬à¦¾à¦°","শনিবার"], - namesAbbr: ["রবি.","সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহসà§à¦ªà¦¤à¦¿.","শà§à¦•à§à¦°.","শনি."], - namesShort: ["র","স","ম","ব","ব","শ","শ"] - }, - months: { - names: ["জানà§à¦¯à¦¼à¦¾à¦°à§€","ফেবà§à¦°à§à¦¯à¦¼à¦¾à¦°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগসà§à¦Ÿ","সেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নà¦à§‡à¦®à§à¦¬à¦°","ডিসেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§.","ফেবà§à¦°à§.","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগ.","সেপà§à¦Ÿà§‡.","অকà§à¦Ÿà§‹.","নà¦à§‡.","ডিসে.",""] - }, - AM: ["পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨"], - PM: ["অপরাহà§à¦¨","অপরাহà§à¦¨","অপরাহà§à¦¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bo-CN.js b/pub/lib/globalize/cultures/globalize.culture.bo-CN.js deleted file mode 100644 index 4dc1177a8e7cd2606d21d9415cbbcdadb803f89f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bo-CN.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture bo-CN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bo-CN", "default", { - name: "bo-CN", - englishName: "Tibetan (PRC)", - nativeName: "བོད་ཡིག (ཀྲུང་ཧà¾à¼‹à½˜à½²à¼‹à½‘མངས་སྤྱི་མà½à½´à½“་རྒྱལ་à½à½–à¼)", - language: "bo", - numberFormat: { - groupSizes: [3,0], - "NaN": "ཨང་ཀི་མིན་པà¼", - negativeInfinity: "མོ་གྲངས་ཚད་མེད་ཆུང་བà¼", - positiveInfinity: "ཕོ་གྲངས་ཚད་མེད་ཆེ་བà¼", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - groupSizes: [3,0], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["གཟའ་ཉི་མà¼","གཟའ་ཟླ་བà¼","གཟའ་མིག་དམརà¼","གཟའ་ལྷག་པà¼","གཟའ་ཕུར་བུà¼","གཟའ་པ་སངསà¼","གཟའ་སྤེན་པà¼"], - namesAbbr: ["ཉི་མà¼","ཟླ་བà¼","མིག་དམརà¼","ལྷག་པà¼","ཕུར་བུà¼","པ་སངསà¼","སྤེན་པà¼"], - namesShort: ["༧","༡","༢","༣","༤","༥","༦"] - }, - months: { - names: ["སྤྱི་ཟླ་དང་པོà¼","སྤྱི་ཟླ་གཉིས་པà¼","སྤྱི་ཟླ་གསུམ་པà¼","སྤྱི་ཟླ་བཞི་པà¼","སྤྱི་ཟླ་ལྔ་པà¼","སྤྱི་ཟླ་དྲུག་པà¼","སྤྱི་ཟླ་བདུན་པà¼","སྤྱི་ཟླ་བརྒྱད་པà¼","སྤྱི་ཟླ་དགུ་པà¼","སྤྱི་ཟླ་བཅུ་པོà¼","སྤྱི་ཟླ་བཅུ་གཅིག་པà¼","སྤྱི་ཟླ་བཅུ་གཉིས་པà¼",""], - namesAbbr: ["ཟླ་ ༡","ཟླ་ ༢","ཟླ་ ༣","ཟླ་ ༤","ཟླ་ ༥","ཟླ་ ༦","ཟླ་ ༧","ཟླ་ ༨","ཟླ་ ༩","ཟླ་ ༡༠","ཟླ་ ༡༡","ཟླ་ ༡༢",""] - }, - AM: ["སྔ་དྲོ","སྔ་དྲོ","སྔ་དྲོ"], - PM: ["ཕྱི་དྲོ","ཕྱི་དྲོ","ཕྱི་དྲོ"], - eras: [{"name":"སྤྱི་ལོ","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'ལོའི་ཟླ' M'ཚེས' d", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm", - F: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm:ss", - M: "'ཟླ་' M'ཚེས'd", - Y: "yyyy.M" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bo.js b/pub/lib/globalize/cultures/globalize.culture.bo.js deleted file mode 100644 index c174c8d72b93369efe1f1d4bf1e2b6345ff7c75c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bo.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture bo - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bo", "default", { - name: "bo", - englishName: "Tibetan", - nativeName: "བོད་ཡིག", - language: "bo", - numberFormat: { - groupSizes: [3,0], - "NaN": "ཨང་ཀི་མིན་པà¼", - negativeInfinity: "མོ་གྲངས་ཚད་མེད་ཆུང་བà¼", - positiveInfinity: "ཕོ་གྲངས་ཚད་མེད་ཆེ་བà¼", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - groupSizes: [3,0], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["གཟའ་ཉི་མà¼","གཟའ་ཟླ་བà¼","གཟའ་མིག་དམརà¼","གཟའ་ལྷག་པà¼","གཟའ་ཕུར་བུà¼","གཟའ་པ་སངསà¼","གཟའ་སྤེན་པà¼"], - namesAbbr: ["ཉི་མà¼","ཟླ་བà¼","མིག་དམརà¼","ལྷག་པà¼","ཕུར་བུà¼","པ་སངསà¼","སྤེན་པà¼"], - namesShort: ["༧","༡","༢","༣","༤","༥","༦"] - }, - months: { - names: ["སྤྱི་ཟླ་དང་པོà¼","སྤྱི་ཟླ་གཉིས་པà¼","སྤྱི་ཟླ་གསུམ་པà¼","སྤྱི་ཟླ་བཞི་པà¼","སྤྱི་ཟླ་ལྔ་པà¼","སྤྱི་ཟླ་དྲུག་པà¼","སྤྱི་ཟླ་བདུན་པà¼","སྤྱི་ཟླ་བརྒྱད་པà¼","སྤྱི་ཟླ་དགུ་པà¼","སྤྱི་ཟླ་བཅུ་པོà¼","སྤྱི་ཟླ་བཅུ་གཅིག་པà¼","སྤྱི་ཟླ་བཅུ་གཉིས་པà¼",""], - namesAbbr: ["ཟླ་ ༡","ཟླ་ ༢","ཟླ་ ༣","ཟླ་ ༤","ཟླ་ ༥","ཟླ་ ༦","ཟླ་ ༧","ཟླ་ ༨","ཟླ་ ༩","ཟླ་ ༡༠","ཟླ་ ༡༡","ཟླ་ ༡༢",""] - }, - AM: ["སྔ་དྲོ","སྔ་དྲོ","སྔ་དྲོ"], - PM: ["ཕྱི་དྲོ","ཕྱི་དྲོ","ཕྱི་དྲོ"], - eras: [{"name":"སྤྱི་ལོ","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'ལོའི་ཟླ' M'ཚེས' d", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm", - F: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm:ss", - M: "'ཟླ་' M'ཚེས'd", - Y: "yyyy.M" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.br-FR.js b/pub/lib/globalize/cultures/globalize.culture.br-FR.js deleted file mode 100644 index 1ceb622d0bf1879d0b37603dc6206e7e6edc984f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.br-FR.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture br-FR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "br-FR", "default", { - name: "br-FR", - englishName: "Breton (France)", - nativeName: "brezhoneg (Frañs)", - language: "br", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "NkN", - negativeInfinity: "-Anfin", - positiveInfinity: "+Anfin", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sul","Lun","Meurzh","Merc'her","Yaou","Gwener","Sadorn"], - namesAbbr: ["Sul","Lun","Meu.","Mer.","Yaou","Gwe.","Sad."], - namesShort: ["Su","Lu","Mz","Mc","Ya","Gw","Sa"] - }, - months: { - names: ["Genver","C'hwevrer","Meurzh","Ebrel","Mae","Mezheven","Gouere","Eost","Gwengolo","Here","Du","Kerzu",""], - namesAbbr: ["Gen.","C'hwe.","Meur.","Ebr.","Mae","Mezh.","Goue.","Eost","Gwen.","Here","Du","Kzu",""] - }, - AM: null, - PM: null, - eras: [{"name":"g. J.-K.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.br.js b/pub/lib/globalize/cultures/globalize.culture.br.js deleted file mode 100644 index c851765df2f8db63e3ec0bcf303bddcc17ba8f3a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.br.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture br - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "br", "default", { - name: "br", - englishName: "Breton", - nativeName: "brezhoneg", - language: "br", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "NkN", - negativeInfinity: "-Anfin", - positiveInfinity: "+Anfin", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sul","Lun","Meurzh","Merc'her","Yaou","Gwener","Sadorn"], - namesAbbr: ["Sul","Lun","Meu.","Mer.","Yaou","Gwe.","Sad."], - namesShort: ["Su","Lu","Mz","Mc","Ya","Gw","Sa"] - }, - months: { - names: ["Genver","C'hwevrer","Meurzh","Ebrel","Mae","Mezheven","Gouere","Eost","Gwengolo","Here","Du","Kerzu",""], - namesAbbr: ["Gen.","C'hwe.","Meur.","Ebr.","Mae","Mezh.","Goue.","Eost","Gwen.","Here","Du","Kzu",""] - }, - AM: null, - PM: null, - eras: [{"name":"g. J.-K.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bs-Cyrl-BA.js b/pub/lib/globalize/cultures/globalize.culture.bs-Cyrl-BA.js deleted file mode 100644 index 4d8a7e8da9259f1bc677326bb59bcc9227a45222..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bs-Cyrl-BA.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture bs-Cyrl-BA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bs-Cyrl-BA", "default", { - name: "bs-Cyrl-BA", - englishName: "Bosnian (Cyrillic, Bosnia and Herzegovina)", - nativeName: "боÑанÑки (БоÑна и Херцеговина)", - language: "bs-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "КМ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недјеља","понедјељак","уторак","Ñриједа","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["н","п","у","Ñ","ч","п","Ñ"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bs-Cyrl.js b/pub/lib/globalize/cultures/globalize.culture.bs-Cyrl.js deleted file mode 100644 index f6fa815c7e510253296dde05a66b98d7ca1b5408..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bs-Cyrl.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture bs-Cyrl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bs-Cyrl", "default", { - name: "bs-Cyrl", - englishName: "Bosnian (Cyrillic)", - nativeName: "боÑанÑки", - language: "bs-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "КМ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недјеља","понедјељак","уторак","Ñриједа","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["н","п","у","Ñ","ч","п","Ñ"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bs-Latn-BA.js b/pub/lib/globalize/cultures/globalize.culture.bs-Latn-BA.js deleted file mode 100644 index 8ebb4591e618ec9f7c54c3e0a3274a5a506795dc..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bs-Latn-BA.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture bs-Latn-BA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bs-Latn-BA", "default", { - name: "bs-Latn-BA", - englishName: "Bosnian (Latin, Bosnia and Herzegovina)", - nativeName: "bosanski (Bosna i Hercegovina)", - language: "bs-Latn", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bs-Latn.js b/pub/lib/globalize/cultures/globalize.culture.bs-Latn.js deleted file mode 100644 index 3a8a0e9c5c86871a3efc1ab0875d1751d7b8a123..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bs-Latn.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture bs-Latn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bs-Latn", "default", { - name: "bs-Latn", - englishName: "Bosnian (Latin)", - nativeName: "bosanski", - language: "bs-Latn", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.bs.js b/pub/lib/globalize/cultures/globalize.culture.bs.js deleted file mode 100644 index a80032d35664a5952da1ae1dc4f1932bfbeeb3a4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.bs.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture bs - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "bs", "default", { - name: "bs", - englishName: "Bosnian", - nativeName: "bosanski", - language: "bs", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ca-ES.js b/pub/lib/globalize/cultures/globalize.culture.ca-ES.js deleted file mode 100644 index 05f151255c114ccade9a43ea9b877945876788bb..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ca-ES.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture ca-ES - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ca-ES", "default", { - name: "ca-ES", - englishName: "Catalan (Catalan)", - nativeName: "català (català )", - language: "ca", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinit", - positiveInfinity: "Infinit", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"], - namesAbbr: ["dg.","dl.","dt.","dc.","dj.","dv.","ds."], - namesShort: ["dg","dl","dt","dc","dj","dv","ds"] - }, - months: { - names: ["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""], - namesAbbr: ["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' / 'MMMM' / 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' / 'MMMM' / 'yyyy HH:mm", - F: "dddd, d' / 'MMMM' / 'yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM' / 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ca.js b/pub/lib/globalize/cultures/globalize.culture.ca.js deleted file mode 100644 index 19d315ec3f88500e44dcfa6de2390509776b0627..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ca.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture ca - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ca", "default", { - name: "ca", - englishName: "Catalan", - nativeName: "català ", - language: "ca", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinit", - positiveInfinity: "Infinit", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"], - namesAbbr: ["dg.","dl.","dt.","dc.","dj.","dv.","ds."], - namesShort: ["dg","dl","dt","dc","dj","dv","ds"] - }, - months: { - names: ["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""], - namesAbbr: ["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' / 'MMMM' / 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' / 'MMMM' / 'yyyy HH:mm", - F: "dddd, d' / 'MMMM' / 'yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM' / 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.co-FR.js b/pub/lib/globalize/cultures/globalize.culture.co-FR.js deleted file mode 100644 index da8c8add87069709ace6fbaa969d4c9f54f71843..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.co-FR.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture co-FR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "co-FR", "default", { - name: "co-FR", - englishName: "Corsican (France)", - nativeName: "Corsu (France)", - language: "co", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Mica numericu", - negativeInfinity: "-Infinitu", - positiveInfinity: "+Infinitu", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dumenica","luni","marti","mercuri","ghjovi","venderi","sabbatu"], - namesAbbr: ["dum.","lun.","mar.","mer.","ghj.","ven.","sab."], - namesShort: ["du","lu","ma","me","gh","ve","sa"] - }, - months: { - names: ["ghjennaghju","ferraghju","marzu","aprile","maghju","ghjunghju","lugliu","aostu","settembre","ottobre","nuvembre","dicembre",""], - namesAbbr: ["ghje","ferr","marz","apri","magh","ghju","lugl","aost","sett","otto","nuve","dice",""] - }, - AM: null, - PM: null, - eras: [{"name":"dopu J-C","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.co.js b/pub/lib/globalize/cultures/globalize.culture.co.js deleted file mode 100644 index 642559d204060da350fdc86c324c9ff3ef402c32..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.co.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture co - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "co", "default", { - name: "co", - englishName: "Corsican", - nativeName: "Corsu", - language: "co", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Mica numericu", - negativeInfinity: "-Infinitu", - positiveInfinity: "+Infinitu", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dumenica","luni","marti","mercuri","ghjovi","venderi","sabbatu"], - namesAbbr: ["dum.","lun.","mar.","mer.","ghj.","ven.","sab."], - namesShort: ["du","lu","ma","me","gh","ve","sa"] - }, - months: { - names: ["ghjennaghju","ferraghju","marzu","aprile","maghju","ghjunghju","lugliu","aostu","settembre","ottobre","nuvembre","dicembre",""], - namesAbbr: ["ghje","ferr","marz","apri","magh","ghju","lugl","aost","sett","otto","nuve","dice",""] - }, - AM: null, - PM: null, - eras: [{"name":"dopu J-C","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.cs-CZ.js b/pub/lib/globalize/cultures/globalize.culture.cs-CZ.js deleted file mode 100644 index 465bf4a24ad75cbb763497d996dad0fdd9ab2b27..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.cs-CZ.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Globalize Culture cs-CZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "cs-CZ", "default", { - name: "cs-CZ", - englishName: "Czech (Czech Republic)", - nativeName: "ÄeÅ¡tina (ÄŒeská republika)", - language: "cs", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Nenà ÄÃslo", - negativeInfinity: "-nekoneÄno", - positiveInfinity: "+nekoneÄno", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "KÄ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedÄ›le","pondÄ›lÃ","úterý","stÅ™eda","Ätvrtek","pátek","sobota"], - namesAbbr: ["ne","po","út","st","Ät","pá","so"], - namesShort: ["ne","po","út","st","Ät","pá","so"] - }, - months: { - names: ["leden","únor","bÅ™ezen","duben","kvÄ›ten","Äerven","Äervenec","srpen","zářÃ","Å™Ãjen","listopad","prosinec",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - monthsGenitive: { - names: ["ledna","února","bÅ™ezna","dubna","kvÄ›tna","Äervna","Äervence","srpna","zářÃ","Å™Ãjna","listopadu","prosince",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["dop.","dop.","DOP."], - PM: ["odp.","odp.","ODP."], - eras: [{"name":"n. l.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.cs.js b/pub/lib/globalize/cultures/globalize.culture.cs.js deleted file mode 100644 index 029d71ba687427c989ce3ebd57e1578564775e0b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.cs.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Globalize Culture cs - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "cs", "default", { - name: "cs", - englishName: "Czech", - nativeName: "ÄeÅ¡tina", - language: "cs", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Nenà ÄÃslo", - negativeInfinity: "-nekoneÄno", - positiveInfinity: "+nekoneÄno", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "KÄ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedÄ›le","pondÄ›lÃ","úterý","stÅ™eda","Ätvrtek","pátek","sobota"], - namesAbbr: ["ne","po","út","st","Ät","pá","so"], - namesShort: ["ne","po","út","st","Ät","pá","so"] - }, - months: { - names: ["leden","únor","bÅ™ezen","duben","kvÄ›ten","Äerven","Äervenec","srpen","zářÃ","Å™Ãjen","listopad","prosinec",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - monthsGenitive: { - names: ["ledna","února","bÅ™ezna","dubna","kvÄ›tna","Äervna","Äervence","srpna","zářÃ","Å™Ãjna","listopadu","prosince",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["dop.","dop.","DOP."], - PM: ["odp.","odp.","ODP."], - eras: [{"name":"n. l.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.cy-GB.js b/pub/lib/globalize/cultures/globalize.culture.cy-GB.js deleted file mode 100644 index 96be7b1bf83212dd71776e316607fde9e43dafc4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.cy-GB.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Globalize Culture cy-GB - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "cy-GB", "default", { - name: "cy-GB", - englishName: "Welsh (United Kingdom)", - nativeName: "Cymraeg (y Deyrnas Unedig)", - language: "cy", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"], - namesAbbr: ["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"], - namesShort: ["Su","Ll","Ma","Me","Ia","Gw","Sa"] - }, - months: { - names: ["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr",""], - namesAbbr: ["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.cy.js b/pub/lib/globalize/cultures/globalize.culture.cy.js deleted file mode 100644 index 7ee52896ec603d679c95dd0701683a6f6892850c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.cy.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Globalize Culture cy - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "cy", "default", { - name: "cy", - englishName: "Welsh", - nativeName: "Cymraeg", - language: "cy", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"], - namesAbbr: ["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"], - namesShort: ["Su","Ll","Ma","Me","Ia","Gw","Sa"] - }, - months: { - names: ["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr",""], - namesAbbr: ["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.da-DK.js b/pub/lib/globalize/cultures/globalize.culture.da-DK.js deleted file mode 100644 index 1e3da9c723973ffa3b748709191bf49e8bf4493b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.da-DK.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture da-DK - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "da-DK", "default", { - name: "da-DK", - englishName: "Danish (Denmark)", - nativeName: "dansk (Danmark)", - language: "da", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.da.js b/pub/lib/globalize/cultures/globalize.culture.da.js deleted file mode 100644 index dd00b726b8194d8873ecd53d3c0bb38448cb1ea0..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.da.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture da - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "da", "default", { - name: "da", - englishName: "Danish", - nativeName: "dansk", - language: "da", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.de-AT.js b/pub/lib/globalize/cultures/globalize.culture.de-AT.js deleted file mode 100644 index fb33da37f63a65747dce6be2069458cd1022e575..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.de-AT.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture de-AT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "de-AT", "default", { - name: "de-AT", - englishName: "German (Austria)", - nativeName: "Deutsch (Österreich)", - language: "de", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, dd. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, dd. MMMM yyyy HH:mm", - F: "dddd, dd. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.de-CH.js b/pub/lib/globalize/cultures/globalize.culture.de-CH.js deleted file mode 100644 index 5bc0a088f11ce5fab93568ad9173e9f91bf6a420..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.de-CH.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture de-CH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "de-CH", "default", { - name: "de-CH", - englishName: "German (Switzerland)", - nativeName: "Deutsch (Schweiz)", - language: "de", - numberFormat: { - ",": "'", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "Fr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.de-DE.js b/pub/lib/globalize/cultures/globalize.culture.de-DE.js deleted file mode 100644 index c9bab8d90b51f90fbc4f08591c43910cb22d20ad..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.de-DE.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture de-DE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "de-DE", "default", { - name: "de-DE", - englishName: "German (Germany)", - nativeName: "Deutsch (Deutschland)", - language: "de", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.de-LI.js b/pub/lib/globalize/cultures/globalize.culture.de-LI.js deleted file mode 100644 index a72b2065c1997f2a73c0908b2094a6a33c4e76f3..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.de-LI.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture de-LI - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "de-LI", "default", { - name: "de-LI", - englishName: "German (Liechtenstein)", - nativeName: "Deutsch (Liechtenstein)", - language: "de", - numberFormat: { - ",": "'", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "CHF" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.de-LU.js b/pub/lib/globalize/cultures/globalize.culture.de-LU.js deleted file mode 100644 index 43fbc1cdd2c447956a19241dbf9c022b930c3d2f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.de-LU.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture de-LU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "de-LU", "default", { - name: "de-LU", - englishName: "German (Luxembourg)", - nativeName: "Deutsch (Luxemburg)", - language: "de", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.de.js b/pub/lib/globalize/cultures/globalize.culture.de.js deleted file mode 100644 index 47ef7fe838c59602c2e63c3081426d68e68bbe5e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.de.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture de - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "de", "default", { - name: "de", - englishName: "German", - nativeName: "Deutsch", - language: "de", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.dsb-DE.js b/pub/lib/globalize/cultures/globalize.culture.dsb-DE.js deleted file mode 100644 index 77581d95a116694bd5e9fdd4e529840bb42d9b3f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.dsb-DE.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture dsb-DE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "dsb-DE", "default", { - name: "dsb-DE", - englishName: "Lower Sorbian (Germany)", - nativeName: "dolnoserbšćina (Nimska)", - language: "dsb", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "njedefinowane", - negativeInfinity: "-njekoÅ„cne", - positiveInfinity: "+njekoÅ„cne", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["njeźela","ponjeźele","waÅ‚tora","srjoda","stwortk","pÄ›tk","sobota"], - namesAbbr: ["nje","pon","waÅ‚","srj","stw","pÄ›t","sob"], - namesShort: ["n","p","w","s","s","p","s"] - }, - months: { - names: ["januar","februar","mÄ›rc","apryl","maj","junij","julij","awgust","september","oktober","nowember","december",""], - namesAbbr: ["jan","feb","mÄ›r","apr","maj","jun","jul","awg","sep","okt","now","dec",""] - }, - monthsGenitive: { - names: ["januara","februara","mÄ›rca","apryla","maja","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""], - namesAbbr: ["jan","feb","mÄ›r","apr","maj","jun","jul","awg","sep","okt","now","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"po Chr.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "dddd, 'dnja' d. MMMM yyyy", - t: "H.mm 'goź.'", - T: "H:mm:ss", - f: "dddd, 'dnja' d. MMMM yyyy H.mm 'goź.'", - F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.dsb.js b/pub/lib/globalize/cultures/globalize.culture.dsb.js deleted file mode 100644 index 5853f96fb225960aba8a9e7e10a8abb5b841c618..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.dsb.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture dsb - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "dsb", "default", { - name: "dsb", - englishName: "Lower Sorbian", - nativeName: "dolnoserbšćina", - language: "dsb", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "njedefinowane", - negativeInfinity: "-njekoÅ„cne", - positiveInfinity: "+njekoÅ„cne", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["njeźela","ponjeźele","waÅ‚tora","srjoda","stwortk","pÄ›tk","sobota"], - namesAbbr: ["nje","pon","waÅ‚","srj","stw","pÄ›t","sob"], - namesShort: ["n","p","w","s","s","p","s"] - }, - months: { - names: ["januar","februar","mÄ›rc","apryl","maj","junij","julij","awgust","september","oktober","nowember","december",""], - namesAbbr: ["jan","feb","mÄ›r","apr","maj","jun","jul","awg","sep","okt","now","dec",""] - }, - monthsGenitive: { - names: ["januara","februara","mÄ›rca","apryla","maja","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""], - namesAbbr: ["jan","feb","mÄ›r","apr","maj","jun","jul","awg","sep","okt","now","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"po Chr.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "dddd, 'dnja' d. MMMM yyyy", - t: "H.mm 'goź.'", - T: "H:mm:ss", - f: "dddd, 'dnja' d. MMMM yyyy H.mm 'goź.'", - F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.dv-MV.js b/pub/lib/globalize/cultures/globalize.culture.dv-MV.js deleted file mode 100644 index fb92652cb48bedac786bede8efc72bd6d3eda956..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.dv-MV.js +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Globalize Culture dv-MV - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "dv-MV", "default", { - name: "dv-MV", - englishName: "Divehi (Maldives)", - nativeName: "Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ° (Þ‹Þ¨ÞˆÞ¬Þ€Þ¨ ÞƒÞ§Þ‡Þ°Þ–Þ¬)", - language: "dv", - isRTL: true, - numberFormat: { - currency: { - pattern: ["n $-","n $"], - symbol: "Þƒ." - } - }, - calendars: { - standard: { - name: "Hijri", - days: { - names: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesAbbr: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesShort: ["Þ‡Þ§","Þ€Þ¯","Þ‡Þ¦","Þ„Þª","Þ„Þª","Þ€Þª","Þ€Þ®"] - }, - months: { - names: ["Þ‰ÞªÞ™Þ¦Þ‡Þ°ÞƒÞ¦Þ‰Þ°","ÞžÞ¦ÞŠÞ¦ÞƒÞª","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ¦Þ‡Þ°ÞˆÞ¦ÞÞ°","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞª","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ«ÞÞ§","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞ§","ÞƒÞ¦Þ–Þ¦Þ„Þ°","ÞÞ¦Þ¢Þ°Þ„Þ§Þ‚Þ°","ÞƒÞ¦Þ‰Þ¦ÞŸÞ§Þ‚Þ°","ÞÞ¦Þ‡Þ°ÞˆÞ§ÞÞ°","Þ›ÞªÞÞ°Þ¤Þ¦Þ¢Þ¨Þ‹Þ§","Þ›ÞªÞÞ°Þ™Þ¨Þ‡Þ°Þ–Þ§",""], - namesAbbr: ["Þ‰ÞªÞ™Þ¦Þ‡Þ°ÞƒÞ¦Þ‰Þ°","ÞžÞ¦ÞŠÞ¦ÞƒÞª","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ¦Þ‡Þ°ÞˆÞ¦ÞÞ°","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞª","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ«ÞÞ§","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞ§","ÞƒÞ¦Þ–Þ¦Þ„Þ°","ÞÞ¦Þ¢Þ°Þ„Þ§Þ‚Þ°","ÞƒÞ¦Þ‰Þ¦ÞŸÞ§Þ‚Þ°","ÞÞ¦Þ‡Þ°ÞˆÞ§ÞÞ°","Þ›ÞªÞÞ°Þ¤Þ¦Þ¢Þ¨Þ‹Þ§","Þ›ÞªÞÞ°Þ™Þ¨Þ‡Þ°Þ–Þ§",""] - }, - AM: ["Þ‰Þ†","Þ‰Þ†","Þ‰Þ†"], - PM: ["Þ‰ÞŠ","Þ‰ÞŠ","Þ‰ÞŠ"], - eras: [{"name":"Þ€Þ¨Þ–Þ°ÞƒÞ©","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd/MM/yyyy HH:mm", - F: "dd/MM/yyyy HH:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - days: { - names: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesAbbr: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesShort: ["Þ‡Þ§","Þ€Þ¯","Þ‡Þ¦","Þ„Þª","Þ„Þª","Þ€Þª","Þ€Þ®"] - }, - months: { - names: ["Þ–Þ¦Þ‚Þ¦ÞˆÞ¦ÞƒÞ©","ÞŠÞ¬Þ„Þ°ÞƒÞªÞ‡Þ¦ÞƒÞ©","Þ‰Þ§Þ—Þ°","Þ‡ÞÞ•Þ°ÞƒÞ¨ÞÞ°","Þ‰Þ¬Þ‡Þ¨","Þ–Þ«Þ‚Þ°","Þ–ÞªÞÞ¦Þ‡Þ¨","Þ‡Þ¯ÞŽÞ¦ÞÞ°Þ“Þ°","ÞÞ¬Þ•Þ°Þ“Þ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‡Þ®Þ†Þ°Þ“Þ¯Þ„Þ¦Þƒ","Þ‚Þ®ÞˆÞ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‘Þ¨ÞÞ¬Þ‰Þ°Þ„Þ¦Þƒ",""], - namesAbbr: ["Þ–Þ¦Þ‚Þ¦ÞˆÞ¦ÞƒÞ©","ÞŠÞ¬Þ„Þ°ÞƒÞªÞ‡Þ¦ÞƒÞ©","Þ‰Þ§Þ—Þ°","Þ‡ÞÞ•Þ°ÞƒÞ¨ÞÞ°","Þ‰Þ¬Þ‡Þ¨","Þ–Þ«Þ‚Þ°","Þ–ÞªÞÞ¦Þ‡Þ¨","Þ‡Þ¯ÞŽÞ¦ÞÞ°Þ“Þ°","ÞÞ¬Þ•Þ°Þ“Þ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‡Þ®Þ†Þ°Þ“Þ¯Þ„Þ¦Þƒ","Þ‚Þ®ÞˆÞ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‘Þ¨ÞÞ¬Þ‰Þ°Þ„Þ¦Þƒ",""] - }, - AM: ["Þ‰Þ†","Þ‰Þ†","Þ‰Þ†"], - PM: ["Þ‰ÞŠ","Þ‰ÞŠ","Þ‰ÞŠ"], - eras: [{"name":"Þ‰Þ©ÞÞ§Þ‹Þ©","start":null,"offset":0}], - patterns: { - d: "dd/MM/yy", - D: "ddd, yyyy MMMM dd", - t: "HH:mm", - T: "HH:mm:ss", - f: "ddd, yyyy MMMM dd HH:mm", - F: "ddd, yyyy MMMM dd HH:mm:ss", - Y: "yyyy, MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.dv.js b/pub/lib/globalize/cultures/globalize.culture.dv.js deleted file mode 100644 index fc8c6d5af9fb058a8573072717e078ba62430f07..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.dv.js +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Globalize Culture dv - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "dv", "default", { - name: "dv", - englishName: "Divehi", - nativeName: "Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ°", - language: "dv", - isRTL: true, - numberFormat: { - currency: { - pattern: ["n $-","n $"], - symbol: "Þƒ." - } - }, - calendars: { - standard: { - name: "Hijri", - days: { - names: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesAbbr: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesShort: ["Þ‡Þ§","Þ€Þ¯","Þ‡Þ¦","Þ„Þª","Þ„Þª","Þ€Þª","Þ€Þ®"] - }, - months: { - names: ["Þ‰ÞªÞ™Þ¦Þ‡Þ°ÞƒÞ¦Þ‰Þ°","ÞžÞ¦ÞŠÞ¦ÞƒÞª","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ¦Þ‡Þ°ÞˆÞ¦ÞÞ°","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞª","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ«ÞÞ§","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞ§","ÞƒÞ¦Þ–Þ¦Þ„Þ°","ÞÞ¦Þ¢Þ°Þ„Þ§Þ‚Þ°","ÞƒÞ¦Þ‰Þ¦ÞŸÞ§Þ‚Þ°","ÞÞ¦Þ‡Þ°ÞˆÞ§ÞÞ°","Þ›ÞªÞÞ°Þ¤Þ¦Þ¢Þ¨Þ‹Þ§","Þ›ÞªÞÞ°Þ™Þ¨Þ‡Þ°Þ–Þ§",""], - namesAbbr: ["Þ‰ÞªÞ™Þ¦Þ‡Þ°ÞƒÞ¦Þ‰Þ°","ÞžÞ¦ÞŠÞ¦ÞƒÞª","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ¦Þ‡Þ°ÞˆÞ¦ÞÞ°","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞª","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ«ÞÞ§","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞ§","ÞƒÞ¦Þ–Þ¦Þ„Þ°","ÞÞ¦Þ¢Þ°Þ„Þ§Þ‚Þ°","ÞƒÞ¦Þ‰Þ¦ÞŸÞ§Þ‚Þ°","ÞÞ¦Þ‡Þ°ÞˆÞ§ÞÞ°","Þ›ÞªÞÞ°Þ¤Þ¦Þ¢Þ¨Þ‹Þ§","Þ›ÞªÞÞ°Þ™Þ¨Þ‡Þ°Þ–Þ§",""] - }, - AM: ["Þ‰Þ†","Þ‰Þ†","Þ‰Þ†"], - PM: ["Þ‰ÞŠ","Þ‰ÞŠ","Þ‰ÞŠ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd/MM/yyyy HH:mm", - F: "dd/MM/yyyy HH:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - days: { - names: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesAbbr: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesShort: ["Þ‡Þ§","Þ€Þ¯","Þ‡Þ¦","Þ„Þª","Þ„Þª","Þ€Þª","Þ€Þ®"] - }, - months: { - names: ["Þ–Þ¦Þ‚Þ¦ÞˆÞ¦ÞƒÞ©","ÞŠÞ¬Þ„Þ°ÞƒÞªÞ‡Þ¦ÞƒÞ©","Þ‰Þ§Þ—Þ°","Þ‡ÞÞ•Þ°ÞƒÞ¨ÞÞ°","Þ‰Þ¬Þ‡Þ¨","Þ–Þ«Þ‚Þ°","Þ–ÞªÞÞ¦Þ‡Þ¨","Þ‡Þ¯ÞŽÞ¦ÞÞ°Þ“Þ°","ÞÞ¬Þ•Þ°Þ“Þ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‡Þ®Þ†Þ°Þ“Þ¯Þ„Þ¦Þƒ","Þ‚Þ®ÞˆÞ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‘Þ¨ÞÞ¬Þ‰Þ°Þ„Þ¦Þƒ",""], - namesAbbr: ["Þ–Þ¦Þ‚Þ¦ÞˆÞ¦ÞƒÞ©","ÞŠÞ¬Þ„Þ°ÞƒÞªÞ‡Þ¦ÞƒÞ©","Þ‰Þ§Þ—Þ°","Þ‡ÞÞ•Þ°ÞƒÞ¨ÞÞ°","Þ‰Þ¬Þ‡Þ¨","Þ–Þ«Þ‚Þ°","Þ–ÞªÞÞ¦Þ‡Þ¨","Þ‡Þ¯ÞŽÞ¦ÞÞ°Þ“Þ°","ÞÞ¬Þ•Þ°Þ“Þ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‡Þ®Þ†Þ°Þ“Þ¯Þ„Þ¦Þƒ","Þ‚Þ®ÞˆÞ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‘Þ¨ÞÞ¬Þ‰Þ°Þ„Þ¦Þƒ",""] - }, - AM: ["Þ‰Þ†","Þ‰Þ†","Þ‰Þ†"], - PM: ["Þ‰ÞŠ","Þ‰ÞŠ","Þ‰ÞŠ"], - eras: [{"name":"Þ‰Þ©ÞÞ§Þ‹Þ©","start":null,"offset":0}], - patterns: { - d: "dd/MM/yy", - D: "ddd, yyyy MMMM dd", - t: "HH:mm", - T: "HH:mm:ss", - f: "ddd, yyyy MMMM dd HH:mm", - F: "ddd, yyyy MMMM dd HH:mm:ss", - Y: "yyyy, MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.el-GR.js b/pub/lib/globalize/cultures/globalize.culture.el-GR.js deleted file mode 100644 index a7df499732c6d87c04397f0128c33c3f0627b7f8..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.el-GR.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Globalize Culture el-GR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "el-GR", "default", { - name: "el-GR", - englishName: "Greek (Greece)", - nativeName: "Ελληνικά (Ελλάδα)", - language: "el", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "μη αÏιθμός", - negativeInfinity: "-ΆπειÏο", - positiveInfinity: "ΆπειÏο", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["ΚυÏιακή","ΔευτÎÏα","ΤÏίτη","ΤετάÏτη","Î Îμπτη","ΠαÏασκευή","Σάββατο"], - namesAbbr: ["ΚυÏ","Δευ","ΤÏι","Τετ","Πεμ","ΠαÏ","Σαβ"], - namesShort: ["Κυ","Δε","ΤÏ","Τε","Πε","Πα","Σά"] - }, - months: { - names: ["ΙανουάÏιος","ΦεβÏουάÏιος","ΜάÏτιος","ΑπÏίλιος","Μάιος","ΙοÏνιος","ΙοÏλιος","ΑÏγουστος","ΣεπτÎμβÏιος","ΟκτώβÏιος","ÎοÎμβÏιος","ΔεκÎμβÏιος",""], - namesAbbr: ["Ιαν","Φεβ","ΜαÏ","ΑπÏ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Îοε","Δεκ",""] - }, - monthsGenitive: { - names: ["ΙανουαÏίου","ΦεβÏουαÏίου","ΜαÏτίου","ΑπÏιλίου","ΜαÎου","Ιουνίου","Ιουλίου","ΑυγοÏστου","ΣεπτεμβÏίου","ΟκτωβÏίου","ÎοεμβÏίου","ΔεκεμβÏίου",""], - namesAbbr: ["Ιαν","Φεβ","ΜαÏ","ΑπÏ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Îοε","Δεκ",""] - }, - AM: ["πμ","πμ","ΠΜ"], - PM: ["μμ","μμ","ΜΜ"], - eras: [{"name":"μ.Χ.","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "dddd, d MMMM yyyy", - f: "dddd, d MMMM yyyy h:mm tt", - F: "dddd, d MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.el.js b/pub/lib/globalize/cultures/globalize.culture.el.js deleted file mode 100644 index ea902551c79322458018e93d96ccf9374fe5d1a4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.el.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Globalize Culture el - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "el", "default", { - name: "el", - englishName: "Greek", - nativeName: "Ελληνικά", - language: "el", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "μη αÏιθμός", - negativeInfinity: "-ΆπειÏο", - positiveInfinity: "ΆπειÏο", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["ΚυÏιακή","ΔευτÎÏα","ΤÏίτη","ΤετάÏτη","Î Îμπτη","ΠαÏασκευή","Σάββατο"], - namesAbbr: ["ΚυÏ","Δευ","ΤÏι","Τετ","Πεμ","ΠαÏ","Σαβ"], - namesShort: ["Κυ","Δε","ΤÏ","Τε","Πε","Πα","Σά"] - }, - months: { - names: ["ΙανουάÏιος","ΦεβÏουάÏιος","ΜάÏτιος","ΑπÏίλιος","Μάιος","ΙοÏνιος","ΙοÏλιος","ΑÏγουστος","ΣεπτÎμβÏιος","ΟκτώβÏιος","ÎοÎμβÏιος","ΔεκÎμβÏιος",""], - namesAbbr: ["Ιαν","Φεβ","ΜαÏ","ΑπÏ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Îοε","Δεκ",""] - }, - monthsGenitive: { - names: ["ΙανουαÏίου","ΦεβÏουαÏίου","ΜαÏτίου","ΑπÏιλίου","ΜαÎου","Ιουνίου","Ιουλίου","ΑυγοÏστου","ΣεπτεμβÏίου","ΟκτωβÏίου","ÎοεμβÏίου","ΔεκεμβÏίου",""], - namesAbbr: ["Ιαν","Φεβ","ΜαÏ","ΑπÏ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Îοε","Δεκ",""] - }, - AM: ["πμ","πμ","ΠΜ"], - PM: ["μμ","μμ","ΜΜ"], - eras: [{"name":"μ.Χ.","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "dddd, d MMMM yyyy", - f: "dddd, d MMMM yyyy h:mm tt", - F: "dddd, d MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-029.js b/pub/lib/globalize/cultures/globalize.culture.en-029.js deleted file mode 100644 index f3859d0d534815d9f05b81a85c14027f22ccec6a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-029.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Globalize Culture en-029 - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-029", "default", { - name: "en-029", - englishName: "English (Caribbean)", - nativeName: "English (Caribbean)", - numberFormat: { - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - patterns: { - d: "MM/dd/yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-AU.js b/pub/lib/globalize/cultures/globalize.culture.en-AU.js deleted file mode 100644 index 60fd67ba493c4b250b42eb970e9d22de76c67b58..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-AU.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Globalize Culture en-AU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-AU", "default", { - name: "en-AU", - englishName: "English (Australia)", - nativeName: "English (Australia)", - numberFormat: { - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - patterns: { - d: "d/MM/yyyy", - D: "dddd, d MMMM yyyy", - f: "dddd, d MMMM yyyy h:mm tt", - F: "dddd, d MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-BZ.js b/pub/lib/globalize/cultures/globalize.culture.en-BZ.js deleted file mode 100644 index 6667e9ecee39550227cc89c31509a7c63596b411..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-BZ.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Globalize Culture en-BZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-BZ", "default", { - name: "en-BZ", - englishName: "English (Belize)", - nativeName: "English (Belize)", - numberFormat: { - currency: { - groupSizes: [3,0], - symbol: "BZ$" - } - }, - calendars: { - standard: { - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd MMMM yyyy hh:mm tt", - F: "dddd, dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-CA.js b/pub/lib/globalize/cultures/globalize.culture.en-CA.js deleted file mode 100644 index a3c6e7c43a276658b5648f52cf8aaf0026d8d2a1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-CA.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Globalize Culture en-CA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-CA", "default", { - name: "en-CA", - englishName: "English (Canada)", - nativeName: "English (Canada)", - numberFormat: { - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - patterns: { - d: "dd/MM/yyyy", - D: "MMMM-dd-yy", - f: "MMMM-dd-yy h:mm tt", - F: "MMMM-dd-yy h:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-GB.js b/pub/lib/globalize/cultures/globalize.culture.en-GB.js deleted file mode 100644 index 7520ff83e3b0dec510ba342f4124bdadc690bfeb..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-GB.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Globalize Culture en-GB - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-GB", "default", { - name: "en-GB", - englishName: "English (United Kingdom)", - nativeName: "English (United Kingdom)", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-IE.js b/pub/lib/globalize/cultures/globalize.culture.en-IE.js deleted file mode 100644 index 9b43f580f5283ea5bbaf7a4917f1cc2bd9c68d18..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-IE.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Globalize Culture en-IE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-IE", "default", { - name: "en-IE", - englishName: "English (Ireland)", - nativeName: "English (Ireland)", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-IN.js b/pub/lib/globalize/cultures/globalize.culture.en-IN.js deleted file mode 100644 index f7a55ac9f66c87c982b382ef877dd10442083f60..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-IN.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture en-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-IN", "default", { - name: "en-IN", - englishName: "English (India)", - nativeName: "English (India)", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "Rs." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-JM.js b/pub/lib/globalize/cultures/globalize.culture.en-JM.js deleted file mode 100644 index dd032bbec0238ce0cd1028a599709fd2fbaba1da..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-JM.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Globalize Culture en-JM - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-JM", "default", { - name: "en-JM", - englishName: "English (Jamaica)", - nativeName: "English (Jamaica)", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "J$" - } - }, - calendars: { - standard: { - patterns: { - d: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-MY.js b/pub/lib/globalize/cultures/globalize.culture.en-MY.js deleted file mode 100644 index 1e92c7afefa842da35764b60e369dc9742661d55..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-MY.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Globalize Culture en-MY - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-MY", "default", { - name: "en-MY", - englishName: "English (Malaysia)", - nativeName: "English (Malaysia)", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "RM" - } - }, - calendars: { - standard: { - days: { - namesShort: ["S","M","T","W","T","F","S"] - }, - patterns: { - d: "d/M/yyyy", - D: "dddd, d MMMM, yyyy", - f: "dddd, d MMMM, yyyy h:mm tt", - F: "dddd, d MMMM, yyyy h:mm:ss tt", - M: "d MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-NZ.js b/pub/lib/globalize/cultures/globalize.culture.en-NZ.js deleted file mode 100644 index 267dd68fe9ece893a659dcd1e861f26c241cf85e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-NZ.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Globalize Culture en-NZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-NZ", "default", { - name: "en-NZ", - englishName: "English (New Zealand)", - nativeName: "English (New Zealand)", - numberFormat: { - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "d/MM/yyyy", - D: "dddd, d MMMM yyyy", - f: "dddd, d MMMM yyyy h:mm tt", - F: "dddd, d MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-PH.js b/pub/lib/globalize/cultures/globalize.culture.en-PH.js deleted file mode 100644 index ac4d5b1f4e2490d915d4daefecbb8aed3436b322..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-PH.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Globalize Culture en-PH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-PH", "default", { - name: "en-PH", - englishName: "English (Republic of the Philippines)", - nativeName: "English (Philippines)", - numberFormat: { - currency: { - symbol: "Php" - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-SG.js b/pub/lib/globalize/cultures/globalize.culture.en-SG.js deleted file mode 100644 index f35539df06fc5a452350d21a8afddb5b60b164ca..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-SG.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Globalize Culture en-SG - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-SG", "default", { - name: "en-SG", - englishName: "English (Singapore)", - nativeName: "English (Singapore)", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - } - }, - calendars: { - standard: { - days: { - namesShort: ["S","M","T","W","T","F","S"] - }, - patterns: { - d: "d/M/yyyy", - D: "dddd, d MMMM, yyyy", - f: "dddd, d MMMM, yyyy h:mm tt", - F: "dddd, d MMMM, yyyy h:mm:ss tt", - M: "d MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-TT.js b/pub/lib/globalize/cultures/globalize.culture.en-TT.js deleted file mode 100644 index 7af34ea07254d6c8ead46d3a16ab03b4d6562863..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-TT.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Globalize Culture en-TT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-TT", "default", { - name: "en-TT", - englishName: "English (Trinidad and Tobago)", - nativeName: "English (Trinidad y Tobago)", - numberFormat: { - currency: { - groupSizes: [3,0], - symbol: "TT$" - } - }, - calendars: { - standard: { - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd MMMM yyyy hh:mm tt", - F: "dddd, dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-US.js b/pub/lib/globalize/cultures/globalize.culture.en-US.js deleted file mode 100644 index ffa3cbbe9c64644ef2c3c3cf7a056bf958579f64..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-US.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Globalize Culture en-US - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-US", "default", { - name: "en-US", - englishName: "English (United States)" -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-ZA.js b/pub/lib/globalize/cultures/globalize.culture.en-ZA.js deleted file mode 100644 index 2a23c6545da59c53e30e0b30d0c9d53319c40697..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-ZA.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Globalize Culture en-ZA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-ZA", "default", { - name: "en-ZA", - englishName: "English (South Africa)", - nativeName: "English (South Africa)", - numberFormat: { - ",": " ", - percent: { - pattern: ["-n%","n%"], - ",": " " - }, - currency: { - pattern: ["$-n","$ n"], - ",": " ", - ".": ",", - symbol: "R" - } - }, - calendars: { - standard: { - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.en-ZW.js b/pub/lib/globalize/cultures/globalize.culture.en-ZW.js deleted file mode 100644 index d157fda810f973f2a6778708eb0421f5f5e0e845..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.en-ZW.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Globalize Culture en-ZW - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "en-ZW", "default", { - name: "en-ZW", - englishName: "English (Zimbabwe)", - nativeName: "English (Zimbabwe)", - numberFormat: { - currency: { - symbol: "Z$" - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-AR.js b/pub/lib/globalize/cultures/globalize.culture.es-AR.js deleted file mode 100644 index aadd82f6790c4a9bb6aeba8a3009c3a83aa3326a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-AR.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture es-AR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-AR", "default", { - name: "es-AR", - englishName: "Spanish (Argentina)", - nativeName: "Español (Argentina)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$-n","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-BO.js b/pub/lib/globalize/cultures/globalize.culture.es-BO.js deleted file mode 100644 index df0a6c1bd9d8774ae9c8d5e894fbc9121abc6523..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-BO.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture es-BO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-BO", "default", { - name: "es-BO", - englishName: "Spanish (Bolivia)", - nativeName: "Español (Bolivia)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "$b" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-CL.js b/pub/lib/globalize/cultures/globalize.culture.es-CL.js deleted file mode 100644 index c2c366976e723c44d1a2509b1c6fc30966cca7fb..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-CL.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture es-CL - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-CL", "default", { - name: "es-CL", - englishName: "Spanish (Chile)", - nativeName: "Español (Chile)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-CO.js b/pub/lib/globalize/cultures/globalize.culture.es-CO.js deleted file mode 100644 index 83e4e28463a94a449fa59081d7441ff510ee5c32..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-CO.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture es-CO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-CO", "default", { - name: "es-CO", - englishName: "Spanish (Colombia)", - nativeName: "Español (Colombia)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-CR.js b/pub/lib/globalize/cultures/globalize.culture.es-CR.js deleted file mode 100644 index 381a27f69186f460b666c61978850c2684899515..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-CR.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture es-CR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-CR", "default", { - name: "es-CR", - englishName: "Spanish (Costa Rica)", - nativeName: "Español (Costa Rica)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - ",": ".", - ".": ",", - symbol: "â‚¡" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-DO.js b/pub/lib/globalize/cultures/globalize.culture.es-DO.js deleted file mode 100644 index df2c17d99094dd109da7285922e7a72f7b86d7e3..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-DO.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Globalize Culture es-DO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-DO", "default", { - name: "es-DO", - englishName: "Spanish (Dominican Republic)", - nativeName: "Español (República Dominicana)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - symbol: "RD$" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-EC.js b/pub/lib/globalize/cultures/globalize.culture.es-EC.js deleted file mode 100644 index 58a0c6a679695f12353f7a236128259cdef6b01a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-EC.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture es-EC - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-EC", "default", { - name: "es-EC", - englishName: "Spanish (Ecuador)", - nativeName: "Español (Ecuador)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-ES.js b/pub/lib/globalize/cultures/globalize.culture.es-ES.js deleted file mode 100644 index 57cee41e90e667d876fbde355ca7645b90f54155..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-ES.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture es-ES - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-ES", "default", { - name: "es-ES", - englishName: "Spanish (Spain, International Sort)", - nativeName: "Español (España, alfabetización internacional)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-GT.js b/pub/lib/globalize/cultures/globalize.culture.es-GT.js deleted file mode 100644 index 99a8b8ae8d3fe26758a2a2d483aa608ccaaf6eec..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-GT.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Globalize Culture es-GT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-GT", "default", { - name: "es-GT", - englishName: "Spanish (Guatemala)", - nativeName: "Español (Guatemala)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - symbol: "Q" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-HN.js b/pub/lib/globalize/cultures/globalize.culture.es-HN.js deleted file mode 100644 index e04d735f258d8255762dd339668b4aecc642605a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-HN.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Globalize Culture es-HN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-HN", "default", { - name: "es-HN", - englishName: "Spanish (Honduras)", - nativeName: "Español (Honduras)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,0], - symbol: "L." - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-MX.js b/pub/lib/globalize/cultures/globalize.culture.es-MX.js deleted file mode 100644 index c6d81caf3fbf91b8f7450bd4fd6ec9f0fa7fd8f2..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-MX.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Globalize Culture es-MX - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-MX", "default", { - name: "es-MX", - englishName: "Spanish (Mexico)", - nativeName: "Español (México)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-NI.js b/pub/lib/globalize/cultures/globalize.culture.es-NI.js deleted file mode 100644 index fc9ddbcfb6e8536d8131d97f736e6e916e7af79f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-NI.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Globalize Culture es-NI - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-NI", "default", { - name: "es-NI", - englishName: "Spanish (Nicaragua)", - nativeName: "Español (Nicaragua)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["($ n)","$ n"], - groupSizes: [3,0], - symbol: "C$" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-PA.js b/pub/lib/globalize/cultures/globalize.culture.es-PA.js deleted file mode 100644 index ac524d76e066e813d7728f4ac34514ee44e3a645..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-PA.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Globalize Culture es-PA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-PA", "default", { - name: "es-PA", - englishName: "Spanish (Panama)", - nativeName: "Español (Panamá)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["($ n)","$ n"], - symbol: "B/." - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-PE.js b/pub/lib/globalize/cultures/globalize.culture.es-PE.js deleted file mode 100644 index b17a61a292417be8e0bc423f60a3fee5b409bd59..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-PE.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Globalize Culture es-PE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-PE", "default", { - name: "es-PE", - englishName: "Spanish (Peru)", - nativeName: "Español (Perú)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["$ -n","$ n"], - symbol: "S/." - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-PR.js b/pub/lib/globalize/cultures/globalize.culture.es-PR.js deleted file mode 100644 index 5060be628693a2c7d54f3345a749733cffe2df35..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-PR.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Globalize Culture es-PR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-PR", "default", { - name: "es-PR", - englishName: "Spanish (Puerto Rico)", - nativeName: "Español (Puerto Rico)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["($ n)","$ n"], - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-PY.js b/pub/lib/globalize/cultures/globalize.culture.es-PY.js deleted file mode 100644 index 3cd7348ac0c04c7cd0465e393a8301ace69e0f5a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-PY.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture es-PY - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-PY", "default", { - name: "es-PY", - englishName: "Spanish (Paraguay)", - nativeName: "Español (Paraguay)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "Gs" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-SV.js b/pub/lib/globalize/cultures/globalize.culture.es-SV.js deleted file mode 100644 index b9aba7e88b2460dd66522f747aaab8f9cb037f43..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-SV.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Globalize Culture es-SV - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-SV", "default", { - name: "es-SV", - englishName: "Spanish (El Salvador)", - nativeName: "Español (El Salvador)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-US.js b/pub/lib/globalize/cultures/globalize.culture.es-US.js deleted file mode 100644 index f06d16d01abe734aad2da89127a603ceb0e455d2..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-US.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Globalize Culture es-US - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-US", "default", { - name: "es-US", - englishName: "Spanish (United States)", - nativeName: "Español (Estados Unidos)", - language: "es", - numberFormat: { - groupSizes: [3,0], - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sa"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - M: "dd' de 'MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-UY.js b/pub/lib/globalize/cultures/globalize.culture.es-UY.js deleted file mode 100644 index fff99a780f0cfd51702370dc4aa644354b6b9b47..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-UY.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture es-UY - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-UY", "default", { - name: "es-UY", - englishName: "Spanish (Uruguay)", - nativeName: "Español (Uruguay)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "$U" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es-VE.js b/pub/lib/globalize/cultures/globalize.culture.es-VE.js deleted file mode 100644 index 29eb125ccee60b8f8961051c4c972ac34c1053fa..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es-VE.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture es-VE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es-VE", "default", { - name: "es-VE", - englishName: "Spanish (Bolivarian Republic of Venezuela)", - nativeName: "Español (Republica Bolivariana de Venezuela)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "Bs. F." - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.es.js b/pub/lib/globalize/cultures/globalize.culture.es.js deleted file mode 100644 index 97db3241a2f94845e9e09b731e29ac3b2d7fd48d..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.es.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture es - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "es", "default", { - name: "es", - englishName: "Spanish", - nativeName: "español", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.et-EE.js b/pub/lib/globalize/cultures/globalize.culture.et-EE.js deleted file mode 100644 index e2b798ce38f3277a3a51ce091775c0f4c335552f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.et-EE.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture et-EE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "et-EE", "default", { - name: "et-EE", - englishName: "Estonian (Estonia)", - nativeName: "eesti (Eesti)", - language: "et", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "avaldamatu", - negativeInfinity: "miinuslõpmatus", - positiveInfinity: "plusslõpmatus", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"], - namesAbbr: ["P","E","T","K","N","R","L"], - namesShort: ["P","E","T","K","N","R","L"] - }, - months: { - names: ["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember",""], - namesAbbr: ["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets",""] - }, - AM: ["EL","el","EL"], - PM: ["PL","pl","PL"], - patterns: { - d: "d.MM.yyyy", - D: "d. MMMM yyyy'. a.'", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy'. a.' H:mm", - F: "d. MMMM yyyy'. a.' H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy'. a.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.et.js b/pub/lib/globalize/cultures/globalize.culture.et.js deleted file mode 100644 index bfc90248e4be62c7d06f5406e0fbd91a5731b405..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.et.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture et - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "et", "default", { - name: "et", - englishName: "Estonian", - nativeName: "eesti", - language: "et", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "avaldamatu", - negativeInfinity: "miinuslõpmatus", - positiveInfinity: "plusslõpmatus", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"], - namesAbbr: ["P","E","T","K","N","R","L"], - namesShort: ["P","E","T","K","N","R","L"] - }, - months: { - names: ["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember",""], - namesAbbr: ["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets",""] - }, - AM: ["EL","el","EL"], - PM: ["PL","pl","PL"], - patterns: { - d: "d.MM.yyyy", - D: "d. MMMM yyyy'. a.'", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy'. a.' H:mm", - F: "d. MMMM yyyy'. a.' H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy'. a.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.eu-ES.js b/pub/lib/globalize/cultures/globalize.culture.eu-ES.js deleted file mode 100644 index e46a36788a82096e90c6d38e440a1e906522050e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.eu-ES.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture eu-ES - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "eu-ES", "default", { - name: "eu-ES", - englishName: "Basque (Basque)", - nativeName: "euskara (euskara)", - language: "eu", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "EdZ", - negativeInfinity: "-Infinitu", - positiveInfinity: "Infinitu", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"], - namesAbbr: ["ig.","al.","as.","az.","og.","or.","lr."], - namesShort: ["ig","al","as","az","og","or","lr"] - }, - months: { - names: ["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""], - namesAbbr: ["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "yyyy/MM/dd", - D: "dddd, yyyy.'eko' MMMM'k 'd", - t: "HH:mm", - T: "H:mm:ss", - f: "dddd, yyyy.'eko' MMMM'k 'd HH:mm", - F: "dddd, yyyy.'eko' MMMM'k 'd H:mm:ss", - Y: "yyyy.'eko' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.eu.js b/pub/lib/globalize/cultures/globalize.culture.eu.js deleted file mode 100644 index e679e9727cf7b9ac067bb239c94d7bd61098fa5e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.eu.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture eu - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "eu", "default", { - name: "eu", - englishName: "Basque", - nativeName: "euskara", - language: "eu", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "EdZ", - negativeInfinity: "-Infinitu", - positiveInfinity: "Infinitu", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"], - namesAbbr: ["ig.","al.","as.","az.","og.","or.","lr."], - namesShort: ["ig","al","as","az","og","or","lr"] - }, - months: { - names: ["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""], - namesAbbr: ["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "yyyy/MM/dd", - D: "dddd, yyyy.'eko' MMMM'k 'd", - t: "HH:mm", - T: "H:mm:ss", - f: "dddd, yyyy.'eko' MMMM'k 'd HH:mm", - F: "dddd, yyyy.'eko' MMMM'k 'd H:mm:ss", - Y: "yyyy.'eko' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fa-IR.js b/pub/lib/globalize/cultures/globalize.culture.fa-IR.js deleted file mode 100644 index 61254e8f91a0b2627857bc7912a326d32ed16c69..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fa-IR.js +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Globalize Culture fa-IR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fa-IR", "default", { - name: "fa-IR", - englishName: "Persian", - nativeName: "ÙØ§Ø±Ø³Ù‰ (ایران)", - language: "fa", - isRTL: true, - numberFormat: { - pattern: ["n-"], - currency: { - pattern: ["$n-","$ n"], - ".": "/", - symbol: "ريال" - } - }, - calendars: { - standard: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["ژانويه","Ùوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اÙكتبر","نوامبر","دسامبر",""], - namesAbbr: ["ژانويه","Ùوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اÙكتبر","نوامبر","دسامبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - patterns: { - d: "yyyy/MM/dd", - D: "yyyy/MM/dd", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "yyyy/MM/dd hh:mm tt", - F: "yyyy/MM/dd hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fa.js b/pub/lib/globalize/cultures/globalize.culture.fa.js deleted file mode 100644 index ce702728d8b0b25e8ca6fda9c2b9438d30ef9aee..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fa.js +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Globalize Culture fa - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fa", "default", { - name: "fa", - englishName: "Persian", - nativeName: "ÙØ§Ø±Ø³Ù‰", - language: "fa", - isRTL: true, - numberFormat: { - pattern: ["n-"], - currency: { - pattern: ["$n-","$ n"], - ".": "/", - symbol: "ريال" - } - }, - calendars: { - standard: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["ژانويه","Ùوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اÙكتبر","نوامبر","دسامبر",""], - namesAbbr: ["ژانويه","Ùوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اÙكتبر","نوامبر","دسامبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - patterns: { - d: "yyyy/MM/dd", - D: "yyyy/MM/dd", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "yyyy/MM/dd hh:mm tt", - F: "yyyy/MM/dd hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fi-FI.js b/pub/lib/globalize/cultures/globalize.culture.fi-FI.js deleted file mode 100644 index ea5c69d6edb66ed5442bfe3e96ae01d9985ae571..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fi-FI.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture fi-FI - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fi-FI", "default", { - name: "fi-FI", - englishName: "Finnish (Finland)", - nativeName: "suomi (Suomi)", - language: "fi", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"], - namesAbbr: ["su","ma","ti","ke","to","pe","la"], - namesShort: ["su","ma","ti","ke","to","pe","la"] - }, - months: { - names: ["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""], - namesAbbr: ["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM'ta 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM'ta 'yyyy H:mm", - F: "d. MMMM'ta 'yyyy H:mm:ss", - M: "d. MMMM'ta'", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fi.js b/pub/lib/globalize/cultures/globalize.culture.fi.js deleted file mode 100644 index 4dbf180ad579cbd6b205b78d83ff05462329dd27..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fi.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture fi - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fi", "default", { - name: "fi", - englishName: "Finnish", - nativeName: "suomi", - language: "fi", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"], - namesAbbr: ["su","ma","ti","ke","to","pe","la"], - namesShort: ["su","ma","ti","ke","to","pe","la"] - }, - months: { - names: ["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""], - namesAbbr: ["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM'ta 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM'ta 'yyyy H:mm", - F: "d. MMMM'ta 'yyyy H:mm:ss", - M: "d. MMMM'ta'", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fil-PH.js b/pub/lib/globalize/cultures/globalize.culture.fil-PH.js deleted file mode 100644 index fbe076ae7a5ea91523356eac379245030bd82c12..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fil-PH.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Globalize Culture fil-PH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fil-PH", "default", { - name: "fil-PH", - englishName: "Filipino (Philippines)", - nativeName: "Filipino (Pilipinas)", - language: "fil", - numberFormat: { - currency: { - symbol: "PhP" - } - }, - calendars: { - standard: { - days: { - names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"], - namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"], - namesShort: ["L","L","M","M","H","B","S"] - }, - months: { - names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""], - namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""] - }, - eras: [{"name":"Anno Domini","start":null,"offset":0}] - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fil.js b/pub/lib/globalize/cultures/globalize.culture.fil.js deleted file mode 100644 index 4f8bf6c67c42ffa3eb7b6781f03f09c69d388555..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fil.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Globalize Culture fil - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fil", "default", { - name: "fil", - englishName: "Filipino", - nativeName: "Filipino", - language: "fil", - numberFormat: { - currency: { - symbol: "PhP" - } - }, - calendars: { - standard: { - days: { - names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"], - namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"], - namesShort: ["L","L","M","M","H","B","S"] - }, - months: { - names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""], - namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""] - }, - eras: [{"name":"Anno Domini","start":null,"offset":0}] - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fo-FO.js b/pub/lib/globalize/cultures/globalize.culture.fo-FO.js deleted file mode 100644 index d399f2b28f04ca5e531bad32a660a62a9f236e47..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fo-FO.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture fo-FO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fo-FO", "default", { - name: "fo-FO", - englishName: "Faroese (Faroe Islands)", - nativeName: "føroyskt (Føroyar)", - language: "fo", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","frÃggjadagur","leygardagur"], - namesAbbr: ["sun","mán","týs","mik","hós","frÃ","leyg"], - namesShort: ["su","má","tý","mi","hó","fr","ley"] - }, - months: { - names: ["januar","februar","mars","aprÃl","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fo.js b/pub/lib/globalize/cultures/globalize.culture.fo.js deleted file mode 100644 index 13e8c5bd30af245f629a4c83682dc4915c2495a6..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fo.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture fo - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fo", "default", { - name: "fo", - englishName: "Faroese", - nativeName: "føroyskt", - language: "fo", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","frÃggjadagur","leygardagur"], - namesAbbr: ["sun","mán","týs","mik","hós","frÃ","leyg"], - namesShort: ["su","má","tý","mi","hó","fr","ley"] - }, - months: { - names: ["januar","februar","mars","aprÃl","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fr-BE.js b/pub/lib/globalize/cultures/globalize.culture.fr-BE.js deleted file mode 100644 index 2bc59957e8ca9cdcd23568ebb7fba53d63511f40..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fr-BE.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture fr-BE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fr-BE", "default", { - name: "fr-BE", - englishName: "French (Belgium)", - nativeName: "français (Belgique)", - language: "fr", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "d/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fr-CA.js b/pub/lib/globalize/cultures/globalize.culture.fr-CA.js deleted file mode 100644 index b4f66b2f4e062f3fdf08c60388141c93d8fafd27..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fr-CA.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture fr-CA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fr-CA", "default", { - name: "fr-CA", - englishName: "French (Canada)", - nativeName: "français (Canada)", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["(n $)","n $"], - ",": " ", - ".": "," - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fr-CH.js b/pub/lib/globalize/cultures/globalize.culture.fr-CH.js deleted file mode 100644 index c482fcd5c075f1f383c5cc82a90319a40a0a8671..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fr-CH.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture fr-CH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fr-CH", "default", { - name: "fr-CH", - englishName: "French (Switzerland)", - nativeName: "français (Suisse)", - language: "fr", - numberFormat: { - ",": "'", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "fr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fr-FR.js b/pub/lib/globalize/cultures/globalize.culture.fr-FR.js deleted file mode 100644 index 4a2a05e1ab03964c2540d954ea43f4030cdf8577..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fr-FR.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture fr-FR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fr-FR", "default", { - name: "fr-FR", - englishName: "French (France)", - nativeName: "français (France)", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fr-LU.js b/pub/lib/globalize/cultures/globalize.culture.fr-LU.js deleted file mode 100644 index 41bd90ac595732361daf2ce6027bf983d94eb32f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fr-LU.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture fr-LU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fr-LU", "default", { - name: "fr-LU", - englishName: "French (Luxembourg)", - nativeName: "français (Luxembourg)", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fr-MC.js b/pub/lib/globalize/cultures/globalize.culture.fr-MC.js deleted file mode 100644 index a73831990f273f19e28b26861cf8cedc0978ea8e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fr-MC.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture fr-MC - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fr-MC", "default", { - name: "fr-MC", - englishName: "French (Monaco)", - nativeName: "français (Principauté de Monaco)", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fr.js b/pub/lib/globalize/cultures/globalize.culture.fr.js deleted file mode 100644 index 3174e5a0859085ffc1936702e5c4bcc8605dccdd..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fr.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture fr - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fr", "default", { - name: "fr", - englishName: "French", - nativeName: "français", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fy-NL.js b/pub/lib/globalize/cultures/globalize.culture.fy-NL.js deleted file mode 100644 index 4e089ce6c4d5ed2f047b7750816fafe633810575..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fy-NL.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture fy-NL - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fy-NL", "default", { - name: "fy-NL", - englishName: "Frisian (Netherlands)", - nativeName: "Frysk (Nederlân)", - language: "fy", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["Snein","Moandei","Tiisdei","Woansdei","Tongersdei","Freed","Sneon"], - namesAbbr: ["Sn","Mo","Ti","Wo","To","Fr","Sn"], - namesShort: ["S","M","T","W","T","F","S"] - }, - months: { - names: ["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber",""], - namesAbbr: ["jann","febr","mrt","apr","maaie","jun","jul","aug","sept","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "d-M-yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.fy.js b/pub/lib/globalize/cultures/globalize.culture.fy.js deleted file mode 100644 index 9ed1934e4f2f2f0b0dd56d762bb91228edc87332..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.fy.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture fy - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "fy", "default", { - name: "fy", - englishName: "Frisian", - nativeName: "Frysk", - language: "fy", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["Snein","Moandei","Tiisdei","Woansdei","Tongersdei","Freed","Sneon"], - namesAbbr: ["Sn","Mo","Ti","Wo","To","Fr","Sn"], - namesShort: ["S","M","T","W","T","F","S"] - }, - months: { - names: ["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber",""], - namesAbbr: ["jann","febr","mrt","apr","maaie","jun","jul","aug","sept","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "d-M-yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ga-IE.js b/pub/lib/globalize/cultures/globalize.culture.ga-IE.js deleted file mode 100644 index b5dffdb25f56f43d19f7a2fe1d6bfbed6d52fe1a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ga-IE.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture ga-IE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ga-IE", "default", { - name: "ga-IE", - englishName: "Irish (Ireland)", - nativeName: "Gaeilge (Éire)", - language: "ga", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"], - namesAbbr: ["Domh","Luan","Máir","Céad","Déar","Aoi","Sath"], - namesShort: ["Do","Lu","Má","Cé","De","Ao","Sa"] - }, - months: { - names: ["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig",""], - namesAbbr: ["Ean","Feabh","Már","Aib","Bealt","Meith","Iúil","Lún","M.Fómh","D.Fómh","Samh","Noll",""] - }, - AM: ["r.n.","r.n.","R.N."], - PM: ["i.n.","i.n.","I.N."], - patterns: { - d: "dd/MM/yyyy", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ga.js b/pub/lib/globalize/cultures/globalize.culture.ga.js deleted file mode 100644 index 526a0300fd680fd7cfa6dea64348e4a4db5ce32e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ga.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture ga - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ga", "default", { - name: "ga", - englishName: "Irish", - nativeName: "Gaeilge", - language: "ga", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"], - namesAbbr: ["Domh","Luan","Máir","Céad","Déar","Aoi","Sath"], - namesShort: ["Do","Lu","Má","Cé","De","Ao","Sa"] - }, - months: { - names: ["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig",""], - namesAbbr: ["Ean","Feabh","Már","Aib","Bealt","Meith","Iúil","Lún","M.Fómh","D.Fómh","Samh","Noll",""] - }, - AM: ["r.n.","r.n.","R.N."], - PM: ["i.n.","i.n.","I.N."], - patterns: { - d: "dd/MM/yyyy", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.gd-GB.js b/pub/lib/globalize/cultures/globalize.culture.gd-GB.js deleted file mode 100644 index f5d3a0ecec15227fb5179d8267c10c2cddaaf531..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.gd-GB.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Globalize Culture gd-GB - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "gd-GB", "default", { - name: "gd-GB", - englishName: "Scottish Gaelic (United Kingdom)", - nativeName: "Gà idhlig (An Rìoghachd Aonaichte)", - language: "gd", - numberFormat: { - negativeInfinity: "-Neo-chrìochnachd", - positiveInfinity: "Neo-chrìochnachd", - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Didòmhnaich","Diluain","Dimà irt","Diciadain","Diardaoin","Dihaoine","Disathairne"], - namesAbbr: ["Dòm","Lua","Mà i","Cia","Ard","Hao","Sat"], - namesShort: ["D","L","M","C","A","H","S"] - }, - months: { - names: ["Am Faoilleach","An Gearran","Am Mà rt","An Giblean","An Cèitean","An t-Ã’gmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dà mhair","An t-Samhain","An Dùbhlachd",""], - namesAbbr: ["Fao","Gea","Mà r","Gib","Cèi","Ã’gm","Iuc","Lùn","Sul","Dà m","Sam","Dùb",""] - }, - AM: ["m","m","M"], - PM: ["f","f","F"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.gd.js b/pub/lib/globalize/cultures/globalize.culture.gd.js deleted file mode 100644 index 11ce2b731ba1e9ed185300f0060f1bc29b7df259..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.gd.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Globalize Culture gd - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "gd", "default", { - name: "gd", - englishName: "Scottish Gaelic", - nativeName: "Gà idhlig", - language: "gd", - numberFormat: { - negativeInfinity: "-Neo-chrìochnachd", - positiveInfinity: "Neo-chrìochnachd", - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Didòmhnaich","Diluain","Dimà irt","Diciadain","Diardaoin","Dihaoine","Disathairne"], - namesAbbr: ["Dòm","Lua","Mà i","Cia","Ard","Hao","Sat"], - namesShort: ["D","L","M","C","A","H","S"] - }, - months: { - names: ["Am Faoilleach","An Gearran","Am Mà rt","An Giblean","An Cèitean","An t-Ã’gmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dà mhair","An t-Samhain","An Dùbhlachd",""], - namesAbbr: ["Fao","Gea","Mà r","Gib","Cèi","Ã’gm","Iuc","Lùn","Sul","Dà m","Sam","Dùb",""] - }, - AM: ["m","m","M"], - PM: ["f","f","F"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.gl-ES.js b/pub/lib/globalize/cultures/globalize.culture.gl-ES.js deleted file mode 100644 index 60d7e451556273b25a5bddd454f9ff0d310dcfad..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.gl-ES.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture gl-ES - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "gl-ES", "default", { - name: "gl-ES", - englishName: "Galician (Galician)", - nativeName: "galego (galego)", - language: "gl", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","luns","martes","mércores","xoves","venres","sábado"], - namesAbbr: ["dom","luns","mar","mér","xov","ven","sáb"], - namesShort: ["do","lu","ma","mé","xo","ve","sá"] - }, - months: { - names: ["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""], - namesAbbr: ["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.gl.js b/pub/lib/globalize/cultures/globalize.culture.gl.js deleted file mode 100644 index 4c7095864d0706a41511f02a10377fec21cc7c31..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.gl.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture gl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "gl", "default", { - name: "gl", - englishName: "Galician", - nativeName: "galego", - language: "gl", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","luns","martes","mércores","xoves","venres","sábado"], - namesAbbr: ["dom","luns","mar","mér","xov","ven","sáb"], - namesShort: ["do","lu","ma","mé","xo","ve","sá"] - }, - months: { - names: ["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""], - namesAbbr: ["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.gsw-FR.js b/pub/lib/globalize/cultures/globalize.culture.gsw-FR.js deleted file mode 100644 index 47450c64be355287051632de9874a7a572fb5cf7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.gsw-FR.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture gsw-FR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "gsw-FR", "default", { - name: "gsw-FR", - englishName: "Alsatian (France)", - nativeName: "Elsässisch (Frà nkrisch)", - language: "gsw", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Ohne Nummer", - negativeInfinity: "-Unendlich", - positiveInfinity: "+Unendlich", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sundà à ","Mondà à ","Dienschdà à ","Mittwuch","Dunnerschdà à ","Fridà à ","Sà mschdà à "], - namesAbbr: ["Su.","Mo.","Di.","Mi.","Du.","Fr.","Sà ."], - namesShort: ["Su","Mo","Di","Mi","Du","Fr","Sà "] - }, - months: { - names: ["Jänner","Feverje","März","Àpril","Mai","Jüni","Jüli","Augscht","September","Oktower","Nowember","Dezember",""], - namesAbbr: ["Jän.","Fev.","März","Apr.","Mai","Jüni","Jüli","Aug.","Sept.","Okt.","Now.","Dez.",""] - }, - AM: null, - PM: null, - eras: [{"name":"Vor J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.gsw.js b/pub/lib/globalize/cultures/globalize.culture.gsw.js deleted file mode 100644 index 6f23fa6902626ad39d96546169ad167cd37ebb58..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.gsw.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture gsw - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "gsw", "default", { - name: "gsw", - englishName: "Alsatian", - nativeName: "Elsässisch", - language: "gsw", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Ohne Nummer", - negativeInfinity: "-Unendlich", - positiveInfinity: "+Unendlich", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sundà à ","Mondà à ","Dienschdà à ","Mittwuch","Dunnerschdà à ","Fridà à ","Sà mschdà à "], - namesAbbr: ["Su.","Mo.","Di.","Mi.","Du.","Fr.","Sà ."], - namesShort: ["Su","Mo","Di","Mi","Du","Fr","Sà "] - }, - months: { - names: ["Jänner","Feverje","März","Àpril","Mai","Jüni","Jüli","Augscht","September","Oktower","Nowember","Dezember",""], - namesAbbr: ["Jän.","Fev.","März","Apr.","Mai","Jüni","Jüli","Aug.","Sept.","Okt.","Now.","Dez.",""] - }, - AM: null, - PM: null, - eras: [{"name":"Vor J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.gu-IN.js b/pub/lib/globalize/cultures/globalize.culture.gu-IN.js deleted file mode 100644 index b30c3c968c6b4ab70c84906dce97235d3a1cd5b1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.gu-IN.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture gu-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "gu-IN", "default", { - name: "gu-IN", - englishName: "Gujarati (India)", - nativeName: "ગà«àªœàª°àª¾àª¤à«€ (àªàª¾àª°àª¤)", - language: "gu", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "રૂ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["રવિવાર","સોમવાર","મંગળવાર","બà«àª§àªµàª¾àª°","ગà«àª°à«àªµàª¾àª°","શà«àª•à«àª°àªµàª¾àª°","શનિવાર"], - namesAbbr: ["રવિ","સોમ","મંગળ","બà«àª§","ગà«àª°à«","શà«àª•à«àª°","શનિ"], - namesShort: ["ર","સ","મ","બ","ગ","શ","શ"] - }, - months: { - names: ["જાનà«àª¯à«àª†àª°à«€","ફેબà«àª°à«àª†àª°à«€","મારà«àªš","àªàªªà«àª°àª¿àª²","મે","જૂન","જà«àª²àª¾àªˆ","ઑગસà«àªŸ","સપà«àªŸà«‡àª®à«àª¬àª°","ઑકà«àªŸà«àª¬àª°","નવેમà«àª¬àª°","ડિસેમà«àª¬àª°",""], - namesAbbr: ["જાનà«àª¯à«","ફેબà«àª°à«","મારà«àªš","àªàªªà«àª°àª¿àª²","મે","જૂન","જà«àª²àª¾àªˆ","ઑગસà«àªŸ","સપà«àªŸà«‡","ઑકà«àªŸà«‹","નવે","ડિસે",""] - }, - AM: ["પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨","પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨","પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨"], - PM: ["ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨","ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨","ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.gu.js b/pub/lib/globalize/cultures/globalize.culture.gu.js deleted file mode 100644 index 783aba07a47b34563313300a58e5a8dcaae38008..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.gu.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture gu - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "gu", "default", { - name: "gu", - englishName: "Gujarati", - nativeName: "ગà«àªœàª°àª¾àª¤à«€", - language: "gu", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "રૂ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["રવિવાર","સોમવાર","મંગળવાર","બà«àª§àªµàª¾àª°","ગà«àª°à«àªµàª¾àª°","શà«àª•à«àª°àªµàª¾àª°","શનિવાર"], - namesAbbr: ["રવિ","સોમ","મંગળ","બà«àª§","ગà«àª°à«","શà«àª•à«àª°","શનિ"], - namesShort: ["ર","સ","મ","બ","ગ","શ","શ"] - }, - months: { - names: ["જાનà«àª¯à«àª†àª°à«€","ફેબà«àª°à«àª†àª°à«€","મારà«àªš","àªàªªà«àª°àª¿àª²","મે","જૂન","જà«àª²àª¾àªˆ","ઑગસà«àªŸ","સપà«àªŸà«‡àª®à«àª¬àª°","ઑકà«àªŸà«àª¬àª°","નવેમà«àª¬àª°","ડિસેમà«àª¬àª°",""], - namesAbbr: ["જાનà«àª¯à«","ફેબà«àª°à«","મારà«àªš","àªàªªà«àª°àª¿àª²","મે","જૂન","જà«àª²àª¾àªˆ","ઑગસà«àªŸ","સપà«àªŸà«‡","ઑકà«àªŸà«‹","નવે","ડિસે",""] - }, - AM: ["પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨","પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨","પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨"], - PM: ["ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨","ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨","ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ha-Latn-NG.js b/pub/lib/globalize/cultures/globalize.culture.ha-Latn-NG.js deleted file mode 100644 index c045adf68c5efcaf04e99f1f3fc7b7616d7c6f6e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ha-Latn-NG.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture ha-Latn-NG - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ha-Latn-NG", "default", { - name: "ha-Latn-NG", - englishName: "Hausa (Latin, Nigeria)", - nativeName: "Hausa (Nigeria)", - language: "ha-Latn", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"], - namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"], - namesShort: ["L","L","T","L","A","J","A"] - }, - months: { - names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""], - namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""] - }, - AM: ["Safe","safe","SAFE"], - PM: ["Yamma","yamma","YAMMA"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ha-Latn.js b/pub/lib/globalize/cultures/globalize.culture.ha-Latn.js deleted file mode 100644 index d7d094dd4babe6d61c49c98ba7f9cbb01f3b6413..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ha-Latn.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture ha-Latn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ha-Latn", "default", { - name: "ha-Latn", - englishName: "Hausa (Latin)", - nativeName: "Hausa", - language: "ha-Latn", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"], - namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"], - namesShort: ["L","L","T","L","A","J","A"] - }, - months: { - names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""], - namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""] - }, - AM: ["Safe","safe","SAFE"], - PM: ["Yamma","yamma","YAMMA"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ha.js b/pub/lib/globalize/cultures/globalize.culture.ha.js deleted file mode 100644 index ef6082f2c9eec922b338ebacab0e7f863d844b63..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ha.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture ha - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ha", "default", { - name: "ha", - englishName: "Hausa", - nativeName: "Hausa", - language: "ha", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"], - namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"], - namesShort: ["L","L","T","L","A","J","A"] - }, - months: { - names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""], - namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""] - }, - AM: ["Safe","safe","SAFE"], - PM: ["Yamma","yamma","YAMMA"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.he-IL.js b/pub/lib/globalize/cultures/globalize.culture.he-IL.js deleted file mode 100644 index 3ae63b184c42c2f6ef775afcf3fabf6c50712e11..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.he-IL.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Globalize Culture he-IL - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "he-IL", "default", { - name: "he-IL", - englishName: "Hebrew (Israel)", - nativeName: "עברית (ישר×ל)", - language: "he", - isRTL: true, - numberFormat: { - "NaN": "×œ× ×ž×¡×¤×¨", - negativeInfinity: "××™× ×¡×•×£Â ×©×œ×™×œ×™", - positiveInfinity: "××™× ×¡×•×£Â ×—×™×•×‘×™", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "₪" - } - }, - calendars: { - standard: { - days: { - names: ["יו× ר×שון","יו×Â ×©× ×™","יו× שלישי","יו× רביעי","יו× חמישי","יו× שישי","שבת"], - namesAbbr: ["יו× ×","יו× ב","יו× ג","יו× ד","יו× ה","יו× ו","שבת"], - namesShort: ["×","ב","×’","ד","×”","ו","ש"] - }, - months: { - names: ["×™× ×•×ר","פברו×ר","מרץ","×פריל","מ××™","×™×•× ×™","יולי","×וגוסט","ספטמבר","×וקטובר","× ×•×‘×ž×‘×¨","דצמבר",""], - namesAbbr: ["×™× ×•","פבר","מרץ","×פר","מ××™","×™×•× ","יול","×וג","ספט","×וק","× ×•×‘","דצמ",""] - }, - eras: [{"name":"לספירה","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd dd MMMM yyyy HH:mm", - F: "dddd dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - }, - Hebrew: { - name: "Hebrew", - "/": " ", - days: { - names: ["יו× ר×שון","יו×Â ×©× ×™","יו× שלישי","יו× רביעי","יו× חמישי","יו× שישי","שבת"], - namesAbbr: ["×","ב","×’","ד","×”","ו","ש"], - namesShort: ["×","ב","×’","ד","×”","ו","ש"] - }, - months: { - names: ["תשרי","חשון","כסלו","טבת","שבט","×דר","×דר ב","× ×™×¡×Ÿ","×ייר","סיון","תמוז","×ב","×לול"], - namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","×דר","×דר ב","× ×™×¡×Ÿ","×ייר","סיון","תמוז","×ב","×לול"] - }, - eras: [{"name":"C.E.","start":null,"offset":0}], - twoDigitYearMax: 5790, - patterns: { - d: "dd MMMM yyyy", - D: "dddd dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd dd MMMM yyyy HH:mm", - F: "dddd dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.he.js b/pub/lib/globalize/cultures/globalize.culture.he.js deleted file mode 100644 index 9f8410812f0897f0fc8ddbc0521bdf355effb4cc..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.he.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Globalize Culture he - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "he", "default", { - name: "he", - englishName: "Hebrew", - nativeName: "עברית", - language: "he", - isRTL: true, - numberFormat: { - "NaN": "×œ× ×ž×¡×¤×¨", - negativeInfinity: "××™× ×¡×•×£Â ×©×œ×™×œ×™", - positiveInfinity: "××™× ×¡×•×£Â ×—×™×•×‘×™", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "₪" - } - }, - calendars: { - standard: { - days: { - names: ["יו× ר×שון","יו×Â ×©× ×™","יו× שלישי","יו× רביעי","יו× חמישי","יו× שישי","שבת"], - namesAbbr: ["יו× ×","יו× ב","יו× ג","יו× ד","יו× ה","יו× ו","שבת"], - namesShort: ["×","ב","×’","ד","×”","ו","ש"] - }, - months: { - names: ["×™× ×•×ר","פברו×ר","מרץ","×פריל","מ××™","×™×•× ×™","יולי","×וגוסט","ספטמבר","×וקטובר","× ×•×‘×ž×‘×¨","דצמבר",""], - namesAbbr: ["×™× ×•","פבר","מרץ","×פר","מ××™","×™×•× ","יול","×וג","ספט","×וק","× ×•×‘","דצמ",""] - }, - eras: [{"name":"לספירה","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd dd MMMM yyyy HH:mm", - F: "dddd dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - }, - Hebrew: { - name: "Hebrew", - "/": " ", - days: { - names: ["יו× ר×שון","יו×Â ×©× ×™","יו× שלישי","יו× רביעי","יו× חמישי","יו× שישי","שבת"], - namesAbbr: ["×","ב","×’","ד","×”","ו","ש"], - namesShort: ["×","ב","×’","ד","×”","ו","ש"] - }, - months: { - names: ["תשרי","חשון","כסלו","טבת","שבט","×דר","×דר ב","× ×™×¡×Ÿ","×ייר","סיון","תמוז","×ב","×לול"], - namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","×דר","×דר ב","× ×™×¡×Ÿ","×ייר","סיון","תמוז","×ב","×לול"] - }, - eras: [{"name":"C.E.","start":null,"offset":0}], - twoDigitYearMax: 5790, - patterns: { - d: "dd MMMM yyyy", - D: "dddd dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd dd MMMM yyyy HH:mm", - F: "dddd dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hi-IN.js b/pub/lib/globalize/cultures/globalize.culture.hi-IN.js deleted file mode 100644 index f944705ceb5caf4b4c496b407429f0ee4f98f6db..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hi-IN.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture hi-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hi-IN", "default", { - name: "hi-IN", - englishName: "Hindi (India)", - nativeName: "हिंदी (à¤à¤¾à¤°à¤¤)", - language: "hi", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["रविवार","सोमवार","मंगलवार","बà¥à¤§à¤µà¤¾à¤°","गà¥à¤°à¥à¤µà¤¾à¤°","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["रवि.","सोम.","मंगल.","बà¥à¤§.","गà¥à¤°à¥.","शà¥à¤•à¥à¤°.","शनि."], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""], - namesAbbr: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""] - }, - AM: ["पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨"], - PM: ["अपराहà¥à¤¨","अपराहà¥à¤¨","अपराहà¥à¤¨"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hi.js b/pub/lib/globalize/cultures/globalize.culture.hi.js deleted file mode 100644 index 3f114471d36c91feb0186bcd9f7fcb8428da86fb..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hi.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture hi - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hi", "default", { - name: "hi", - englishName: "Hindi", - nativeName: "हिंदी", - language: "hi", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["रविवार","सोमवार","मंगलवार","बà¥à¤§à¤µà¤¾à¤°","गà¥à¤°à¥à¤µà¤¾à¤°","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["रवि.","सोम.","मंगल.","बà¥à¤§.","गà¥à¤°à¥.","शà¥à¤•à¥à¤°.","शनि."], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""], - namesAbbr: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""] - }, - AM: ["पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨"], - PM: ["अपराहà¥à¤¨","अपराहà¥à¤¨","अपराहà¥à¤¨"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hr-BA.js b/pub/lib/globalize/cultures/globalize.culture.hr-BA.js deleted file mode 100644 index 4a56d92501fa8a78851a7fcb4acd13a14be60d06..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hr-BA.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture hr-BA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hr-BA", "default", { - name: "hr-BA", - englishName: "Croatian (Latin, Bosnia and Herzegovina)", - nativeName: "hrvatski (Bosna i Hercegovina)", - language: "hr", - numberFormat: { - pattern: ["- n"], - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["sijeÄanj","veljaÄa","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - monthsGenitive: { - names: ["sijeÄnja","veljaÄe","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy.", - D: "d. MMMM yyyy.", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy. H:mm", - F: "d. MMMM yyyy. H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hr-HR.js b/pub/lib/globalize/cultures/globalize.culture.hr-HR.js deleted file mode 100644 index 6a8f5e1ad3db72e99971a5ef707389039fd59fdc..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hr-HR.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture hr-HR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hr-HR", "default", { - name: "hr-HR", - englishName: "Croatian (Croatia)", - nativeName: "hrvatski (Hrvatska)", - language: "hr", - numberFormat: { - pattern: ["- n"], - ",": ".", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kn" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["sijeÄanj","veljaÄa","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - monthsGenitive: { - names: ["sijeÄnja","veljaÄe","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy.", - D: "d. MMMM yyyy.", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy. H:mm", - F: "d. MMMM yyyy. H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hr.js b/pub/lib/globalize/cultures/globalize.culture.hr.js deleted file mode 100644 index 4e8d79907772219f848bba6e26f03c158a89df8f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hr.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture hr - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hr", "default", { - name: "hr", - englishName: "Croatian", - nativeName: "hrvatski", - language: "hr", - numberFormat: { - pattern: ["- n"], - ",": ".", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kn" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["sijeÄanj","veljaÄa","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - monthsGenitive: { - names: ["sijeÄnja","veljaÄe","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy.", - D: "d. MMMM yyyy.", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy. H:mm", - F: "d. MMMM yyyy. H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hsb-DE.js b/pub/lib/globalize/cultures/globalize.culture.hsb-DE.js deleted file mode 100644 index 844e462126219868db46af78a979a0aeb5cf5b74..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hsb-DE.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture hsb-DE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hsb-DE", "default", { - name: "hsb-DE", - englishName: "Upper Sorbian (Germany)", - nativeName: "hornjoserbšćina (NÄ›mska)", - language: "hsb", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "njedefinowane", - negativeInfinity: "-njekónÄne", - positiveInfinity: "+njekónÄne", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["njedźela","póndźela","wutora","srjeda","Å¡twórtk","pjatk","sobota"], - namesAbbr: ["nje","pón","wut","srj","Å¡tw","pja","sob"], - namesShort: ["n","p","w","s","Å¡","p","s"] - }, - months: { - names: ["januar","februar","mÄ›rc","apryl","meja","junij","julij","awgust","september","oktober","nowember","december",""], - namesAbbr: ["jan","feb","mÄ›r","apr","mej","jun","jul","awg","sep","okt","now","dec",""] - }, - monthsGenitive: { - names: ["januara","februara","mÄ›rca","apryla","meje","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""], - namesAbbr: ["jan","feb","mÄ›r","apr","mej","jun","jul","awg","sep","okt","now","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"po Chr.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "dddd, 'dnja' d. MMMM yyyy", - t: "H.mm 'hodź.'", - T: "H:mm:ss", - f: "dddd, 'dnja' d. MMMM yyyy H.mm 'hodź.'", - F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hsb.js b/pub/lib/globalize/cultures/globalize.culture.hsb.js deleted file mode 100644 index 9c0a861e6540cd5c3329ea3e94a56d5d4d7e94d7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hsb.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture hsb - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hsb", "default", { - name: "hsb", - englishName: "Upper Sorbian", - nativeName: "hornjoserbšćina", - language: "hsb", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "njedefinowane", - negativeInfinity: "-njekónÄne", - positiveInfinity: "+njekónÄne", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["njedźela","póndźela","wutora","srjeda","Å¡twórtk","pjatk","sobota"], - namesAbbr: ["nje","pón","wut","srj","Å¡tw","pja","sob"], - namesShort: ["n","p","w","s","Å¡","p","s"] - }, - months: { - names: ["januar","februar","mÄ›rc","apryl","meja","junij","julij","awgust","september","oktober","nowember","december",""], - namesAbbr: ["jan","feb","mÄ›r","apr","mej","jun","jul","awg","sep","okt","now","dec",""] - }, - monthsGenitive: { - names: ["januara","februara","mÄ›rca","apryla","meje","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""], - namesAbbr: ["jan","feb","mÄ›r","apr","mej","jun","jul","awg","sep","okt","now","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"po Chr.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "dddd, 'dnja' d. MMMM yyyy", - t: "H.mm 'hodź.'", - T: "H:mm:ss", - f: "dddd, 'dnja' d. MMMM yyyy H.mm 'hodź.'", - F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hu-HU.js b/pub/lib/globalize/cultures/globalize.culture.hu-HU.js deleted file mode 100644 index c709f9f3f06fbee82f18129951b92c1021a2735a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hu-HU.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture hu-HU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hu-HU", "default", { - name: "hu-HU", - englishName: "Hungarian (Hungary)", - nativeName: "magyar (Magyarország)", - language: "hu", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "nem szám", - negativeInfinity: "negatÃv végtelen", - positiveInfinity: "végtelen", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ft" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["vasárnap","hétfÅ‘","kedd","szerda","csütörtök","péntek","szombat"], - namesAbbr: ["V","H","K","Sze","Cs","P","Szo"], - namesShort: ["V","H","K","Sze","Cs","P","Szo"] - }, - months: { - names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""], - namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""] - }, - AM: ["de.","de.","DE."], - PM: ["du.","du.","DU."], - eras: [{"name":"i.sz.","start":null,"offset":0}], - patterns: { - d: "yyyy.MM.dd.", - D: "yyyy. MMMM d.", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy. MMMM d. H:mm", - F: "yyyy. MMMM d. H:mm:ss", - M: "MMMM d.", - Y: "yyyy. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hu.js b/pub/lib/globalize/cultures/globalize.culture.hu.js deleted file mode 100644 index 81c81884c134e9d383165c0316ff8d5a3b8feb8d..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hu.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture hu - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hu", "default", { - name: "hu", - englishName: "Hungarian", - nativeName: "magyar", - language: "hu", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "nem szám", - negativeInfinity: "negatÃv végtelen", - positiveInfinity: "végtelen", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ft" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["vasárnap","hétfÅ‘","kedd","szerda","csütörtök","péntek","szombat"], - namesAbbr: ["V","H","K","Sze","Cs","P","Szo"], - namesShort: ["V","H","K","Sze","Cs","P","Szo"] - }, - months: { - names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""], - namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""] - }, - AM: ["de.","de.","DE."], - PM: ["du.","du.","DU."], - eras: [{"name":"i.sz.","start":null,"offset":0}], - patterns: { - d: "yyyy.MM.dd.", - D: "yyyy. MMMM d.", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy. MMMM d. H:mm", - F: "yyyy. MMMM d. H:mm:ss", - M: "MMMM d.", - Y: "yyyy. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hy-AM.js b/pub/lib/globalize/cultures/globalize.culture.hy-AM.js deleted file mode 100644 index df4b6326e0ea3388ab31418881921643f61d4083..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hy-AM.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture hy-AM - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hy-AM", "default", { - name: "hy-AM", - englishName: "Armenian (Armenia)", - nativeName: "Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ€Õ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)", - language: "hy", - numberFormat: { - currency: { - pattern: ["-n $","n $"], - symbol: "Õ¤Ö€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Ô¿Õ«Ö€Õ¡Õ¯Õ«","ÔµÖ€Õ¯Õ¸Ö‚Õ·Õ¡Õ¢Õ©Õ«","ÔµÖ€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«","Õ‰Õ¸Ö€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«","Õ€Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«","ÕˆÕ’Ö€Õ¢Õ¡Õ©","Õ‡Õ¡Õ¢Õ¡Õ©"], - namesAbbr: ["Ô¿Õ«Ö€","ÔµÖ€Õ¯","ÔµÖ€Ö„","Õ‰Ö€Ö„","Õ€Õ¶Õ£","ÕˆÕ’Ö€","Õ‡Õ¢Õ©"], - namesShort: ["Ô¿","Ôµ","Ôµ","Õ‰","Õ€","Õˆ","Õ‡"] - }, - months: { - names: ["Õ€Õ¸Ö‚Õ¶Õ¾Õ¡Ö€","Õ“Õ¥Õ¿Ö€Õ¾Õ¡Ö€","Õ„Õ¡Ö€Õ¿","Ô±ÕºÖ€Õ«Õ¬","Õ„Õ¡ÕµÕ«Õ½","Õ€Õ¸Ö‚Õ¶Õ«Õ½","Õ€Õ¸Ö‚Õ¬Õ«Õ½","Õ•Õ£Õ¸Õ½Õ¿Õ¸Õ½","ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö€","Õ€Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€","Õ†Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö€","Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€",""], - namesAbbr: ["Õ€Õ†ÕŽ","Õ“ÕÕŽ","Õ„ÕÕ","Ô±ÕŠÕ","Õ„Õ…Õ","Õ€Õ†Õ","Õ€Ô¼Õ","Õ•Ô³Õ","ÕÔµÕŠ","Õ€ÕˆÔ¿","Õ†ÕˆÕ…","Ô´ÔµÔ¿",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM, yyyy H:mm", - F: "d MMMM, yyyy H:mm:ss", - M: "d MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.hy.js b/pub/lib/globalize/cultures/globalize.culture.hy.js deleted file mode 100644 index a419b5ea17215e70c59ce7845908eae6146a1c42..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.hy.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture hy - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "hy", "default", { - name: "hy", - englishName: "Armenian", - nativeName: "Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶", - language: "hy", - numberFormat: { - currency: { - pattern: ["-n $","n $"], - symbol: "Õ¤Ö€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Ô¿Õ«Ö€Õ¡Õ¯Õ«","ÔµÖ€Õ¯Õ¸Ö‚Õ·Õ¡Õ¢Õ©Õ«","ÔµÖ€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«","Õ‰Õ¸Ö€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«","Õ€Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«","ÕˆÕ’Ö€Õ¢Õ¡Õ©","Õ‡Õ¡Õ¢Õ¡Õ©"], - namesAbbr: ["Ô¿Õ«Ö€","ÔµÖ€Õ¯","ÔµÖ€Ö„","Õ‰Ö€Ö„","Õ€Õ¶Õ£","ÕˆÕ’Ö€","Õ‡Õ¢Õ©"], - namesShort: ["Ô¿","Ôµ","Ôµ","Õ‰","Õ€","Õˆ","Õ‡"] - }, - months: { - names: ["Õ€Õ¸Ö‚Õ¶Õ¾Õ¡Ö€","Õ“Õ¥Õ¿Ö€Õ¾Õ¡Ö€","Õ„Õ¡Ö€Õ¿","Ô±ÕºÖ€Õ«Õ¬","Õ„Õ¡ÕµÕ«Õ½","Õ€Õ¸Ö‚Õ¶Õ«Õ½","Õ€Õ¸Ö‚Õ¬Õ«Õ½","Õ•Õ£Õ¸Õ½Õ¿Õ¸Õ½","ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö€","Õ€Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€","Õ†Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö€","Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€",""], - namesAbbr: ["Õ€Õ†ÕŽ","Õ“ÕÕŽ","Õ„ÕÕ","Ô±ÕŠÕ","Õ„Õ…Õ","Õ€Õ†Õ","Õ€Ô¼Õ","Õ•Ô³Õ","ÕÔµÕŠ","Õ€ÕˆÔ¿","Õ†ÕˆÕ…","Ô´ÔµÔ¿",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM, yyyy H:mm", - F: "d MMMM, yyyy H:mm:ss", - M: "d MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.id-ID.js b/pub/lib/globalize/cultures/globalize.culture.id-ID.js deleted file mode 100644 index cfad59ef655c596402aad48b4a5d72622b719136..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.id-ID.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Globalize Culture id-ID - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "id-ID", "default", { - name: "id-ID", - englishName: "Indonesian (Indonesia)", - nativeName: "Bahasa Indonesia (Indonesia)", - language: "id", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - decimals: 0, - ",": ".", - ".": ",", - symbol: "Rp" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"], - namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"], - namesShort: ["M","S","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""], - namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.id.js b/pub/lib/globalize/cultures/globalize.culture.id.js deleted file mode 100644 index ca4a5e013300979f9a933ce3ccb2d033bd9b7f7e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.id.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Globalize Culture id - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "id", "default", { - name: "id", - englishName: "Indonesian", - nativeName: "Bahasa Indonesia", - language: "id", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - decimals: 0, - ",": ".", - ".": ",", - symbol: "Rp" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"], - namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"], - namesShort: ["M","S","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""], - namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ig-NG.js b/pub/lib/globalize/cultures/globalize.culture.ig-NG.js deleted file mode 100644 index 38d57a116ba4b2f11490042a17ed52266fbad3d7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ig-NG.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture ig-NG - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ig-NG", "default", { - name: "ig-NG", - englishName: "Igbo (Nigeria)", - nativeName: "Igbo (Nigeria)", - language: "ig", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"], - namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"], - namesShort: ["A","A","I","O","O","E","A"] - }, - months: { - names: ["Onwa mbu","Onwa ibua","Onwa ato","Onwa ano","Onwa ise","Onwa isi","Onwa asa","Onwa asato","Onwa itolu","Onwa iri","Onwa iri n'ofu","Onwa iri n'ibua",""], - namesAbbr: ["mbu.","ibu.","ato.","ano.","ise","isi","asa","asa.","ito.","iri.","n'of.","n'ib.",""] - }, - AM: ["Ututu","ututu","UTUTU"], - PM: ["Efifie","efifie","EFIFIE"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ig.js b/pub/lib/globalize/cultures/globalize.culture.ig.js deleted file mode 100644 index eb66b0df79fedf33a55076984efe0247f5da3ba6..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ig.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture ig - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ig", "default", { - name: "ig", - englishName: "Igbo", - nativeName: "Igbo", - language: "ig", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"], - namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"], - namesShort: ["A","A","I","O","O","E","A"] - }, - months: { - names: ["Onwa mbu","Onwa ibua","Onwa ato","Onwa ano","Onwa ise","Onwa isi","Onwa asa","Onwa asato","Onwa itolu","Onwa iri","Onwa iri n'ofu","Onwa iri n'ibua",""], - namesAbbr: ["mbu.","ibu.","ato.","ano.","ise","isi","asa","asa.","ito.","iri.","n'of.","n'ib.",""] - }, - AM: ["Ututu","ututu","UTUTU"], - PM: ["Efifie","efifie","EFIFIE"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ii-CN.js b/pub/lib/globalize/cultures/globalize.culture.ii-CN.js deleted file mode 100644 index e1a2b95609a3f4ecb9c1d6f1163e5f08afb3ad5e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ii-CN.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture ii-CN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ii-CN", "default", { - name: "ii-CN", - englishName: "Yi (PRC)", - nativeName: "ê†ˆêŒ ê±ê‚· (êꉸê“ꂱê‡ê‰¼ê‡©)", - language: "ii", - numberFormat: { - groupSizes: [3,0], - "NaN": "ꌗꂷꀋꉬ", - negativeInfinity: "ꀄêŠêŒê€‹ê‰†", - positiveInfinity: "ꈤê‡ê‘–ꀋꉬ", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["ê‘ê†ê‘","ê†êŠ‚ê’”","ê†êŠ‚ê‘","ê†êŠ‚êŒ•","ê†êŠ‚ê‡–","ê†êŠ‚ê‰¬","ê†êŠ‚êƒ˜"], - namesAbbr: ["ê‘ê†","ê†ê’”","ê†ê‘","ê†êŒ•","ê†ê‡–","ê†ê‰¬","ê†êƒ˜"], - namesShort: ["ê†","ê’”","ê‘","ꌕ","ꇖ","ꉬ","ꃘ"] - }, - months: { - names: ["ê‹ê†ª","ê‘ꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","êƒê†ª","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""], - namesAbbr: ["ê‹ê†ª","ê‘ꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","êƒê†ª","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""] - }, - AM: ["ꂵꆪꈌêˆ","ꂵꆪꈌêˆ","ꂵꆪꈌêˆ"], - PM: ["ꂵꆪꈌꉈ","ꂵꆪꈌꉈ","ꂵꆪꈌꉈ"], - eras: [{"name":"ꇬꑼ","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'ꈎ' M'ꆪ' d'ê‘'", - t: "tt h:mm", - T: "H:mm:ss", - f: "yyyy'ꈎ' M'ꆪ' d'ê‘' tt h:mm", - F: "yyyy'ꈎ' M'ꆪ' d'ê‘' H:mm:ss", - M: "M'ꆪ' d'ê‘'", - Y: "yyyy'ꈎ' M'ꆪ'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ii.js b/pub/lib/globalize/cultures/globalize.culture.ii.js deleted file mode 100644 index 118475d28da506d8da74e5a07b01b8d30b99c2f1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ii.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture ii - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ii", "default", { - name: "ii", - englishName: "Yi", - nativeName: "ê†ˆêŒ ê±ê‚·", - language: "ii", - numberFormat: { - groupSizes: [3,0], - "NaN": "ꌗꂷꀋꉬ", - negativeInfinity: "ꀄêŠêŒê€‹ê‰†", - positiveInfinity: "ꈤê‡ê‘–ꀋꉬ", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["ê‘ê†ê‘","ê†êŠ‚ê’”","ê†êŠ‚ê‘","ê†êŠ‚êŒ•","ê†êŠ‚ê‡–","ê†êŠ‚ê‰¬","ê†êŠ‚êƒ˜"], - namesAbbr: ["ê‘ê†","ê†ê’”","ê†ê‘","ê†êŒ•","ê†ê‡–","ê†ê‰¬","ê†êƒ˜"], - namesShort: ["ê†","ê’”","ê‘","ꌕ","ꇖ","ꉬ","ꃘ"] - }, - months: { - names: ["ê‹ê†ª","ê‘ꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","êƒê†ª","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""], - namesAbbr: ["ê‹ê†ª","ê‘ꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","êƒê†ª","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""] - }, - AM: ["ꂵꆪꈌêˆ","ꂵꆪꈌêˆ","ꂵꆪꈌêˆ"], - PM: ["ꂵꆪꈌꉈ","ꂵꆪꈌꉈ","ꂵꆪꈌꉈ"], - eras: [{"name":"ꇬꑼ","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'ꈎ' M'ꆪ' d'ê‘'", - t: "tt h:mm", - T: "H:mm:ss", - f: "yyyy'ꈎ' M'ꆪ' d'ê‘' tt h:mm", - F: "yyyy'ꈎ' M'ꆪ' d'ê‘' H:mm:ss", - M: "M'ꆪ' d'ê‘'", - Y: "yyyy'ꈎ' M'ꆪ'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.is-IS.js b/pub/lib/globalize/cultures/globalize.culture.is-IS.js deleted file mode 100644 index 79d7b38edc81deb51151c0379ac142cf88abf012..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.is-IS.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture is-IS - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "is-IS", "default", { - name: "is-IS", - englishName: "Icelandic (Iceland)", - nativeName: "Ãslenska (Ãsland)", - language: "is", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"], - namesAbbr: ["sun.","mán.","þri.","mið.","fim.","fös.","lau."], - namesShort: ["su","má","þr","mi","fi","fö","la"] - }, - months: { - names: ["janúar","febrúar","mars","aprÃl","maÃ","júnÃ","júlÃ","ágúst","september","október","nóvember","desember",""], - namesAbbr: ["jan.","feb.","mar.","apr.","maÃ","jún.","júl.","ágú.","sep.","okt.","nóv.","des.",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.is.js b/pub/lib/globalize/cultures/globalize.culture.is.js deleted file mode 100644 index b85d71a2cf7c22719e3a785e1edb0133d22730b4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.is.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture is - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "is", "default", { - name: "is", - englishName: "Icelandic", - nativeName: "Ãslenska", - language: "is", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"], - namesAbbr: ["sun.","mán.","þri.","mið.","fim.","fös.","lau."], - namesShort: ["su","má","þr","mi","fi","fö","la"] - }, - months: { - names: ["janúar","febrúar","mars","aprÃl","maÃ","júnÃ","júlÃ","ágúst","september","október","nóvember","desember",""], - namesAbbr: ["jan.","feb.","mar.","apr.","maÃ","jún.","júl.","ágú.","sep.","okt.","nóv.","des.",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.it-CH.js b/pub/lib/globalize/cultures/globalize.culture.it-CH.js deleted file mode 100644 index 2fafce70add523eeeffa3ab8e9864d246b9d4c6f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.it-CH.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture it-CH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "it-CH", "default", { - name: "it-CH", - englishName: "Italian (Switzerland)", - nativeName: "italiano (Svizzera)", - language: "it", - numberFormat: { - ",": "'", - "NaN": "Non un numero reale", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "fr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"], - namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"], - namesShort: ["do","lu","ma","me","gi","ve","sa"] - }, - months: { - names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""], - namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.it-IT.js b/pub/lib/globalize/cultures/globalize.culture.it-IT.js deleted file mode 100644 index 09689b2f76d60c97bfb7f16f06ed1e8b8b3973ef..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.it-IT.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture it-IT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "it-IT", "default", { - name: "it-IT", - englishName: "Italian (Italy)", - nativeName: "italiano (Italia)", - language: "it", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "Non un numero reale", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"], - namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"], - namesShort: ["do","lu","ma","me","gi","ve","sa"] - }, - months: { - names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""], - namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.it.js b/pub/lib/globalize/cultures/globalize.culture.it.js deleted file mode 100644 index 07295da3cbfbd9c21417e1da40e4f32a1f4d97c0..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.it.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture it - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "it", "default", { - name: "it", - englishName: "Italian", - nativeName: "italiano", - language: "it", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "Non un numero reale", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"], - namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"], - namesShort: ["do","lu","ma","me","gi","ve","sa"] - }, - months: { - names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""], - namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.iu-Cans-CA.js b/pub/lib/globalize/cultures/globalize.culture.iu-Cans-CA.js deleted file mode 100644 index 8e22219b6c4d36272afc55d04773b18bf2822c0c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.iu-Cans-CA.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Globalize Culture iu-Cans-CA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "iu-Cans-CA", "default", { - name: "iu-Cans-CA", - englishName: "Inuktitut (Syllabics, Canada)", - nativeName: "áƒá“„ᒃᑎá‘ᑦ (ᑲᓇᑕᒥ)", - language: "iu-Cans", - numberFormat: { - groupSizes: [3,0], - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["ᓈᑦá‘á–‘á”","ᓇᒡá’ᔾá”á…","áŠáƒá‘‰á±á–…","á±á–“ᑦᓯᖅ","ᓯᑕᒻᒥᖅ","ᑕᓪᓕá•ᒥᖅ","ᓯᕙᑖá•á••á’ƒ"], - namesAbbr: ["ᓈᑦá‘","ᓇᒡá’","áŠáƒá‘‰á±","á±á–“ᑦᓯ","ᓯᑕ","ᑕᓪᓕ","ᓯᕙᑖá•á••á’ƒ"], - namesShort: ["ᓈ","ᓇ","áŠ","á±","ᓯ","á‘•","ᓯ"] - }, - months: { - names: ["á”®á“á“„áŠá•†","á•–á•á•—áŠá•†","ᒫᑦᓯ","á„á³á•†","á’ªáƒ","ᔫᓂ","ᔪᓚáƒ","á‹á’¡á’Œá“¯","ᓯᑎá±á•†","á…á‘á±á•†","á“„á••á±á•†","ᑎᓯá±á•†",""], - namesAbbr: ["á”®á“á“„","á•–á•á•—","ᒫᑦᓯ","á„á³á•†","á’ªáƒ","ᔫᓂ","ᔪᓚáƒ","á‹á’¡á’Œ","ᓯᑎá±","á…á‘á±","á“„á••á±","ᑎᓯá±",""] - }, - patterns: { - d: "d/M/yyyy", - D: "dddd,MMMM dd,yyyy", - f: "dddd,MMMM dd,yyyy h:mm tt", - F: "dddd,MMMM dd,yyyy h:mm:ss tt", - Y: "MMMM,yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.iu-Cans.js b/pub/lib/globalize/cultures/globalize.culture.iu-Cans.js deleted file mode 100644 index 412c6d54adcd7721630457b83606f41fabdde0c4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.iu-Cans.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Globalize Culture iu-Cans - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "iu-Cans", "default", { - name: "iu-Cans", - englishName: "Inuktitut (Syllabics)", - nativeName: "áƒá“„ᒃᑎá‘ᑦ", - language: "iu-Cans", - numberFormat: { - groupSizes: [3,0], - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["ᓈᑦá‘á–‘á”","ᓇᒡá’ᔾá”á…","áŠáƒá‘‰á±á–…","á±á–“ᑦᓯᖅ","ᓯᑕᒻᒥᖅ","ᑕᓪᓕá•ᒥᖅ","ᓯᕙᑖá•á••á’ƒ"], - namesAbbr: ["ᓈᑦá‘","ᓇᒡá’","áŠáƒá‘‰á±","á±á–“ᑦᓯ","ᓯᑕ","ᑕᓪᓕ","ᓯᕙᑖá•á••á’ƒ"], - namesShort: ["ᓈ","ᓇ","áŠ","á±","ᓯ","á‘•","ᓯ"] - }, - months: { - names: ["á”®á“á“„áŠá•†","á•–á•á•—áŠá•†","ᒫᑦᓯ","á„á³á•†","á’ªáƒ","ᔫᓂ","ᔪᓚáƒ","á‹á’¡á’Œá“¯","ᓯᑎá±á•†","á…á‘á±á•†","á“„á••á±á•†","ᑎᓯá±á•†",""], - namesAbbr: ["á”®á“á“„","á•–á•á•—","ᒫᑦᓯ","á„á³á•†","á’ªáƒ","ᔫᓂ","ᔪᓚáƒ","á‹á’¡á’Œ","ᓯᑎá±","á…á‘á±","á“„á••á±","ᑎᓯá±",""] - }, - patterns: { - d: "d/M/yyyy", - D: "dddd,MMMM dd,yyyy", - f: "dddd,MMMM dd,yyyy h:mm tt", - F: "dddd,MMMM dd,yyyy h:mm:ss tt", - Y: "MMMM,yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.iu-Latn-CA.js b/pub/lib/globalize/cultures/globalize.culture.iu-Latn-CA.js deleted file mode 100644 index 9fe0b1802b5eff92cc1e0a9457f655e519f7168f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.iu-Latn-CA.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture iu-Latn-CA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "iu-Latn-CA", "default", { - name: "iu-Latn-CA", - englishName: "Inuktitut (Latin, Canada)", - nativeName: "Inuktitut (Kanatami)", - language: "iu-Latn", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"], - namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"], - namesShort: ["N","N","A","P","S","T","S"] - }, - months: { - names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""], - namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""] - }, - patterns: { - d: "d/MM/yyyy", - D: "ddd, MMMM dd,yyyy", - f: "ddd, MMMM dd,yyyy h:mm tt", - F: "ddd, MMMM dd,yyyy h:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.iu-Latn.js b/pub/lib/globalize/cultures/globalize.culture.iu-Latn.js deleted file mode 100644 index 0b9d5644e4d1b3359e21a6eedda54752a2e3007b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.iu-Latn.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture iu-Latn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "iu-Latn", "default", { - name: "iu-Latn", - englishName: "Inuktitut (Latin)", - nativeName: "Inuktitut", - language: "iu-Latn", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"], - namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"], - namesShort: ["N","N","A","P","S","T","S"] - }, - months: { - names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""], - namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""] - }, - patterns: { - d: "d/MM/yyyy", - D: "ddd, MMMM dd,yyyy", - f: "ddd, MMMM dd,yyyy h:mm tt", - F: "ddd, MMMM dd,yyyy h:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.iu.js b/pub/lib/globalize/cultures/globalize.culture.iu.js deleted file mode 100644 index fce460de0d5950f98ed7bc405c203a957694df0b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.iu.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture iu - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "iu", "default", { - name: "iu", - englishName: "Inuktitut", - nativeName: "Inuktitut", - language: "iu", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"], - namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"], - namesShort: ["N","N","A","P","S","T","S"] - }, - months: { - names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""], - namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""] - }, - patterns: { - d: "d/MM/yyyy", - D: "ddd, MMMM dd,yyyy", - f: "ddd, MMMM dd,yyyy h:mm tt", - F: "ddd, MMMM dd,yyyy h:mm:ss tt" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ja-JP.js b/pub/lib/globalize/cultures/globalize.culture.ja-JP.js deleted file mode 100644 index 004dca2ca908d75e2751985462a1d6094908e6c3..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ja-JP.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Globalize Culture ja-JP - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ja-JP", "default", { - name: "ja-JP", - englishName: "Japanese (Japan)", - nativeName: "日本語 (日本)", - language: "ja", - numberFormat: { - "NaN": "NaN (éžæ•°å€¤)", - negativeInfinity: "-∞", - positiveInfinity: "+∞", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["-$n","$n"], - decimals: 0, - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["日曜日","月曜日","ç«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"], - namesAbbr: ["æ—¥","月","ç«","æ°´","木","金","土"], - namesShort: ["æ—¥","月","ç«","æ°´","木","金","土"] - }, - months: { - names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["åˆå‰","åˆå‰","åˆå‰"], - PM: ["åˆå¾Œ","åˆå¾Œ","åˆå¾Œ"], - eras: [{"name":"西暦","start":null,"offset":0}], - patterns: { - d: "yyyy/MM/dd", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - }, - Japanese: { - name: "Japanese", - days: { - names: ["日曜日","月曜日","ç«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"], - namesAbbr: ["æ—¥","月","ç«","æ°´","木","金","土"], - namesShort: ["æ—¥","月","ç«","æ°´","木","金","土"] - }, - months: { - names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["åˆå‰","åˆå‰","åˆå‰"], - PM: ["åˆå¾Œ","åˆå¾Œ","åˆå¾Œ"], - eras: [{"name":"å¹³æˆ","start":null,"offset":1867},{"name":"æ˜å’Œ","start":-1812153600000,"offset":1911},{"name":"大æ£","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}], - twoDigitYearMax: 99, - patterns: { - d: "gg y/M/d", - D: "gg y'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "gg y'å¹´'M'月'd'æ—¥' H:mm", - F: "gg y'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "gg y'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ja.js b/pub/lib/globalize/cultures/globalize.culture.ja.js deleted file mode 100644 index 1ef62f34fed79fe7ef8e8b03a52bc8df0843a10e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ja.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Globalize Culture ja - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ja", "default", { - name: "ja", - englishName: "Japanese", - nativeName: "日本語", - language: "ja", - numberFormat: { - "NaN": "NaN (éžæ•°å€¤)", - negativeInfinity: "-∞", - positiveInfinity: "+∞", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["-$n","$n"], - decimals: 0, - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["日曜日","月曜日","ç«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"], - namesAbbr: ["æ—¥","月","ç«","æ°´","木","金","土"], - namesShort: ["æ—¥","月","ç«","æ°´","木","金","土"] - }, - months: { - names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["åˆå‰","åˆå‰","åˆå‰"], - PM: ["åˆå¾Œ","åˆå¾Œ","åˆå¾Œ"], - eras: [{"name":"西暦","start":null,"offset":0}], - patterns: { - d: "yyyy/MM/dd", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - }, - Japanese: { - name: "Japanese", - days: { - names: ["日曜日","月曜日","ç«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"], - namesAbbr: ["æ—¥","月","ç«","æ°´","木","金","土"], - namesShort: ["æ—¥","月","ç«","æ°´","木","金","土"] - }, - months: { - names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["åˆå‰","åˆå‰","åˆå‰"], - PM: ["åˆå¾Œ","åˆå¾Œ","åˆå¾Œ"], - eras: [{"name":"å¹³æˆ","start":null,"offset":1867},{"name":"æ˜å’Œ","start":-1812153600000,"offset":1911},{"name":"大æ£","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}], - twoDigitYearMax: 99, - patterns: { - d: "gg y/M/d", - D: "gg y'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "gg y'å¹´'M'月'd'æ—¥' H:mm", - F: "gg y'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "gg y'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ka-GE.js b/pub/lib/globalize/cultures/globalize.culture.ka-GE.js deleted file mode 100644 index 6df1f6abbe64f9bd5f189c54406e8f7490b3a83f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ka-GE.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture ka-GE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ka-GE", "default", { - name: "ka-GE", - englishName: "Georgian (Georgia)", - nativeName: "ქáƒáƒ თული (სáƒáƒ¥áƒáƒ თველáƒ)", - language: "ka", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Lari" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["კვირáƒ","áƒáƒ შáƒáƒ‘áƒáƒ—ი","სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი","áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი","ხუთშáƒáƒ‘áƒáƒ—ი","პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი","შáƒáƒ‘áƒáƒ—ი"], - namesAbbr: ["კვირáƒ","áƒáƒ შáƒáƒ‘áƒáƒ—ი","სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი","áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი","ხუთშáƒáƒ‘áƒáƒ—ი","პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი","შáƒáƒ‘áƒáƒ—ი"], - namesShort: ["კ","áƒ","ს","áƒ","ხ","პ","შ"] - }, - months: { - names: ["იáƒáƒœáƒ•áƒáƒ ი","თებერვáƒáƒšáƒ˜","მáƒáƒ ტი","áƒáƒžáƒ ილი","მáƒáƒ˜áƒ¡áƒ˜","ივნისი","ივლისი","áƒáƒ’ვისტáƒ","სექტემბერი","áƒáƒ¥áƒ¢áƒáƒ›áƒ‘ერი","ნáƒáƒ”მბერი","დეკემბერი",""], - namesAbbr: ["იáƒáƒœ","თებ","მáƒáƒ ","áƒáƒžáƒ ","მáƒáƒ˜áƒ¡","ივნ","ივლ","áƒáƒ’ვ","სექ","áƒáƒ¥áƒ¢","ნáƒáƒ”მ","დეკ",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "yyyy 'წლის' dd MM, dddd", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'წლის' dd MM, dddd H:mm", - F: "yyyy 'წლის' dd MM, dddd H:mm:ss", - M: "dd MM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ka.js b/pub/lib/globalize/cultures/globalize.culture.ka.js deleted file mode 100644 index ebf16c5990a3eae830db8ee17d4053104c046082..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ka.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture ka - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ka", "default", { - name: "ka", - englishName: "Georgian", - nativeName: "ქáƒáƒ თული", - language: "ka", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Lari" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["კვირáƒ","áƒáƒ შáƒáƒ‘áƒáƒ—ი","სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი","áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი","ხუთშáƒáƒ‘áƒáƒ—ი","პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი","შáƒáƒ‘áƒáƒ—ი"], - namesAbbr: ["კვირáƒ","áƒáƒ შáƒáƒ‘áƒáƒ—ი","სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი","áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი","ხუთშáƒáƒ‘áƒáƒ—ი","პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი","შáƒáƒ‘áƒáƒ—ი"], - namesShort: ["კ","áƒ","ს","áƒ","ხ","პ","შ"] - }, - months: { - names: ["იáƒáƒœáƒ•áƒáƒ ი","თებერვáƒáƒšáƒ˜","მáƒáƒ ტი","áƒáƒžáƒ ილი","მáƒáƒ˜áƒ¡áƒ˜","ივნისი","ივლისი","áƒáƒ’ვისტáƒ","სექტემბერი","áƒáƒ¥áƒ¢áƒáƒ›áƒ‘ერი","ნáƒáƒ”მბერი","დეკემბერი",""], - namesAbbr: ["იáƒáƒœ","თებ","მáƒáƒ ","áƒáƒžáƒ ","მáƒáƒ˜áƒ¡","ივნ","ივლ","áƒáƒ’ვ","სექ","áƒáƒ¥áƒ¢","ნáƒáƒ”მ","დეკ",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "yyyy 'წლის' dd MM, dddd", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'წლის' dd MM, dddd H:mm", - F: "yyyy 'წლის' dd MM, dddd H:mm:ss", - M: "dd MM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.kk-KZ.js b/pub/lib/globalize/cultures/globalize.culture.kk-KZ.js deleted file mode 100644 index 160d8cfee716a2a6f6ea49bf5eaf0eb8fb12b408..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.kk-KZ.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture kk-KZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "kk-KZ", "default", { - name: "kk-KZ", - englishName: "Kazakh (Kazakhstan)", - nativeName: "Қазақ (ҚазақÑтан)", - language: "kk", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-$n","$n"], - ",": " ", - ".": "-", - symbol: "Т" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ЖекÑенбі","ДүйÑенбі","СейÑенбі","СәрÑенбі","БейÑенбі","Жұма","Сенбі"], - namesAbbr: ["Жк","ДÑ","СÑ","Ср","БÑ","Жм","Сн"], - namesShort: ["Жк","ДÑ","СÑ","Ср","БÑ","Жм","Сн"] - }, - months: { - names: ["қаңтар","ақпан","наурыз","Ñәуір","мамыр","мауÑым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқÑан",""], - namesAbbr: ["Қаң","Ðқп","Ðау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy 'ж.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'ж.' H:mm", - F: "d MMMM yyyy 'ж.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.kk.js b/pub/lib/globalize/cultures/globalize.culture.kk.js deleted file mode 100644 index c20f52bc8ae660c583d05b51633cbdb81ff41f0f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.kk.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture kk - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "kk", "default", { - name: "kk", - englishName: "Kazakh", - nativeName: "Қазақ", - language: "kk", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-$n","$n"], - ",": " ", - ".": "-", - symbol: "Т" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ЖекÑенбі","ДүйÑенбі","СейÑенбі","СәрÑенбі","БейÑенбі","Жұма","Сенбі"], - namesAbbr: ["Жк","ДÑ","СÑ","Ср","БÑ","Жм","Сн"], - namesShort: ["Жк","ДÑ","СÑ","Ср","БÑ","Жм","Сн"] - }, - months: { - names: ["қаңтар","ақпан","наурыз","Ñәуір","мамыр","мауÑым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқÑан",""], - namesAbbr: ["Қаң","Ðқп","Ðау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy 'ж.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'ж.' H:mm", - F: "d MMMM yyyy 'ж.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.kl-GL.js b/pub/lib/globalize/cultures/globalize.culture.kl-GL.js deleted file mode 100644 index 761cb97507e2ee6013c9b7d62e621df8443160f5..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.kl-GL.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture kl-GL - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "kl-GL", "default", { - name: "kl-GL", - englishName: "Greenlandic (Greenland)", - nativeName: "kalaallisut (Kalaallit Nunaat)", - language: "kl", - numberFormat: { - ",": ".", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - groupSizes: [3,0], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,0], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"], - namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"], - namesShort: ["sa","at","ma","pi","si","ta","ar"] - }, - months: { - names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.kl.js b/pub/lib/globalize/cultures/globalize.culture.kl.js deleted file mode 100644 index 284e6232b48c7e3174ef2a464218f3101cbd51f0..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.kl.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture kl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "kl", "default", { - name: "kl", - englishName: "Greenlandic", - nativeName: "kalaallisut", - language: "kl", - numberFormat: { - ",": ".", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - groupSizes: [3,0], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,0], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"], - namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"], - namesShort: ["sa","at","ma","pi","si","ta","ar"] - }, - months: { - names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.km-KH.js b/pub/lib/globalize/cultures/globalize.culture.km-KH.js deleted file mode 100644 index 3510798de5757368d85175a6ad8c98bcbddd3380..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.km-KH.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Globalize Culture km-KH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "km-KH", "default", { - name: "km-KH", - englishName: "Khmer (Cambodia)", - nativeName: "ážáŸ’មែរ (កម្ពុជា)", - language: "km", - numberFormat: { - pattern: ["- n"], - groupSizes: [3,0], - "NaN": "NAN", - negativeInfinity: "-- អនន្áž", - positiveInfinity: "អនន្áž", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["-n$","n$"], - symbol: "៛" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ážáŸ’ងៃអាទិážáŸ’áž™","ážáŸ’ងៃចáŸáž“្ទ","ážáŸ’ងៃអង្គារ","ážáŸ’ងៃពុធ","ážáŸ’ងៃព្រហស្បážáž·áŸ","ážáŸ’ងៃសុក្រ","ážáŸ’ងៃសៅរáŸ"], - namesAbbr: ["អាទិ.","áž….","អ.","áž–áž»","ព្រហ.","សុ.","ស."], - namesShort: ["អា","áž…","អ","áž–áž»","ព្","សុ","ស"] - }, - months: { - names: ["មករា","កុម្ភៈ","មិនា","មáŸážŸáž¶","ឧសភា","មិážáž»áž“áž¶","កក្កដា","សីហា","កញ្ញា","ážáž»áž›áž¶","វិច្ឆិកា","ធ្នូ",""], - namesAbbr: ["១","២","៣","៤","៥","៦","៧","៨","៩","១០","១១","១២",""] - }, - AM: ["ព្រឹក","ព្រឹក","ព្រឹក"], - PM: ["ល្ងាច","ល្ងាច","ល្ងាច"], - eras: [{"name":"មុនគ.ស.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "d MMMM yyyy H:mm tt", - F: "d MMMM yyyy HH:mm:ss", - M: "'ážáŸ’ងៃទី' dd 'ážáŸ‚' MM", - Y: "'ážáŸ‚' MM 'ឆ្នាំ' yyyy" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ព្រឹក","ព្រឹក","ព្រឹក"], - PM: ["ល្ងាច","ល្ងាច","ល្ងាច"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm tt", - F: "dddd, MMMM dd, yyyy HH:mm:ss" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.km.js b/pub/lib/globalize/cultures/globalize.culture.km.js deleted file mode 100644 index 0e84cd28a9905ae0f6a36ebb5dbb34b338d36b64..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.km.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Globalize Culture km - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "km", "default", { - name: "km", - englishName: "Khmer", - nativeName: "ážáŸ’មែរ", - language: "km", - numberFormat: { - pattern: ["- n"], - groupSizes: [3,0], - "NaN": "NAN", - negativeInfinity: "-- អនន្áž", - positiveInfinity: "អនន្áž", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["-n$","n$"], - symbol: "៛" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ážáŸ’ងៃអាទិážáŸ’áž™","ážáŸ’ងៃចáŸáž“្ទ","ážáŸ’ងៃអង្គារ","ážáŸ’ងៃពុធ","ážáŸ’ងៃព្រហស្បážáž·áŸ","ážáŸ’ងៃសុក្រ","ážáŸ’ងៃសៅរáŸ"], - namesAbbr: ["អាទិ.","áž….","អ.","áž–áž»","ព្រហ.","សុ.","ស."], - namesShort: ["អា","áž…","អ","áž–áž»","ព្","សុ","ស"] - }, - months: { - names: ["មករា","កុម្ភៈ","មិនា","មáŸážŸáž¶","ឧសភា","មិážáž»áž“áž¶","កក្កដា","សីហា","កញ្ញា","ážáž»áž›áž¶","វិច្ឆិកា","ធ្នូ",""], - namesAbbr: ["១","២","៣","៤","៥","៦","៧","៨","៩","១០","១១","១២",""] - }, - AM: ["ព្រឹក","ព្រឹក","ព្រឹក"], - PM: ["ល្ងាច","ល្ងាច","ល្ងាច"], - eras: [{"name":"មុនគ.ស.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "d MMMM yyyy H:mm tt", - F: "d MMMM yyyy HH:mm:ss", - M: "'ážáŸ’ងៃទី' dd 'ážáŸ‚' MM", - Y: "'ážáŸ‚' MM 'ឆ្នាំ' yyyy" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ព្រឹក","ព្រឹក","ព្រឹក"], - PM: ["ល្ងាច","ល្ងាច","ល្ងាច"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm tt", - F: "dddd, MMMM dd, yyyy HH:mm:ss" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.kn-IN.js b/pub/lib/globalize/cultures/globalize.culture.kn-IN.js deleted file mode 100644 index 59176cf311c561f8934568db2365a9f4a71abe23..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.kn-IN.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture kn-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "kn-IN", "default", { - name: "kn-IN", - englishName: "Kannada (India)", - nativeName: "ಕನà³à²¨à²¡ (à²à²¾à²°à²¤)", - language: "kn", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ರೂ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["à²à²¾à²¨à³à²µà²¾à²°","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬà³à²§à²µà²¾à²°","ಗà³à²°à³à²µà²¾à²°","ಶà³à²•à³à²°à²µà²¾à²°","ಶನಿವಾರ"], - namesAbbr: ["à²à²¾à²¨à³.","ಸೋಮ.","ಮಂಗಳ.","ಬà³à²§.","ಗà³à²°à³.","ಶà³à²•à³à²°.","ಶನಿ."], - namesShort: ["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"] - }, - months: { - names: ["ಜನವರಿ","ಫೆಬà³à²°à²µà²°à²¿","ಮಾರà³à²šà³","ಎಪà³à²°à²¿à²²à³","ಮೇ","ಜೂನà³","ಜà³à²²à³ˆ","ಆಗಸà³à²Ÿà³","ಸೆಪà³à²Ÿà²‚ಬರà³","ಅಕà³à²Ÿà³‹à²¬à²°à³","ನವೆಂಬರà³","ಡಿಸೆಂಬರà³",""], - namesAbbr: ["ಜನವರಿ","ಫೆಬà³à²°à²µà²°à²¿","ಮಾರà³à²šà³","ಎಪà³à²°à²¿à²²à³","ಮೇ","ಜೂನà³","ಜà³à²²à³ˆ","ಆಗಸà³à²Ÿà³","ಸೆಪà³à²Ÿà²‚ಬರà³","ಅಕà³à²Ÿà³‹à²¬à²°à³","ನವೆಂಬರà³","ಡಿಸೆಂಬರà³",""] - }, - AM: ["ಪೂರà³à²µà²¾à²¹à³à²¨","ಪೂರà³à²µà²¾à²¹à³à²¨","ಪೂರà³à²µà²¾à²¹à³à²¨"], - PM: ["ಅಪರಾಹà³à²¨","ಅಪರಾಹà³à²¨","ಅಪರಾಹà³à²¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.kn.js b/pub/lib/globalize/cultures/globalize.culture.kn.js deleted file mode 100644 index 0887111733c0d4fdd04e87fb86a1a0dab455405b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.kn.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture kn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "kn", "default", { - name: "kn", - englishName: "Kannada", - nativeName: "ಕನà³à²¨à²¡", - language: "kn", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ರೂ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["à²à²¾à²¨à³à²µà²¾à²°","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬà³à²§à²µà²¾à²°","ಗà³à²°à³à²µà²¾à²°","ಶà³à²•à³à²°à²µà²¾à²°","ಶನಿವಾರ"], - namesAbbr: ["à²à²¾à²¨à³.","ಸೋಮ.","ಮಂಗಳ.","ಬà³à²§.","ಗà³à²°à³.","ಶà³à²•à³à²°.","ಶನಿ."], - namesShort: ["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"] - }, - months: { - names: ["ಜನವರಿ","ಫೆಬà³à²°à²µà²°à²¿","ಮಾರà³à²šà³","ಎಪà³à²°à²¿à²²à³","ಮೇ","ಜೂನà³","ಜà³à²²à³ˆ","ಆಗಸà³à²Ÿà³","ಸೆಪà³à²Ÿà²‚ಬರà³","ಅಕà³à²Ÿà³‹à²¬à²°à³","ನವೆಂಬರà³","ಡಿಸೆಂಬರà³",""], - namesAbbr: ["ಜನವರಿ","ಫೆಬà³à²°à²µà²°à²¿","ಮಾರà³à²šà³","ಎಪà³à²°à²¿à²²à³","ಮೇ","ಜೂನà³","ಜà³à²²à³ˆ","ಆಗಸà³à²Ÿà³","ಸೆಪà³à²Ÿà²‚ಬರà³","ಅಕà³à²Ÿà³‹à²¬à²°à³","ನವೆಂಬರà³","ಡಿಸೆಂಬರà³",""] - }, - AM: ["ಪೂರà³à²µà²¾à²¹à³à²¨","ಪೂರà³à²µà²¾à²¹à³à²¨","ಪೂರà³à²µà²¾à²¹à³à²¨"], - PM: ["ಅಪರಾಹà³à²¨","ಅಪರಾಹà³à²¨","ಅಪರಾಹà³à²¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ko-KR.js b/pub/lib/globalize/cultures/globalize.culture.ko-KR.js deleted file mode 100644 index db8705ed33f76cbc34195560f5f3c051790f32cc..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ko-KR.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Globalize Culture ko-KR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ko-KR", "default", { - name: "ko-KR", - englishName: "Korean (Korea)", - nativeName: "한êµì–´ (대한민êµ)", - language: "ko", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - decimals: 0, - symbol: "â‚©" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ì¼ìš”ì¼","월요ì¼","화요ì¼","수요ì¼","목요ì¼","금요ì¼","í† ìš”ì¼"], - namesAbbr: ["ì¼","ì›”","í™”","수","목","금","í† "], - namesShort: ["ì¼","ì›”","í™”","수","목","금","í† "] - }, - months: { - names: ["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["ì˜¤ì „","ì˜¤ì „","ì˜¤ì „"], - PM: ["오후","오후","오후"], - eras: [{"name":"서기","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy'ë…„' M'ì›”' d'ì¼' dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm", - F: "yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm:ss", - M: "M'ì›”' d'ì¼'", - Y: "yyyy'ë…„' M'ì›”'" - } - }, - Korean: { - name: "Korean", - "/": "-", - days: { - names: ["ì¼ìš”ì¼","월요ì¼","화요ì¼","수요ì¼","목요ì¼","금요ì¼","í† ìš”ì¼"], - namesAbbr: ["ì¼","ì›”","í™”","수","목","금","í† "], - namesShort: ["ì¼","ì›”","í™”","수","목","금","í† "] - }, - months: { - names: ["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["ì˜¤ì „","ì˜¤ì „","ì˜¤ì „"], - PM: ["오후","오후","오후"], - eras: [{"name":"단기","start":null,"offset":-2333}], - twoDigitYearMax: 4362, - patterns: { - d: "gg yyyy-MM-dd", - D: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm", - F: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm:ss", - M: "M'ì›”' d'ì¼'", - Y: "gg yyyy'ë…„' M'ì›”'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ko.js b/pub/lib/globalize/cultures/globalize.culture.ko.js deleted file mode 100644 index 339a3a2fdd05c61422bb0c7eece903b002ff6c1b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ko.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Globalize Culture ko - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ko", "default", { - name: "ko", - englishName: "Korean", - nativeName: "한êµì–´", - language: "ko", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - decimals: 0, - symbol: "â‚©" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ì¼ìš”ì¼","월요ì¼","화요ì¼","수요ì¼","목요ì¼","금요ì¼","í† ìš”ì¼"], - namesAbbr: ["ì¼","ì›”","í™”","수","목","금","í† "], - namesShort: ["ì¼","ì›”","í™”","수","목","금","í† "] - }, - months: { - names: ["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["ì˜¤ì „","ì˜¤ì „","ì˜¤ì „"], - PM: ["오후","오후","오후"], - eras: [{"name":"서기","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy'ë…„' M'ì›”' d'ì¼' dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm", - F: "yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm:ss", - M: "M'ì›”' d'ì¼'", - Y: "yyyy'ë…„' M'ì›”'" - } - }, - Korean: { - name: "Korean", - "/": "-", - days: { - names: ["ì¼ìš”ì¼","월요ì¼","화요ì¼","수요ì¼","목요ì¼","금요ì¼","í† ìš”ì¼"], - namesAbbr: ["ì¼","ì›”","í™”","수","목","금","í† "], - namesShort: ["ì¼","ì›”","í™”","수","목","금","í† "] - }, - months: { - names: ["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["ì˜¤ì „","ì˜¤ì „","ì˜¤ì „"], - PM: ["오후","오후","오후"], - eras: [{"name":"단기","start":null,"offset":-2333}], - twoDigitYearMax: 4362, - patterns: { - d: "gg yyyy-MM-dd", - D: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm", - F: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm:ss", - M: "M'ì›”' d'ì¼'", - Y: "gg yyyy'ë…„' M'ì›”'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.kok-IN.js b/pub/lib/globalize/cultures/globalize.culture.kok-IN.js deleted file mode 100644 index 77428c448a358e08304ade780976a3c5d0d528df..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.kok-IN.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture kok-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "kok-IN", "default", { - name: "kok-IN", - englishName: "Konkani (India)", - nativeName: "कोंकणी (à¤à¤¾à¤°à¤¤)", - language: "kok", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["आयतार","सोमार","मंगळार","बà¥à¤§à¤µà¤¾à¤°","बिरेसà¥à¤¤à¤¾à¤°","सà¥à¤•à¥à¤°à¤¾à¤°","शेनवार"], - namesAbbr: ["आय.","सोम.","मंगळ.","बà¥à¤§.","बिरे.","सà¥à¤•à¥à¤°.","शेन."], - namesShort: ["आ","स","म","ब","ब","स","श"] - }, - months: { - names: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवेमà¥à¤¬à¤°","डिसेंबर",""], - namesAbbr: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवेमà¥à¤¬à¤°","डिसेंबर",""] - }, - AM: ["म.पू.","म.पू.","म.पू."], - PM: ["म.नं.","म.नं.","म.नं."], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.kok.js b/pub/lib/globalize/cultures/globalize.culture.kok.js deleted file mode 100644 index 1ce96c3e1e081fa15ba3fe6c33cfb3db9c157109..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.kok.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture kok - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "kok", "default", { - name: "kok", - englishName: "Konkani", - nativeName: "कोंकणी", - language: "kok", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["आयतार","सोमार","मंगळार","बà¥à¤§à¤µà¤¾à¤°","बिरेसà¥à¤¤à¤¾à¤°","सà¥à¤•à¥à¤°à¤¾à¤°","शेनवार"], - namesAbbr: ["आय.","सोम.","मंगळ.","बà¥à¤§.","बिरे.","सà¥à¤•à¥à¤°.","शेन."], - namesShort: ["आ","स","म","ब","ब","स","श"] - }, - months: { - names: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवेमà¥à¤¬à¤°","डिसेंबर",""], - namesAbbr: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवेमà¥à¤¬à¤°","डिसेंबर",""] - }, - AM: ["म.पू.","म.पू.","म.पू."], - PM: ["म.नं.","म.नं.","म.नं."], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ky-KG.js b/pub/lib/globalize/cultures/globalize.culture.ky-KG.js deleted file mode 100644 index 7e268a3ce002fc6a038419cc918a07aac029ac8c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ky-KG.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture ky-KG - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ky-KG", "default", { - name: "ky-KG", - englishName: "Kyrgyz (Kyrgyzstan)", - nativeName: "Кыргыз (КыргызÑтан)", - language: "ky", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": "-", - symbol: "Ñом" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"], - namesAbbr: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"], - namesShort: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"] - }, - months: { - names: ["Январь","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d'-'MMMM yyyy'-ж.'", - t: "H:mm", - T: "H:mm:ss", - f: "d'-'MMMM yyyy'-ж.' H:mm", - F: "d'-'MMMM yyyy'-ж.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy'-ж.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ky.js b/pub/lib/globalize/cultures/globalize.culture.ky.js deleted file mode 100644 index 694eb1488fae69a8a5116e35e2520b32b25313dc..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ky.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture ky - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ky", "default", { - name: "ky", - englishName: "Kyrgyz", - nativeName: "Кыргыз", - language: "ky", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": "-", - symbol: "Ñом" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"], - namesAbbr: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"], - namesShort: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"] - }, - months: { - names: ["Январь","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d'-'MMMM yyyy'-ж.'", - t: "H:mm", - T: "H:mm:ss", - f: "d'-'MMMM yyyy'-ж.' H:mm", - F: "d'-'MMMM yyyy'-ж.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy'-ж.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.lb-LU.js b/pub/lib/globalize/cultures/globalize.culture.lb-LU.js deleted file mode 100644 index 73d3f760eee893b23bd056b9f9676068697cae76..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.lb-LU.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture lb-LU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "lb-LU", "default", { - name: "lb-LU", - englishName: "Luxembourgish (Luxembourg)", - nativeName: "Lëtzebuergesch (Luxembourg)", - language: "lb", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "n. num.", - negativeInfinity: "-onendlech", - positiveInfinity: "+onendlech", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"], - namesAbbr: ["Son","Méi","Dën","Mët","Don","Fre","Sam"], - namesShort: ["So","Mé","Dë","Më","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.lb.js b/pub/lib/globalize/cultures/globalize.culture.lb.js deleted file mode 100644 index 3cbb43aa518b08bc3149905110783bae0de1b214..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.lb.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture lb - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "lb", "default", { - name: "lb", - englishName: "Luxembourgish", - nativeName: "Lëtzebuergesch", - language: "lb", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "n. num.", - negativeInfinity: "-onendlech", - positiveInfinity: "+onendlech", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"], - namesAbbr: ["Son","Méi","Dën","Mët","Don","Fre","Sam"], - namesShort: ["So","Mé","Dë","Më","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.lo-LA.js b/pub/lib/globalize/cultures/globalize.culture.lo-LA.js deleted file mode 100644 index 384d53f458d1b952a7f1118f41e8580abe3c1929..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.lo-LA.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture lo-LA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "lo-LA", "default", { - name: "lo-LA", - englishName: "Lao (Lao P.D.R.)", - nativeName: "ລາວ (ສ.ປ.ປ. ລາວ)", - language: "lo", - numberFormat: { - pattern: ["(n)"], - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - }, - currency: { - pattern: ["(n$)","n$"], - groupSizes: [3,0], - symbol: "â‚" - } - }, - calendars: { - standard: { - days: { - names: ["ວັນàºàº²àº—ິດ","ວັນຈັນ","ວັນàºàº±àº‡àº„ານ","ວັນພຸດ","ວັນພະຫັດ","ວັນສຸàº","ວັນເສົາ"], - namesAbbr: ["àºàº²àº—ິດ","ຈັນ","àºàº±àº‡àº„ານ","ພຸດ","ພະຫັດ","ສຸàº","ເສົາ"], - namesShort: ["àº","ຈ","àº","ພ","ພ","ສ","ເ"] - }, - months: { - names: ["ມັງàºàºàº™","àºàº¸àº¡àºžàº²","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","àºà»àº¥àº°àºàº»àº”","ສິງຫາ","àºàº±àº™àºàº²","ຕຸລາ","ພະຈິàº","ທັນວາ",""], - namesAbbr: ["ມັງàºàºàº™","àºàº¸àº¡àºžàº²","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","àºà»àº¥àº°àºàº»àº”","ສິງຫາ","àºàº±àº™àºàº²","ຕຸລາ","ພະຈິàº","ທັນວາ",""] - }, - AM: ["ເຊົ້າ","ເຊົ້າ","ເຊົ້າ"], - PM: ["à»àº¥àº‡","à»àº¥àº‡","à»àº¥àº‡"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "dd MMMM yyyy H:mm tt", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.lo.js b/pub/lib/globalize/cultures/globalize.culture.lo.js deleted file mode 100644 index bfc8c7b997d1a8d7ecf28c5534667a600e7bb603..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.lo.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture lo - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "lo", "default", { - name: "lo", - englishName: "Lao", - nativeName: "ລາວ", - language: "lo", - numberFormat: { - pattern: ["(n)"], - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - }, - currency: { - pattern: ["(n$)","n$"], - groupSizes: [3,0], - symbol: "â‚" - } - }, - calendars: { - standard: { - days: { - names: ["ວັນàºàº²àº—ິດ","ວັນຈັນ","ວັນàºàº±àº‡àº„ານ","ວັນພຸດ","ວັນພະຫັດ","ວັນສຸàº","ວັນເສົາ"], - namesAbbr: ["àºàº²àº—ິດ","ຈັນ","àºàº±àº‡àº„ານ","ພຸດ","ພະຫັດ","ສຸàº","ເສົາ"], - namesShort: ["àº","ຈ","àº","ພ","ພ","ສ","ເ"] - }, - months: { - names: ["ມັງàºàºàº™","àºàº¸àº¡àºžàº²","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","àºà»àº¥àº°àºàº»àº”","ສິງຫາ","àºàº±àº™àºàº²","ຕຸລາ","ພະຈິàº","ທັນວາ",""], - namesAbbr: ["ມັງàºàºàº™","àºàº¸àº¡àºžàº²","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","àºà»àº¥àº°àºàº»àº”","ສິງຫາ","àºàº±àº™àºàº²","ຕຸລາ","ພະຈິàº","ທັນວາ",""] - }, - AM: ["ເຊົ້າ","ເຊົ້າ","ເຊົ້າ"], - PM: ["à»àº¥àº‡","à»àº¥àº‡","à»àº¥àº‡"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "dd MMMM yyyy H:mm tt", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.lt-LT.js b/pub/lib/globalize/cultures/globalize.culture.lt-LT.js deleted file mode 100644 index 84548fcbb9808eaf53f8181f561592874922e43e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.lt-LT.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture lt-LT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "lt-LT", "default", { - name: "lt-LT", - englishName: "Lithuanian (Lithuania)", - nativeName: "lietuvių (Lietuva)", - language: "lt", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-begalybÄ—", - positiveInfinity: "begalybÄ—", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Lt" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sekmadienis","pirmadienis","antradienis","treÄiadienis","ketvirtadienis","penktadienis","Å¡eÅ¡tadienis"], - namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Å t"], - namesShort: ["S","P","A","T","K","Pn","Å "] - }, - months: { - names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjÅ«tis","rugsÄ—jis","spalis","lapkritis","gruodis",""], - namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] - }, - monthsGenitive: { - names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjÅ«Äio","rugsÄ—jo","spalio","lapkriÄio","gruodžio",""], - namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy.MM.dd", - D: "yyyy 'm.' MMMM d 'd.'", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'm.' MMMM d 'd.' HH:mm", - F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss", - M: "MMMM d 'd.'", - Y: "yyyy 'm.' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.lt.js b/pub/lib/globalize/cultures/globalize.culture.lt.js deleted file mode 100644 index 540f87e1214024f1992e3e6fe7507e8fae87eaff..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.lt.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture lt - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "lt", "default", { - name: "lt", - englishName: "Lithuanian", - nativeName: "lietuvių", - language: "lt", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-begalybÄ—", - positiveInfinity: "begalybÄ—", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Lt" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sekmadienis","pirmadienis","antradienis","treÄiadienis","ketvirtadienis","penktadienis","Å¡eÅ¡tadienis"], - namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Å t"], - namesShort: ["S","P","A","T","K","Pn","Å "] - }, - months: { - names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjÅ«tis","rugsÄ—jis","spalis","lapkritis","gruodis",""], - namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] - }, - monthsGenitive: { - names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjÅ«Äio","rugsÄ—jo","spalio","lapkriÄio","gruodžio",""], - namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy.MM.dd", - D: "yyyy 'm.' MMMM d 'd.'", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'm.' MMMM d 'd.' HH:mm", - F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss", - M: "MMMM d 'd.'", - Y: "yyyy 'm.' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.lv-LV.js b/pub/lib/globalize/cultures/globalize.culture.lv-LV.js deleted file mode 100644 index f38e38cb00e3ac27be8b418e2951dc7300a0b43e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.lv-LV.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture lv-LV - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "lv-LV", "default", { - name: "lv-LV", - englishName: "Latvian (Latvia)", - nativeName: "latvieÅ¡u (Latvija)", - language: "lv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-bezgalÄ«ba", - positiveInfinity: "bezgalÄ«ba", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": " ", - ".": ",", - symbol: "Ls" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["svÄ“tdiena","pirmdiena","otrdiena","treÅ¡diena","ceturtdiena","piektdiena","sestdiena"], - namesAbbr: ["sv","pr","ot","tr","ce","pk","se"], - namesShort: ["sv","pr","ot","tr","ce","pk","se"] - }, - months: { - names: ["janvÄris","februÄris","marts","aprÄ«lis","maijs","jÅ«nijs","jÅ«lijs","augusts","septembris","oktobris","novembris","decembris",""], - namesAbbr: ["jan","feb","mar","apr","mai","jÅ«n","jÅ«l","aug","sep","okt","nov","dec",""] - }, - monthsGenitive: { - names: ["janvÄrÄ«","februÄrÄ«","martÄ","aprÄ«lÄ«","maijÄ","jÅ«nijÄ","jÅ«lijÄ","augustÄ","septembrÄ«","oktobrÄ«","novembrÄ«","decembrÄ«",""], - namesAbbr: ["jan","feb","mar","apr","mai","jÅ«n","jÅ«l","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy.MM.dd.", - D: "dddd, yyyy'. gada 'd. MMMM", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, yyyy'. gada 'd. MMMM H:mm", - F: "dddd, yyyy'. gada 'd. MMMM H:mm:ss", - M: "d. MMMM", - Y: "yyyy. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.lv.js b/pub/lib/globalize/cultures/globalize.culture.lv.js deleted file mode 100644 index 8131b557a92add7a1e9c704bfb72eba73e9c7f47..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.lv.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture lv - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "lv", "default", { - name: "lv", - englishName: "Latvian", - nativeName: "latvieÅ¡u", - language: "lv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-bezgalÄ«ba", - positiveInfinity: "bezgalÄ«ba", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": " ", - ".": ",", - symbol: "Ls" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["svÄ“tdiena","pirmdiena","otrdiena","treÅ¡diena","ceturtdiena","piektdiena","sestdiena"], - namesAbbr: ["sv","pr","ot","tr","ce","pk","se"], - namesShort: ["sv","pr","ot","tr","ce","pk","se"] - }, - months: { - names: ["janvÄris","februÄris","marts","aprÄ«lis","maijs","jÅ«nijs","jÅ«lijs","augusts","septembris","oktobris","novembris","decembris",""], - namesAbbr: ["jan","feb","mar","apr","mai","jÅ«n","jÅ«l","aug","sep","okt","nov","dec",""] - }, - monthsGenitive: { - names: ["janvÄrÄ«","februÄrÄ«","martÄ","aprÄ«lÄ«","maijÄ","jÅ«nijÄ","jÅ«lijÄ","augustÄ","septembrÄ«","oktobrÄ«","novembrÄ«","decembrÄ«",""], - namesAbbr: ["jan","feb","mar","apr","mai","jÅ«n","jÅ«l","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy.MM.dd.", - D: "dddd, yyyy'. gada 'd. MMMM", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, yyyy'. gada 'd. MMMM H:mm", - F: "dddd, yyyy'. gada 'd. MMMM H:mm:ss", - M: "d. MMMM", - Y: "yyyy. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mi-NZ.js b/pub/lib/globalize/cultures/globalize.culture.mi-NZ.js deleted file mode 100644 index 3908ea031aeb0c99a0e7792c018231e88a87cc04..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mi-NZ.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture mi-NZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mi-NZ", "default", { - name: "mi-NZ", - englishName: "Maori (New Zealand)", - nativeName: "Reo MÄori (Aotearoa)", - language: "mi", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["RÄtapu","RÄhina","RÄtÅ«","RÄapa","RÄpare","RÄmere","RÄhoroi"], - namesAbbr: ["Ta","Hi","TÅ«","Apa","Pa","Me","Ho"], - namesShort: ["Ta","Hi","TÅ«","Aa","Pa","Me","Ho"] - }, - months: { - names: ["Kohi-tÄtea","Hui-tanguru","PoutÅ«-te-rangi","Paenga-whÄwhÄ","Haratua","Pipiri","HÅngongoi","Here-turi-kÅkÄ","Mahuru","Whiringa-Ä-nuku","Whiringa-Ä-rangi","Hakihea",""], - namesAbbr: ["Kohi","Hui","Pou","Pae","Hara","Pipi","HÅngo","Here","Mahu","Nuku","Rangi","Haki",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd MMMM, yyyy", - f: "dddd, dd MMMM, yyyy h:mm tt", - F: "dddd, dd MMMM, yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM, yy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mi.js b/pub/lib/globalize/cultures/globalize.culture.mi.js deleted file mode 100644 index 6eb3ffaecbb15f2ae432eacdfddaf134c674d6dd..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mi.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture mi - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mi", "default", { - name: "mi", - englishName: "Maori", - nativeName: "Reo MÄori", - language: "mi", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["RÄtapu","RÄhina","RÄtÅ«","RÄapa","RÄpare","RÄmere","RÄhoroi"], - namesAbbr: ["Ta","Hi","TÅ«","Apa","Pa","Me","Ho"], - namesShort: ["Ta","Hi","TÅ«","Aa","Pa","Me","Ho"] - }, - months: { - names: ["Kohi-tÄtea","Hui-tanguru","PoutÅ«-te-rangi","Paenga-whÄwhÄ","Haratua","Pipiri","HÅngongoi","Here-turi-kÅkÄ","Mahuru","Whiringa-Ä-nuku","Whiringa-Ä-rangi","Hakihea",""], - namesAbbr: ["Kohi","Hui","Pou","Pae","Hara","Pipi","HÅngo","Here","Mahu","Nuku","Rangi","Haki",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd MMMM, yyyy", - f: "dddd, dd MMMM, yyyy h:mm tt", - F: "dddd, dd MMMM, yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM, yy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mk-MK.js b/pub/lib/globalize/cultures/globalize.culture.mk-MK.js deleted file mode 100644 index 5ded9c4ac4e0e13ad14aa94bc21e1ae3a9c07ed5..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mk-MK.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture mk-MK - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mk-MK", "default", { - name: "mk-MK", - englishName: "Macedonian (Former Yugoslav Republic of Macedonia)", - nativeName: "македонÑки јазик (Македонија)", - language: "mk", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "ден." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недела","понеделник","вторник","Ñреда","четврток","петок","Ñабота"], - namesAbbr: ["нед","пон","втр","Ñрд","чет","пет","Ñаб"], - namesShort: ["не","по","вт","ÑÑ€","че","пе","Ñа"] - }, - months: { - names: ["јануари","февруари","март","април","мај","јуни","јули","авгуÑÑ‚","Ñептември","октомври","ноември","декември",""], - namesAbbr: ["јан","фев","мар","апр","мај","јун","јул","авг","Ñеп","окт","ное","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "dddd, dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, dd MMMM yyyy HH:mm", - F: "dddd, dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mk.js b/pub/lib/globalize/cultures/globalize.culture.mk.js deleted file mode 100644 index 6dcc833aed1be5388372ba264640ae1d00d6b7e6..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mk.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture mk - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mk", "default", { - name: "mk", - englishName: "Macedonian (FYROM)", - nativeName: "македонÑки јазик", - language: "mk", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "ден." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недела","понеделник","вторник","Ñреда","четврток","петок","Ñабота"], - namesAbbr: ["нед","пон","втр","Ñрд","чет","пет","Ñаб"], - namesShort: ["не","по","вт","ÑÑ€","че","пе","Ñа"] - }, - months: { - names: ["јануари","февруари","март","април","мај","јуни","јули","авгуÑÑ‚","Ñептември","октомври","ноември","декември",""], - namesAbbr: ["јан","фев","мар","апр","мај","јун","јул","авг","Ñеп","окт","ное","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "dddd, dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, dd MMMM yyyy HH:mm", - F: "dddd, dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ml-IN.js b/pub/lib/globalize/cultures/globalize.culture.ml-IN.js deleted file mode 100644 index bda68e76b3c087abdf4e3f6ef755f6e7295652b5..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ml-IN.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture ml-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ml-IN", "default", { - name: "ml-IN", - englishName: "Malayalam (India)", - nativeName: "മലയാളം (à´à´¾à´°à´¤à´‚)", - language: "ml", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "à´•" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["ഞായറാഴàµà´š","തിങàµà´•ളാഴàµà´š","ചൊവàµà´µà´¾à´´àµà´š","à´¬àµà´§à´¨à´¾à´´àµà´š","à´µàµà´¯à´¾à´´à´¾à´´àµà´š","വെളàµà´³à´¿à´¯à´¾à´´àµà´š","ശനിയാഴàµà´š"], - namesAbbr: ["ഞായർ.","തിങàµà´•ൾ.","ചൊവàµà´µ.","à´¬àµà´§àµ».","à´µàµà´¯à´¾à´´à´‚.","വെളàµà´³à´¿.","ശനി."], - namesShort: ["à´ž","à´¤","à´š","à´¬","à´µ","വെ","à´¶"] - }, - months: { - names: ["ജനàµà´µà´°à´¿","ഫെബàµà´±àµà´µà´°à´¿","മാറàµà´šàµà´šàµ","à´à´ªàµà´±à´¿à´²àµ","മെയàµ","ജൂണàµ","ജൂലൈ","à´“à´—à´¸àµà´±à´±àµ","സെപàµà´±à´±à´‚ബറàµ","à´’à´•àµà´Ÿàµ‹à´¬à´±àµ","നവംബറàµ","ഡിസംബറàµ",""], - namesAbbr: ["ജനàµà´µà´°à´¿","ഫെബàµà´±àµà´µà´°à´¿","മാറàµà´šàµà´šàµ","à´à´ªàµà´±à´¿à´²àµ","മെയàµ","ജൂണàµ","ജൂലൈ","à´“à´—à´¸àµà´±à´±àµ","സെപàµà´±à´±à´‚ബറàµ","à´’à´•àµà´Ÿàµ‹à´¬à´±àµ","നവംബറàµ","ഡിസംബറàµ",""] - }, - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ml.js b/pub/lib/globalize/cultures/globalize.culture.ml.js deleted file mode 100644 index 2a7e8c63ce6a52fdb2a3f323ff166c67989521da..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ml.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture ml - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ml", "default", { - name: "ml", - englishName: "Malayalam", - nativeName: "മലയാളം", - language: "ml", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "à´•" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["ഞായറാഴàµà´š","തിങàµà´•ളാഴàµà´š","ചൊവàµà´µà´¾à´´àµà´š","à´¬àµà´§à´¨à´¾à´´àµà´š","à´µàµà´¯à´¾à´´à´¾à´´àµà´š","വെളàµà´³à´¿à´¯à´¾à´´àµà´š","ശനിയാഴàµà´š"], - namesAbbr: ["ഞായർ.","തിങàµà´•ൾ.","ചൊവàµà´µ.","à´¬àµà´§àµ».","à´µàµà´¯à´¾à´´à´‚.","വെളàµà´³à´¿.","ശനി."], - namesShort: ["à´ž","à´¤","à´š","à´¬","à´µ","വെ","à´¶"] - }, - months: { - names: ["ജനàµà´µà´°à´¿","ഫെബàµà´±àµà´µà´°à´¿","മാറàµà´šàµà´šàµ","à´à´ªàµà´±à´¿à´²àµ","മെയàµ","ജൂണàµ","ജൂലൈ","à´“à´—à´¸àµà´±à´±àµ","സെപàµà´±à´±à´‚ബറàµ","à´’à´•àµà´Ÿàµ‹à´¬à´±àµ","നവംബറàµ","ഡിസംബറàµ",""], - namesAbbr: ["ജനàµà´µà´°à´¿","ഫെബàµà´±àµà´µà´°à´¿","മാറàµà´šàµà´šàµ","à´à´ªàµà´±à´¿à´²àµ","മെയàµ","ജൂണàµ","ജൂലൈ","à´“à´—à´¸àµà´±à´±àµ","സെപàµà´±à´±à´‚ബറàµ","à´’à´•àµà´Ÿàµ‹à´¬à´±àµ","നവംബറàµ","ഡിസംബറàµ",""] - }, - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mn-Cyrl.js b/pub/lib/globalize/cultures/globalize.culture.mn-Cyrl.js deleted file mode 100644 index c56a6066a0dc0ceff3c6ed2f33b2d5b721a0fa5f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mn-Cyrl.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture mn-Cyrl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mn-Cyrl", "default", { - name: "mn-Cyrl", - englishName: "Mongolian (Cyrillic)", - nativeName: "Монгол хÑл", - language: "mn-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚®" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ÐÑм","Даваа","МÑгмар","Лхагва","ПүрÑв","БааÑан","БÑмба"], - namesAbbr: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"], - namesShort: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"] - }, - months: { - names: ["1 дүгÑÑр Ñар","2 дугаар Ñар","3 дугаар Ñар","4 дүгÑÑр Ñар","5 дугаар Ñар","6 дугаар Ñар","7 дугаар Ñар","8 дугаар Ñар","9 дүгÑÑр Ñар","10 дугаар Ñар","11 дүгÑÑр Ñар","12 дугаар Ñар",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - monthsGenitive: { - names: ["1 дүгÑÑр Ñарын","2 дугаар Ñарын","3 дугаар Ñарын","4 дүгÑÑр Ñарын","5 дугаар Ñарын","6 дугаар Ñарын","7 дугаар Ñарын","8 дугаар Ñарын","9 дүгÑÑр Ñарын","10 дугаар Ñарын","11 дүгÑÑр Ñарын","12 дугаар Ñарын",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - AM: null, - PM: null, - patterns: { - d: "yy.MM.dd", - D: "yyyy 'оны' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'оны' MMMM d H:mm", - F: "yyyy 'оны' MMMM d H:mm:ss", - M: "d MMMM", - Y: "yyyy 'он' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mn-MN.js b/pub/lib/globalize/cultures/globalize.culture.mn-MN.js deleted file mode 100644 index bc3d73eaa5d319015db4c90fd6072bbfbbd24857..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mn-MN.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture mn-MN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mn-MN", "default", { - name: "mn-MN", - englishName: "Mongolian (Cyrillic, Mongolia)", - nativeName: "Монгол хÑл (Монгол улÑ)", - language: "mn-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚®" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ÐÑм","Даваа","МÑгмар","Лхагва","ПүрÑв","БааÑан","БÑмба"], - namesAbbr: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"], - namesShort: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"] - }, - months: { - names: ["1 дүгÑÑр Ñар","2 дугаар Ñар","3 дугаар Ñар","4 дүгÑÑр Ñар","5 дугаар Ñар","6 дугаар Ñар","7 дугаар Ñар","8 дугаар Ñар","9 дүгÑÑр Ñар","10 дугаар Ñар","11 дүгÑÑр Ñар","12 дугаар Ñар",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - monthsGenitive: { - names: ["1 дүгÑÑр Ñарын","2 дугаар Ñарын","3 дугаар Ñарын","4 дүгÑÑр Ñарын","5 дугаар Ñарын","6 дугаар Ñарын","7 дугаар Ñарын","8 дугаар Ñарын","9 дүгÑÑр Ñарын","10 дугаар Ñарын","11 дүгÑÑр Ñарын","12 дугаар Ñарын",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - AM: null, - PM: null, - patterns: { - d: "yy.MM.dd", - D: "yyyy 'оны' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'оны' MMMM d H:mm", - F: "yyyy 'оны' MMMM d H:mm:ss", - M: "d MMMM", - Y: "yyyy 'он' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mn-Mong-CN.js b/pub/lib/globalize/cultures/globalize.culture.mn-Mong-CN.js deleted file mode 100644 index ea50fd2e90cdd9f600fb9f573ca78a42f8d6dd36..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mn-Mong-CN.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture mn-Mong-CN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mn-Mong-CN", "default", { - name: "mn-Mong-CN", - englishName: "Mongolian (Traditional Mongolian, PRC)", - nativeName: "á ®á ¤á ¨á á á ¤á ¯ á ¬á ¡á ¯á ¡ (á ªá ¦á á ¦á ³á ¡ á ¨á á ¢á ·á á ®á ³á á ¬á ¤ á ³á ¤á ®á ³á á ³á ¤ á á ·á á ³ á £á ¯á £á °)", - language: "mn-Mong", - numberFormat: { - groupSizes: [3,0], - "NaN": "á ²á ¤á á á á ªá ¤á °á ¤", - negativeInfinity: "á °á ¦á ¬á ¡á ·á ¬á ¦ á ¬á ¢á µá á á á ·á á ¦á ¢ á ¶á ¡á ¬á ¡", - positiveInfinity: "á ¡á ¶á ‹á ¡á ·á ¬á ¦ á ¬á ¢á µá á á á ·á á ¦á ¢ á ¶á á ¬á ¡", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - groupSizes: [3,0], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["á á á ·á á \u202fá ¤á ¨ á ¡á ³á ¦á ·","á á á ·á á \u202fá ¤á ¨ á ¨á ¢á á ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ¬á £á ¶á á ·","á á á ·á á \u202fá ¤á ¨ á á ¤á ·á ªá á ¨","á á á ·á á \u202fá ¤á ¨ á ³á ¥á ·á ªá ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ²á á ªá ¤á ¨","á á á ·á á \u202fá ¤á ¨ á µá ¢á ·á á ¤á á á ¨"], - namesAbbr: ["á á á ·á á \u202fá ¤á ¨ á ¡á ³á ¦á ·","á á á ·á á \u202fá ¤á ¨ á ¨á ¢á á ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ¬á £á ¶á á ·","á á á ·á á \u202fá ¤á ¨ á á ¤á ·á ªá á ¨","á á á ·á á \u202fá ¤á ¨ á ³á ¥á ·á ªá ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ²á á ªá ¤á ¨","á á á ·á á \u202fá ¤á ¨ á µá ¢á ·á á ¤á á á ¨"], - namesShort: ["á ¡\u200d","á ¨á ¢\u200d","á ¬á £\u200d","á á ¤\u200d","á ³á ¥\u200d","á ²á \u200d","á µá ¢\u200d"] - }, - months: { - names: ["á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ","á á ¤á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á ²á ¦á ·á ªá ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ²á á ªá ¤á ³á ¤á á á · á °á á ·á Žá ","á µá ¢á ·á á ¤á ³á ¤á á á · á °á á ·á Žá ","á ²á ¤á ¯á ¤á ³á ¤á á á · á °á á ·á Žá ","á ¨á á ¢á ®á á ³á ¤á á á · á °á á ·á Žá ","á ¶á ¢á °á ¦á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ",""], - namesAbbr: ["á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ","á á ¤á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á ²á ¦á ·á ªá ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ²á á ªá ¤á ³á ¤á á á · á °á á ·á Žá ","á µá ¢á ·á á ¤á ³á ¤á á á · á °á á ·á Žá ","á ²á ¤á ¯á ¤á ³á ¤á á á · á °á á ·á Žá ","á ¨á á ¢á ®á á ³á ¤á á á · á °á á ·á Žá ","á ¶á ¢á °á ¦á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ",""] - }, - AM: null, - PM: null, - eras: [{"name":"á £á ¨ á ²á £á á á ¯á á ¯ á ¤á ¨","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·' H:mm", - F: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·' H:mm:ss", - M: "M'á °á á ·á Žá ' d'á ¡á ³á ¦á ·'", - Y: "yyyy'á £á ¨' M'á °á á ·á Žá '" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mn-Mong.js b/pub/lib/globalize/cultures/globalize.culture.mn-Mong.js deleted file mode 100644 index 351d93b85f21f60fa2713178cd94d09bd3b11328..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mn-Mong.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture mn-Mong - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mn-Mong", "default", { - name: "mn-Mong", - englishName: "Mongolian (Traditional Mongolian)", - nativeName: "á ®á ¤á ¨á á á ¤á ¯ á ¬á ¡á ¯á ¡", - language: "mn-Mong", - numberFormat: { - groupSizes: [3,0], - "NaN": "á ²á ¤á á á á ªá ¤á °á ¤", - negativeInfinity: "á °á ¦á ¬á ¡á ·á ¬á ¦ á ¬á ¢á µá á á á ·á á ¦á ¢ á ¶á ¡á ¬á ¡", - positiveInfinity: "á ¡á ¶á ‹á ¡á ·á ¬á ¦ á ¬á ¢á µá á á á ·á á ¦á ¢ á ¶á á ¬á ¡", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - groupSizes: [3,0], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["á á á ·á á \u202fá ¤á ¨ á ¡á ³á ¦á ·","á á á ·á á \u202fá ¤á ¨ á ¨á ¢á á ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ¬á £á ¶á á ·","á á á ·á á \u202fá ¤á ¨ á á ¤á ·á ªá á ¨","á á á ·á á \u202fá ¤á ¨ á ³á ¥á ·á ªá ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ²á á ªá ¤á ¨","á á á ·á á \u202fá ¤á ¨ á µá ¢á ·á á ¤á á á ¨"], - namesAbbr: ["á á á ·á á \u202fá ¤á ¨ á ¡á ³á ¦á ·","á á á ·á á \u202fá ¤á ¨ á ¨á ¢á á ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ¬á £á ¶á á ·","á á á ·á á \u202fá ¤á ¨ á á ¤á ·á ªá á ¨","á á á ·á á \u202fá ¤á ¨ á ³á ¥á ·á ªá ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ²á á ªá ¤á ¨","á á á ·á á \u202fá ¤á ¨ á µá ¢á ·á á ¤á á á ¨"], - namesShort: ["á ¡\u200d","á ¨á ¢\u200d","á ¬á £\u200d","á á ¤\u200d","á ³á ¥\u200d","á ²á \u200d","á µá ¢\u200d"] - }, - months: { - names: ["á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ","á á ¤á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á ²á ¦á ·á ªá ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ²á á ªá ¤á ³á ¤á á á · á °á á ·á Žá ","á µá ¢á ·á á ¤á ³á ¤á á á · á °á á ·á Žá ","á ²á ¤á ¯á ¤á ³á ¤á á á · á °á á ·á Žá ","á ¨á á ¢á ®á á ³á ¤á á á · á °á á ·á Žá ","á ¶á ¢á °á ¦á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ",""], - namesAbbr: ["á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ","á á ¤á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á ²á ¦á ·á ªá ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ²á á ªá ¤á ³á ¤á á á · á °á á ·á Žá ","á µá ¢á ·á á ¤á ³á ¤á á á · á °á á ·á Žá ","á ²á ¤á ¯á ¤á ³á ¤á á á · á °á á ·á Žá ","á ¨á á ¢á ®á á ³á ¤á á á · á °á á ·á Žá ","á ¶á ¢á °á ¦á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ",""] - }, - AM: null, - PM: null, - eras: [{"name":"á £á ¨ á ²á £á á á ¯á á ¯ á ¤á ¨","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·' H:mm", - F: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·' H:mm:ss", - M: "M'á °á á ·á Žá ' d'á ¡á ³á ¦á ·'", - Y: "yyyy'á £á ¨' M'á °á á ·á Žá '" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mn.js b/pub/lib/globalize/cultures/globalize.culture.mn.js deleted file mode 100644 index a976df0814c28015864840f8d15764d9d3853072..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mn.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture mn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mn", "default", { - name: "mn", - englishName: "Mongolian", - nativeName: "Монгол хÑл", - language: "mn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚®" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ÐÑм","Даваа","МÑгмар","Лхагва","ПүрÑв","БааÑан","БÑмба"], - namesAbbr: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"], - namesShort: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"] - }, - months: { - names: ["1 дүгÑÑр Ñар","2 дугаар Ñар","3 дугаар Ñар","4 дүгÑÑр Ñар","5 дугаар Ñар","6 дугаар Ñар","7 дугаар Ñар","8 дугаар Ñар","9 дүгÑÑр Ñар","10 дугаар Ñар","11 дүгÑÑр Ñар","12 дугаар Ñар",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - monthsGenitive: { - names: ["1 дүгÑÑр Ñарын","2 дугаар Ñарын","3 дугаар Ñарын","4 дүгÑÑр Ñарын","5 дугаар Ñарын","6 дугаар Ñарын","7 дугаар Ñарын","8 дугаар Ñарын","9 дүгÑÑр Ñарын","10 дугаар Ñарын","11 дүгÑÑр Ñарын","12 дугаар Ñарын",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - AM: null, - PM: null, - patterns: { - d: "yy.MM.dd", - D: "yyyy 'оны' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'оны' MMMM d H:mm", - F: "yyyy 'оны' MMMM d H:mm:ss", - M: "d MMMM", - Y: "yyyy 'он' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.moh-CA.js b/pub/lib/globalize/cultures/globalize.culture.moh-CA.js deleted file mode 100644 index c3e4057f3edfda367b6314600a40ebb4b404778b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.moh-CA.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Globalize Culture moh-CA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "moh-CA", "default", { - name: "moh-CA", - englishName: "Mohawk (Mohawk)", - nativeName: "Kanien'kéha", - language: "moh", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Awentatokentì:ke","Awentataón'ke","Ratironhia'kehronòn:ke","Soséhne","Okaristiiáhne","Ronwaia'tanentaktonhne","Entákta"], - namesShort: ["S","M","T","W","T","F","S"] - }, - months: { - names: ["Tsothohrkó:Wa","Enniska","Enniskó:Wa","Onerahtókha","Onerahtohkó:Wa","Ohiari:Ha","Ohiarihkó:Wa","Seskéha","Seskehkó:Wa","Kenténha","Kentenhkó:Wa","Tsothóhrha",""] - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.moh.js b/pub/lib/globalize/cultures/globalize.culture.moh.js deleted file mode 100644 index 0eb5063112f47708016ca763124c9080c9036e5b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.moh.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Globalize Culture moh - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "moh", "default", { - name: "moh", - englishName: "Mohawk", - nativeName: "Kanien'kéha", - language: "moh", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Awentatokentì:ke","Awentataón'ke","Ratironhia'kehronòn:ke","Soséhne","Okaristiiáhne","Ronwaia'tanentaktonhne","Entákta"], - namesShort: ["S","M","T","W","T","F","S"] - }, - months: { - names: ["Tsothohrkó:Wa","Enniska","Enniskó:Wa","Onerahtókha","Onerahtohkó:Wa","Ohiari:Ha","Ohiarihkó:Wa","Seskéha","Seskehkó:Wa","Kenténha","Kentenhkó:Wa","Tsothóhrha",""] - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mr-IN.js b/pub/lib/globalize/cultures/globalize.culture.mr-IN.js deleted file mode 100644 index 0aab31fba392c6c675676d6885c77fe38e3d6fce..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mr-IN.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture mr-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mr-IN", "default", { - name: "mr-IN", - englishName: "Marathi (India)", - nativeName: "मराठी (à¤à¤¾à¤°à¤¤)", - language: "mr", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["रविवार","सोमवार","मंगळवार","बà¥à¤§à¤µà¤¾à¤°","गà¥à¤°à¥à¤µà¤¾à¤°","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["रवि.","सोम.","मंगळ.","बà¥à¤§.","गà¥à¤°à¥.","शà¥à¤•à¥à¤°.","शनि."], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवà¥à¤¹à¥‡à¤‚बर","डिसेंबर",""], - namesAbbr: ["जाने.","फेबà¥à¤°à¥.","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚.","ऑकà¥à¤Ÿà¥‹.","नोवà¥à¤¹à¥‡à¤‚.","डिसें.",""] - }, - AM: ["म.पू.","म.पू.","म.पू."], - PM: ["म.नं.","म.नं.","म.नं."], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mr.js b/pub/lib/globalize/cultures/globalize.culture.mr.js deleted file mode 100644 index 38175391db1a37d847d9518963f5f39eb6ac41e3..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mr.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture mr - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mr", "default", { - name: "mr", - englishName: "Marathi", - nativeName: "मराठी", - language: "mr", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["रविवार","सोमवार","मंगळवार","बà¥à¤§à¤µà¤¾à¤°","गà¥à¤°à¥à¤µà¤¾à¤°","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["रवि.","सोम.","मंगळ.","बà¥à¤§.","गà¥à¤°à¥.","शà¥à¤•à¥à¤°.","शनि."], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवà¥à¤¹à¥‡à¤‚बर","डिसेंबर",""], - namesAbbr: ["जाने.","फेबà¥à¤°à¥.","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚.","ऑकà¥à¤Ÿà¥‹.","नोवà¥à¤¹à¥‡à¤‚.","डिसें.",""] - }, - AM: ["म.पू.","म.पू.","म.पू."], - PM: ["म.नं.","म.नं.","म.नं."], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ms-BN.js b/pub/lib/globalize/cultures/globalize.culture.ms-BN.js deleted file mode 100644 index b9e88c99fe6994aa6d7bbdcb05fb27b37cc03d6b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ms-BN.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Globalize Culture ms-BN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ms-BN", "default", { - name: "ms-BN", - englishName: "Malay (Brunei Darussalam)", - nativeName: "Bahasa Melayu (Brunei Darussalam)", - language: "ms", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - decimals: 0, - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"], - namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"], - namesShort: ["A","I","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ms-MY.js b/pub/lib/globalize/cultures/globalize.culture.ms-MY.js deleted file mode 100644 index 65380965b96a6b2ea05f5f20e1a8f52b73257724..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ms-MY.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture ms-MY - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ms-MY", "default", { - name: "ms-MY", - englishName: "Malay (Malaysia)", - nativeName: "Bahasa Melayu (Malaysia)", - language: "ms", - numberFormat: { - currency: { - decimals: 0, - symbol: "RM" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"], - namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"], - namesShort: ["A","I","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ms.js b/pub/lib/globalize/cultures/globalize.culture.ms.js deleted file mode 100644 index aaf7f736c4923bc4bb045e83fa27ebd34a6f7526..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ms.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture ms - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ms", "default", { - name: "ms", - englishName: "Malay", - nativeName: "Bahasa Melayu", - language: "ms", - numberFormat: { - currency: { - decimals: 0, - symbol: "RM" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"], - namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"], - namesShort: ["A","I","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mt-MT.js b/pub/lib/globalize/cultures/globalize.culture.mt-MT.js deleted file mode 100644 index 17c179a8e694af0af3caa5b99a60eeb19d22957d..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mt-MT.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Globalize Culture mt-MT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mt-MT", "default", { - name: "mt-MT", - englishName: "Maltese (Malta)", - nativeName: "Malti (Malta)", - language: "mt", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ä imgħa","Is-Sibt"], - namesAbbr: ["Ħad","Tne","Tli","Erb","Ħam","Ä im","Sib"], - namesShort: ["I","I","I","L","I","I","I"] - }, - months: { - names: ["Jannar","Frar","Marzu","April","Mejju","Ä unju","Lulju","Awissu","Settembru","Ottubru","Novembru","DiÄ‹embru",""], - namesAbbr: ["Jan","Fra","Mar","Apr","Mej","Ä un","Lul","Awi","Set","Ott","Nov","DiÄ‹",""] - }, - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' ta\\' 'MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' ta\\' 'MMMM yyyy HH:mm", - F: "dddd, d' ta\\' 'MMMM yyyy HH:mm:ss", - M: "d' ta\\' 'MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.mt.js b/pub/lib/globalize/cultures/globalize.culture.mt.js deleted file mode 100644 index 2ea8a463bc9c0a617211cf812039e54eebffd793..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.mt.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Globalize Culture mt - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "mt", "default", { - name: "mt", - englishName: "Maltese", - nativeName: "Malti", - language: "mt", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ä imgħa","Is-Sibt"], - namesAbbr: ["Ħad","Tne","Tli","Erb","Ħam","Ä im","Sib"], - namesShort: ["I","I","I","L","I","I","I"] - }, - months: { - names: ["Jannar","Frar","Marzu","April","Mejju","Ä unju","Lulju","Awissu","Settembru","Ottubru","Novembru","DiÄ‹embru",""], - namesAbbr: ["Jan","Fra","Mar","Apr","Mej","Ä un","Lul","Awi","Set","Ott","Nov","DiÄ‹",""] - }, - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' ta\\' 'MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' ta\\' 'MMMM yyyy HH:mm", - F: "dddd, d' ta\\' 'MMMM yyyy HH:mm:ss", - M: "d' ta\\' 'MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nb-NO.js b/pub/lib/globalize/cultures/globalize.culture.nb-NO.js deleted file mode 100644 index 000610776d5175cffa1a8b348802001d379eef4a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nb-NO.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture nb-NO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nb-NO", "default", { - name: "nb-NO", - englishName: "Norwegian, BokmÃ¥l (Norway)", - nativeName: "norsk, bokmÃ¥l (Norge)", - language: "nb", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nb.js b/pub/lib/globalize/cultures/globalize.culture.nb.js deleted file mode 100644 index 78a6b5fe46b69d3a7c1ba55f2372c7cc17443a96..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nb.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture nb - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nb", "default", { - name: "nb", - englishName: "Norwegian (BokmÃ¥l)", - nativeName: "norsk (bokmÃ¥l)", - language: "nb", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ne-NP.js b/pub/lib/globalize/cultures/globalize.culture.ne-NP.js deleted file mode 100644 index 5343ba9850ff53ddf1718c7a955ef708e88ff369..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ne-NP.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Globalize Culture ne-NP - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ne-NP", "default", { - name: "ne-NP", - englishName: "Nepali (Nepal)", - nativeName: "नेपाली (नेपाल)", - language: "ne", - numberFormat: { - groupSizes: [3,2], - "NaN": "nan", - negativeInfinity: "-infinity", - positiveInfinity: "infinity", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,2] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "रà¥" - } - }, - calendars: { - standard: { - days: { - names: ["आइतवार","सोमवार","मङà¥à¤—लवार","बà¥à¤§à¤µà¤¾à¤°","बिहीवार","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["आइत","सोम","मङà¥à¤—ल","बà¥à¤§","बिही","शà¥à¤•à¥à¤°","शनि"], - namesShort: ["आ","सो","म","बà¥","बि","शà¥","श"] - }, - months: { - names: ["जनवरी","फेबà¥à¤°à¥à¤…री","मारà¥à¤š","अपà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सेपà¥à¤Ÿà¥‡à¤®à¥à¤¬à¤°","अकà¥à¤Ÿà¥‹à¤¬à¤°","नोà¤à¥‡à¤®à¥à¤¬à¤°","डिसेमà¥à¤¬à¤°",""], - namesAbbr: ["जन","फेब","मारà¥à¤š","अपà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¤¾à¤ˆ","अग","सेपà¥à¤Ÿ","अकà¥à¤Ÿ","नोà¤","डिस",""] - }, - AM: ["विहानी","विहानी","विहानी"], - PM: ["बेलà¥à¤•ी","बेलà¥à¤•ी","बेलà¥à¤•ी"], - eras: [{"name":"a.d.","start":null,"offset":0}], - patterns: { - Y: "MMMM,yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ne.js b/pub/lib/globalize/cultures/globalize.culture.ne.js deleted file mode 100644 index ac5b5cca2f58fa5683ba9f7e58056690c1d0df30..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ne.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Globalize Culture ne - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ne", "default", { - name: "ne", - englishName: "Nepali", - nativeName: "नेपाली", - language: "ne", - numberFormat: { - groupSizes: [3,2], - "NaN": "nan", - negativeInfinity: "-infinity", - positiveInfinity: "infinity", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,2] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "रà¥" - } - }, - calendars: { - standard: { - days: { - names: ["आइतवार","सोमवार","मङà¥à¤—लवार","बà¥à¤§à¤µà¤¾à¤°","बिहीवार","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["आइत","सोम","मङà¥à¤—ल","बà¥à¤§","बिही","शà¥à¤•à¥à¤°","शनि"], - namesShort: ["आ","सो","म","बà¥","बि","शà¥","श"] - }, - months: { - names: ["जनवरी","फेबà¥à¤°à¥à¤…री","मारà¥à¤š","अपà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सेपà¥à¤Ÿà¥‡à¤®à¥à¤¬à¤°","अकà¥à¤Ÿà¥‹à¤¬à¤°","नोà¤à¥‡à¤®à¥à¤¬à¤°","डिसेमà¥à¤¬à¤°",""], - namesAbbr: ["जन","फेब","मारà¥à¤š","अपà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¤¾à¤ˆ","अग","सेपà¥à¤Ÿ","अकà¥à¤Ÿ","नोà¤","डिस",""] - }, - AM: ["विहानी","विहानी","विहानी"], - PM: ["बेलà¥à¤•ी","बेलà¥à¤•ी","बेलà¥à¤•ी"], - eras: [{"name":"a.d.","start":null,"offset":0}], - patterns: { - Y: "MMMM,yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nl-BE.js b/pub/lib/globalize/cultures/globalize.culture.nl-BE.js deleted file mode 100644 index c2923a9f6cbdf1aef8157fedb6cefb62c8620310..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nl-BE.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture nl-BE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nl-BE", "default", { - name: "nl-BE", - englishName: "Dutch (Belgium)", - nativeName: "Nederlands (België)", - language: "nl", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NaN (Niet-een-getal)", - negativeInfinity: "-oneindig", - positiveInfinity: "oneindig", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"], - namesAbbr: ["zo","ma","di","wo","do","vr","za"], - namesShort: ["zo","ma","di","wo","do","vr","za"] - }, - months: { - names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nl-NL.js b/pub/lib/globalize/cultures/globalize.culture.nl-NL.js deleted file mode 100644 index 6b0f150229fbb9a5332f5a87c3b04652e40cefe1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nl-NL.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture nl-NL - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nl-NL", "default", { - name: "nl-NL", - englishName: "Dutch (Netherlands)", - nativeName: "Nederlands (Nederland)", - language: "nl", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"], - namesAbbr: ["zo","ma","di","wo","do","vr","za"], - namesShort: ["zo","ma","di","wo","do","vr","za"] - }, - months: { - names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d-M-yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nl.js b/pub/lib/globalize/cultures/globalize.culture.nl.js deleted file mode 100644 index 38aac1d4738be86064bdb6b032e2952bcccc400c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nl.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture nl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nl", "default", { - name: "nl", - englishName: "Dutch", - nativeName: "Nederlands", - language: "nl", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"], - namesAbbr: ["zo","ma","di","wo","do","vr","za"], - namesShort: ["zo","ma","di","wo","do","vr","za"] - }, - months: { - names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d-M-yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nn-NO.js b/pub/lib/globalize/cultures/globalize.culture.nn-NO.js deleted file mode 100644 index 6e91cff877f37a18dcf45cb08a322b1c540dc2c4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nn-NO.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture nn-NO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nn-NO", "default", { - name: "nn-NO", - englishName: "Norwegian, Nynorsk (Norway)", - nativeName: "norsk, nynorsk (Noreg)", - language: "nn", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mÃ¥ndag","tysdag","onsdag","torsdag","fredag","laurdag"], - namesAbbr: ["sø","mÃ¥","ty","on","to","fr","la"], - namesShort: ["sø","mÃ¥","ty","on","to","fr","la"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nn.js b/pub/lib/globalize/cultures/globalize.culture.nn.js deleted file mode 100644 index da10646c21a1530274ef8ceaf4e01e93d7a85458..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nn.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture nn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nn", "default", { - name: "nn", - englishName: "Norwegian (Nynorsk)", - nativeName: "norsk (nynorsk)", - language: "nn", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mÃ¥ndag","tysdag","onsdag","torsdag","fredag","laurdag"], - namesAbbr: ["sø","mÃ¥","ty","on","to","fr","la"], - namesShort: ["sø","mÃ¥","ty","on","to","fr","la"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.no.js b/pub/lib/globalize/cultures/globalize.culture.no.js deleted file mode 100644 index b7b908cf38ebff29f66def053b5294992ddae869..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.no.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture no - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "no", "default", { - name: "no", - englishName: "Norwegian", - nativeName: "norsk", - language: "no", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nso-ZA.js b/pub/lib/globalize/cultures/globalize.culture.nso-ZA.js deleted file mode 100644 index 0037e2396a05544d7661141bd128c0b8eba9b4a2..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nso-ZA.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture nso-ZA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nso-ZA", "default", { - name: "nso-ZA", - englishName: "Sesotho sa Leboa (South Africa)", - nativeName: "Sesotho sa Leboa (Afrika Borwa)", - language: "nso", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Lamorena","MoÅ¡upologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"], - namesAbbr: ["Lam","MoÅ¡","Lbb","Lbr","Lbn","Lbh","Mok"], - namesShort: ["L","M","L","L","L","L","M"] - }, - months: { - names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","NgoatoboÅ¡ego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""], - namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.nso.js b/pub/lib/globalize/cultures/globalize.culture.nso.js deleted file mode 100644 index f4d380f67239726112f3be53ebd5dbb872c07bd5..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.nso.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture nso - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "nso", "default", { - name: "nso", - englishName: "Sesotho sa Leboa", - nativeName: "Sesotho sa Leboa", - language: "nso", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Lamorena","MoÅ¡upologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"], - namesAbbr: ["Lam","MoÅ¡","Lbb","Lbr","Lbn","Lbh","Mok"], - namesShort: ["L","M","L","L","L","L","M"] - }, - months: { - names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","NgoatoboÅ¡ego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""], - namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.oc-FR.js b/pub/lib/globalize/cultures/globalize.culture.oc-FR.js deleted file mode 100644 index b6c91d6ffd3fab46a4466326d0036baa6bb883c9..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.oc-FR.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture oc-FR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "oc-FR", "default", { - name: "oc-FR", - englishName: "Occitan (France)", - nativeName: "Occitan (França)", - language: "oc", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numeric", - negativeInfinity: "-Infinit", - positiveInfinity: "+Infinit", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"], - namesAbbr: ["dim.","lun.","mar.","mèc.","jòu.","ven.","sab."], - namesShort: ["di","lu","ma","mè","jò","ve","sa"] - }, - months: { - names: ["genier","febrier","març","abril","mai","junh","julh","agost","setembre","octobre","novembre","desembre",""], - namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""] - }, - monthsGenitive: { - names: ["de genier","de febrier","de març","d'abril","de mai","de junh","de julh","d'agost","de setembre","d'octobre","de novembre","de desembre",""], - namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""] - }, - AM: null, - PM: null, - eras: [{"name":"après Jèsus-Crist","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd,' lo 'd MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd,' lo 'd MMMM' de 'yyyy HH:mm", - F: "dddd,' lo 'd MMMM' de 'yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.oc.js b/pub/lib/globalize/cultures/globalize.culture.oc.js deleted file mode 100644 index fb492c3e5d2ad4f179541148a47266ac24779862..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.oc.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture oc - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "oc", "default", { - name: "oc", - englishName: "Occitan", - nativeName: "Occitan", - language: "oc", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numeric", - negativeInfinity: "-Infinit", - positiveInfinity: "+Infinit", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"], - namesAbbr: ["dim.","lun.","mar.","mèc.","jòu.","ven.","sab."], - namesShort: ["di","lu","ma","mè","jò","ve","sa"] - }, - months: { - names: ["genier","febrier","març","abril","mai","junh","julh","agost","setembre","octobre","novembre","desembre",""], - namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""] - }, - monthsGenitive: { - names: ["de genier","de febrier","de març","d'abril","de mai","de junh","de julh","d'agost","de setembre","d'octobre","de novembre","de desembre",""], - namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""] - }, - AM: null, - PM: null, - eras: [{"name":"après Jèsus-Crist","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd,' lo 'd MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd,' lo 'd MMMM' de 'yyyy HH:mm", - F: "dddd,' lo 'd MMMM' de 'yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.or-IN.js b/pub/lib/globalize/cultures/globalize.culture.or-IN.js deleted file mode 100644 index 4c5ce570606e3e05c43169af7fdfe91527e085d5..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.or-IN.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Globalize Culture or-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "or-IN", "default", { - name: "or-IN", - englishName: "Oriya (India)", - nativeName: "ଓàœà¬¿à¬† (à¬à¬¾à¬°à¬¤)", - language: "or", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ଟ" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ରବିବାର","ସà‡à¬¾à¬®à¬¬à¬¾à¬°","ମଙàଗଳବାର","ବàଧବାର","ଗàରàବାର","ଶàକàରବାର","ଶନିବାର"], - namesAbbr: ["ରବି.","ସà‡à¬¾à¬®.","ମଙàଗଳ.","ବàଧ.","ଗàରà.","ଶàକàର.","ଶନି."], - namesShort: ["ର","ସà‡à¬¾","ମ","ବà","ଗà","ଶà","ଶ"] - }, - months: { - names: ["ଜାନààŸà¬¾à¬°à€","ଫàରà‡à¬¬àƒàŸà¬¾à¬°à€","ମାରàଚàଚ","à¬à¬ªàରିଲà\u200c","ମà‡","ଜàନà\u200c","ଜàଲାଇ","ଅଗଷàଟ","ସà‡à¬ªàଟà‡à¬®àବର","ଅକàଟà‹à¬¬à¬°","ନà¬à‡à¬®àବର","(ଡିସà‡à¬®àବର",""], - namesAbbr: ["ଜାନààŸà¬¾à¬°à€","ଫàରà‡à¬¬àƒàŸà¬¾à¬°à€","ମାରàଚàଚ","à¬à¬ªàରିଲà\u200c","ମà‡","ଜàନà\u200c","ଜàଲାଇ","ଅଗଷàଟ","ସà‡à¬ªàଟà‡à¬®àବର","ଅକàଟà‹à¬¬à¬°","ନà¬à‡à¬®àବର","(ଡିସà‡à¬®àବର",""] - }, - eras: [{"name":"ଖàରà€à¬·àଟାବàଦ","start":null,"offset":0}], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.or.js b/pub/lib/globalize/cultures/globalize.culture.or.js deleted file mode 100644 index aee0ddf6cfc4d10ee970f9e5d3298bcd3f6b466c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.or.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Globalize Culture or - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "or", "default", { - name: "or", - englishName: "Oriya", - nativeName: "ଓàœà¬¿à¬†", - language: "or", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ଟ" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ରବିବାର","ସà‡à¬¾à¬®à¬¬à¬¾à¬°","ମଙàଗଳବାର","ବàଧବାର","ଗàରàବାର","ଶàକàରବାର","ଶନିବାର"], - namesAbbr: ["ରବି.","ସà‡à¬¾à¬®.","ମଙàଗଳ.","ବàଧ.","ଗàରà.","ଶàକàର.","ଶନି."], - namesShort: ["ର","ସà‡à¬¾","ମ","ବà","ଗà","ଶà","ଶ"] - }, - months: { - names: ["ଜାନààŸà¬¾à¬°à€","ଫàରà‡à¬¬àƒàŸà¬¾à¬°à€","ମାରàଚàଚ","à¬à¬ªàରିଲà\u200c","ମà‡","ଜàନà\u200c","ଜàଲାଇ","ଅଗଷàଟ","ସà‡à¬ªàଟà‡à¬®àବର","ଅକàଟà‹à¬¬à¬°","ନà¬à‡à¬®àବର","(ଡିସà‡à¬®àବର",""], - namesAbbr: ["ଜାନààŸà¬¾à¬°à€","ଫàରà‡à¬¬àƒàŸà¬¾à¬°à€","ମାରàଚàଚ","à¬à¬ªàରିଲà\u200c","ମà‡","ଜàନà\u200c","ଜàଲାଇ","ଅଗଷàଟ","ସà‡à¬ªàଟà‡à¬®àବର","ଅକàଟà‹à¬¬à¬°","ନà¬à‡à¬®àବର","(ଡିସà‡à¬®àବର",""] - }, - eras: [{"name":"ଖàରà€à¬·àଟାବàଦ","start":null,"offset":0}], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.pa-IN.js b/pub/lib/globalize/cultures/globalize.culture.pa-IN.js deleted file mode 100644 index 2c240819dd9623ae7581c1ac15bd062e5ead7bf1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.pa-IN.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture pa-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "pa-IN", "default", { - name: "pa-IN", - englishName: "Punjabi (India)", - nativeName: "ਪੰਜਾਬੀ (à¨à¨¾à¨°à¨¤)", - language: "pa", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ਰà©" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["à¨à¨¤à¨µà¨¾à¨°","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬà©à©±à¨§à¨µà¨¾à¨°","ਵੀਰਵਾਰ","ਸ਼à©à©±à¨•ਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"], - namesAbbr: ["à¨à¨¤.","ਸੋਮ.","ਮੰਗਲ.","ਬà©à©±à¨§.","ਵੀਰ.","ਸ਼à©à¨•ਰ.","ਸ਼ਨਿੱਚਰ."], - namesShort: ["à¨","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"] - }, - months: { - names: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪà©à¨°à©ˆà¨²","ਮਈ","ਜੂਨ","ਜà©à¨²à¨¾à¨ˆ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""], - namesAbbr: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪà©à¨°à©ˆà¨²","ਮਈ","ਜੂਨ","ਜà©à¨²à¨¾à¨ˆ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""] - }, - AM: ["ਸਵੇਰ","ਸਵੇਰ","ਸਵੇਰ"], - PM: ["ਸ਼ਾਮ","ਸ਼ਾਮ","ਸ਼ਾਮ"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy dddd", - t: "tt hh:mm", - T: "tt hh:mm:ss", - f: "dd MMMM yyyy dddd tt hh:mm", - F: "dd MMMM yyyy dddd tt hh:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.pa.js b/pub/lib/globalize/cultures/globalize.culture.pa.js deleted file mode 100644 index f9b804c47398b7368d3c921e91e7b069fb7a5e27..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.pa.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture pa - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "pa", "default", { - name: "pa", - englishName: "Punjabi", - nativeName: "ਪੰਜਾਬੀ", - language: "pa", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ਰà©" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["à¨à¨¤à¨µà¨¾à¨°","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬà©à©±à¨§à¨µà¨¾à¨°","ਵੀਰਵਾਰ","ਸ਼à©à©±à¨•ਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"], - namesAbbr: ["à¨à¨¤.","ਸੋਮ.","ਮੰਗਲ.","ਬà©à©±à¨§.","ਵੀਰ.","ਸ਼à©à¨•ਰ.","ਸ਼ਨਿੱਚਰ."], - namesShort: ["à¨","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"] - }, - months: { - names: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪà©à¨°à©ˆà¨²","ਮਈ","ਜੂਨ","ਜà©à¨²à¨¾à¨ˆ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""], - namesAbbr: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪà©à¨°à©ˆà¨²","ਮਈ","ਜੂਨ","ਜà©à¨²à¨¾à¨ˆ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""] - }, - AM: ["ਸਵੇਰ","ਸਵੇਰ","ਸਵੇਰ"], - PM: ["ਸ਼ਾਮ","ਸ਼ਾਮ","ਸ਼ਾਮ"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy dddd", - t: "tt hh:mm", - T: "tt hh:mm:ss", - f: "dd MMMM yyyy dddd tt hh:mm", - F: "dd MMMM yyyy dddd tt hh:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.pl-PL.js b/pub/lib/globalize/cultures/globalize.culture.pl-PL.js deleted file mode 100644 index fb3149184bbac185cba8f19476dc2f33760cbd0b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.pl-PL.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture pl-PL - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "pl-PL", "default", { - name: "pl-PL", - englishName: "Polish (Poland)", - nativeName: "polski (Polska)", - language: "pl", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "nie jest liczbÄ…", - negativeInfinity: "-nieskoÅ„czoność", - positiveInfinity: "+nieskoÅ„czoność", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "zÅ‚" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["niedziela","poniedziaÅ‚ek","wtorek","Å›roda","czwartek","piÄ…tek","sobota"], - namesAbbr: ["niedz.","pon.","wt.","Å›r.","czw.","pt.","sob."], - namesShort: ["N","Pn","Wt","Åšr","Cz","Pt","So"] - }, - months: { - names: ["styczeÅ„","luty","marzec","kwiecieÅ„","maj","czerwiec","lipiec","sierpieÅ„","wrzesieÅ„","październik","listopad","grudzieÅ„",""], - namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""] - }, - monthsGenitive: { - names: ["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","wrzeÅ›nia","października","listopada","grudnia",""], - namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.pl.js b/pub/lib/globalize/cultures/globalize.culture.pl.js deleted file mode 100644 index 300997522b1be88056378d7a7b689a0156d58621..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.pl.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture pl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "pl", "default", { - name: "pl", - englishName: "Polish", - nativeName: "polski", - language: "pl", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "nie jest liczbÄ…", - negativeInfinity: "-nieskoÅ„czoność", - positiveInfinity: "+nieskoÅ„czoność", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "zÅ‚" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["niedziela","poniedziaÅ‚ek","wtorek","Å›roda","czwartek","piÄ…tek","sobota"], - namesAbbr: ["niedz.","pon.","wt.","Å›r.","czw.","pt.","sob."], - namesShort: ["N","Pn","Wt","Åšr","Cz","Pt","So"] - }, - months: { - names: ["styczeÅ„","luty","marzec","kwiecieÅ„","maj","czerwiec","lipiec","sierpieÅ„","wrzesieÅ„","październik","listopad","grudzieÅ„",""], - namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""] - }, - monthsGenitive: { - names: ["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","wrzeÅ›nia","października","listopada","grudnia",""], - namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.prs-AF.js b/pub/lib/globalize/cultures/globalize.culture.prs-AF.js deleted file mode 100644 index 6191b91df65dfade978694b35f0ff4e8cf8a0cdf..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.prs-AF.js +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Globalize Culture prs-AF - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "prs-AF", "default", { - name: "prs-AF", - englishName: "Dari (Afghanistan)", - nativeName: "درى (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", - language: "prs", - isRTL: true, - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "غ ع", - negativeInfinity: "-∞", - positiveInfinity: "∞", - percent: { - pattern: ["%n-","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$n-","$n"], - symbol: "Ø‹" - } - }, - calendars: { - standard: { - name: "Hijri", - firstDay: 5, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - firstDay: 5, - days: { - names: ["یکشنبه","دوشنبه","سه\u200cشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["یکشنبه","دوشنبه","سه\u200cشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","ليندÛ","مرغومى",""], - namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","ليندÛ","مرغومى",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"Ù„.Ù‡","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy, dd, MMMM, dddd", - f: "yyyy, dd, MMMM, dddd h:mm tt", - F: "yyyy, dd, MMMM, dddd h:mm:ss tt", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.prs.js b/pub/lib/globalize/cultures/globalize.culture.prs.js deleted file mode 100644 index a309c09378153eed1d8ee618d0bf20b5f34592af..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.prs.js +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Globalize Culture prs - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "prs", "default", { - name: "prs", - englishName: "Dari", - nativeName: "درى", - language: "prs", - isRTL: true, - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "غ ع", - negativeInfinity: "-∞", - positiveInfinity: "∞", - percent: { - pattern: ["%n-","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$n-","$n"], - symbol: "Ø‹" - } - }, - calendars: { - standard: { - name: "Hijri", - firstDay: 5, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - firstDay: 5, - days: { - names: ["یکشنبه","دوشنبه","سه\u200cشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["یکشنبه","دوشنبه","سه\u200cشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","ليندÛ","مرغومى",""], - namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","ليندÛ","مرغومى",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"Ù„.Ù‡","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy, dd, MMMM, dddd", - f: "yyyy, dd, MMMM, dddd h:mm tt", - F: "yyyy, dd, MMMM, dddd h:mm:ss tt", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ps-AF.js b/pub/lib/globalize/cultures/globalize.culture.ps-AF.js deleted file mode 100644 index 676bfc2ecf1036817b49474c511488cc8c6cbe02..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ps-AF.js +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Globalize Culture ps-AF - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ps-AF", "default", { - name: "ps-AF", - englishName: "Pashto (Afghanistan)", - nativeName: "پښتو (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", - language: "ps", - isRTL: true, - numberFormat: { - pattern: ["n-"], - ",": "ØŒ", - ".": ",", - "NaN": "غ ع", - negativeInfinity: "-∞", - positiveInfinity: "∞", - percent: { - pattern: ["%n-","%n"], - ",": "ØŒ", - ".": "," - }, - currency: { - pattern: ["$n-","$n"], - ",": "Ù¬", - ".": "Ù«", - symbol: "Ø‹" - } - }, - calendars: { - standard: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["یکشنبه","دوشنبه","سه\u200cشنبه","چارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["یکشنبه","دوشنبه","سه\u200cشنبه","چارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښزمرى","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","لنڈ Û","مرغومى",""], - namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا Úš","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","لنڈ Û","مرغومى",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"Ù„.Ù‡","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy, dd, MMMM, dddd", - f: "yyyy, dd, MMMM, dddd h:mm tt", - F: "yyyy, dd, MMMM, dddd h:mm:ss tt", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ps.js b/pub/lib/globalize/cultures/globalize.culture.ps.js deleted file mode 100644 index e6c766ccd7211361342ff1d475a78f82d51384ab..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ps.js +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Globalize Culture ps - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ps", "default", { - name: "ps", - englishName: "Pashto", - nativeName: "پښتو", - language: "ps", - isRTL: true, - numberFormat: { - pattern: ["n-"], - ",": "ØŒ", - ".": ",", - "NaN": "غ ع", - negativeInfinity: "-∞", - positiveInfinity: "∞", - percent: { - pattern: ["%n-","%n"], - ",": "ØŒ", - ".": "," - }, - currency: { - pattern: ["$n-","$n"], - ",": "Ù¬", - ".": "Ù«", - symbol: "Ø‹" - } - }, - calendars: { - standard: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["یکشنبه","دوشنبه","سه\u200cشنبه","چارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["یکشنبه","دوشنبه","سه\u200cشنبه","چارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښزمرى","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","لنڈ Û","مرغومى",""], - namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا Úš","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","لنڈ Û","مرغومى",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"Ù„.Ù‡","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy, dd, MMMM, dddd", - f: "yyyy, dd, MMMM, dddd h:mm tt", - F: "yyyy, dd, MMMM, dddd h:mm:ss tt", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.pt-BR.js b/pub/lib/globalize/cultures/globalize.culture.pt-BR.js deleted file mode 100644 index 36883fe3455a5b98397ec51826d775b914a71b72..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.pt-BR.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture pt-BR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "pt-BR", "default", { - name: "pt-BR", - englishName: "Portuguese (Brazil)", - nativeName: "Português (Brasil)", - language: "pt", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NaN (Não é um número)", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "R$" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"], - namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"], - namesShort: ["D","S","T","Q","Q","S","S"] - }, - months: { - names: ["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""], - namesAbbr: ["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' de 'MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' de 'MMMM' de 'yyyy HH:mm", - F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss", - M: "dd' de 'MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.pt-PT.js b/pub/lib/globalize/cultures/globalize.culture.pt-PT.js deleted file mode 100644 index 321c6296f34a92a7a3076775218eb280e13d10bd..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.pt-PT.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture pt-PT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "pt-PT", "default", { - name: "pt-PT", - englishName: "Portuguese (Portugal)", - nativeName: "português (Portugal)", - language: "pt", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NaN (Não é um número)", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"], - namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"], - namesShort: ["D","S","T","Q","Q","S","S"] - }, - months: { - names: ["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro",""], - namesAbbr: ["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "dddd, d' de 'MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' de 'MMMM' de 'yyyy HH:mm", - F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss", - M: "d/M", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.pt.js b/pub/lib/globalize/cultures/globalize.culture.pt.js deleted file mode 100644 index a9957e4481a873da9e2140f6656a7cbf465daa16..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.pt.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture pt - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "pt", "default", { - name: "pt", - englishName: "Portuguese", - nativeName: "Português", - language: "pt", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NaN (Não é um número)", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "R$" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"], - namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"], - namesShort: ["D","S","T","Q","Q","S","S"] - }, - months: { - names: ["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""], - namesAbbr: ["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' de 'MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' de 'MMMM' de 'yyyy HH:mm", - F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss", - M: "dd' de 'MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.qut-GT.js b/pub/lib/globalize/cultures/globalize.culture.qut-GT.js deleted file mode 100644 index 5f4294d3322f76969ec5fb41025eca73da2c1e5e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.qut-GT.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Globalize Culture qut-GT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "qut-GT", "default", { - name: "qut-GT", - englishName: "K'iche (Guatemala)", - nativeName: "K'iche (Guatemala)", - language: "qut", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - symbol: "Q" - } - }, - calendars: { - standard: { - days: { - names: ["juq'ij","kaq'ij","oxq'ij","kajq'ij","joq'ij","waqq'ij","wuqq'ij"], - namesAbbr: ["juq","kaq","oxq","kajq","joq","waqq","wuqq"], - namesShort: ["ju","ka","ox","ka","jo","wa","wu"] - }, - months: { - names: ["nab'e ik'","ukab' ik'","rox ik'","ukaj ik'","uro' ik'","uwaq ik'","uwuq ik'","uwajxaq ik'","ub'elej ik'","ulaj ik'","ujulaj ik'","ukab'laj ik'",""], - namesAbbr: ["nab'e","ukab","rox","ukaj","uro","uwaq","uwuq","uwajxaq","ub'elej","ulaj","ujulaj","ukab'laj",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.qut.js b/pub/lib/globalize/cultures/globalize.culture.qut.js deleted file mode 100644 index 44a0ac5e27c83377d09026b7a14501f893f285a2..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.qut.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Globalize Culture qut - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "qut", "default", { - name: "qut", - englishName: "K'iche", - nativeName: "K'iche", - language: "qut", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - symbol: "Q" - } - }, - calendars: { - standard: { - days: { - names: ["juq'ij","kaq'ij","oxq'ij","kajq'ij","joq'ij","waqq'ij","wuqq'ij"], - namesAbbr: ["juq","kaq","oxq","kajq","joq","waqq","wuqq"], - namesShort: ["ju","ka","ox","ka","jo","wa","wu"] - }, - months: { - names: ["nab'e ik'","ukab' ik'","rox ik'","ukaj ik'","uro' ik'","uwaq ik'","uwuq ik'","uwajxaq ik'","ub'elej ik'","ulaj ik'","ujulaj ik'","ukab'laj ik'",""], - namesAbbr: ["nab'e","ukab","rox","ukaj","uro","uwaq","uwuq","uwajxaq","ub'elej","ulaj","ujulaj","ukab'laj",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.quz-BO.js b/pub/lib/globalize/cultures/globalize.culture.quz-BO.js deleted file mode 100644 index 9e1d31f8cde3d26f891b40dede668b7d8fc8c0e4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.quz-BO.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Globalize Culture quz-BO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "quz-BO", "default", { - name: "quz-BO", - englishName: "Quechua (Bolivia)", - nativeName: "runasimi (Qullasuyu)", - language: "quz", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "$b" - } - }, - calendars: { - standard: { - days: { - names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"], - namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"], - namesShort: ["d","k","a","m","h","b","k"] - }, - months: { - names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""], - namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.quz-EC.js b/pub/lib/globalize/cultures/globalize.culture.quz-EC.js deleted file mode 100644 index 72bd712db31258b79bd7ba2a8524bb07e58f2572..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.quz-EC.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture quz-EC - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "quz-EC", "default", { - name: "quz-EC", - englishName: "Quechua (Ecuador)", - nativeName: "runasimi (Ecuador)", - language: "quz", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - days: { - names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"], - namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"], - namesShort: ["d","k","a","m","h","b","k"] - }, - months: { - names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""], - namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.quz-PE.js b/pub/lib/globalize/cultures/globalize.culture.quz-PE.js deleted file mode 100644 index cfe9725fd7916e22f6de6ffb8f93f7860ceae2b4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.quz-PE.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Globalize Culture quz-PE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "quz-PE", "default", { - name: "quz-PE", - englishName: "Quechua (Peru)", - nativeName: "runasimi (Piruw)", - language: "quz", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$ -n","$ n"], - symbol: "S/." - } - }, - calendars: { - standard: { - days: { - names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"], - namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"], - namesShort: ["d","k","a","m","h","b","k"] - }, - months: { - names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""], - namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.quz.js b/pub/lib/globalize/cultures/globalize.culture.quz.js deleted file mode 100644 index 79b0f80aa3c5f8a94db6d06ee9116e084632c2aa..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.quz.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Globalize Culture quz - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "quz", "default", { - name: "quz", - englishName: "Quechua", - nativeName: "runasimi", - language: "quz", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "$b" - } - }, - calendars: { - standard: { - days: { - names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"], - namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"], - namesShort: ["d","k","a","m","h","b","k"] - }, - months: { - names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""], - namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.rm-CH.js b/pub/lib/globalize/cultures/globalize.culture.rm-CH.js deleted file mode 100644 index aa0dcf022adf043c1431486d05e594970fa468ed..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.rm-CH.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture rm-CH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "rm-CH", "default", { - name: "rm-CH", - englishName: "Romansh (Switzerland)", - nativeName: "Rumantsch (Svizra)", - language: "rm", - numberFormat: { - ",": "'", - "NaN": "betg def.", - negativeInfinity: "-infinit", - positiveInfinity: "+infinit", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "fr." - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dumengia","glindesdi","mardi","mesemna","gievgia","venderdi","sonda"], - namesAbbr: ["du","gli","ma","me","gie","ve","so"], - namesShort: ["du","gli","ma","me","gie","ve","so"] - }, - months: { - names: ["schaner","favrer","mars","avrigl","matg","zercladur","fanadur","avust","settember","october","november","december",""], - namesAbbr: ["schan","favr","mars","avr","matg","zercl","fan","avust","sett","oct","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"s. Cr.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d MMMM yyyy HH:mm", - F: "dddd, d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.rm.js b/pub/lib/globalize/cultures/globalize.culture.rm.js deleted file mode 100644 index 0b39881db7118ca611404f2770c1ff9fb8c1f129..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.rm.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture rm - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "rm", "default", { - name: "rm", - englishName: "Romansh", - nativeName: "Rumantsch", - language: "rm", - numberFormat: { - ",": "'", - "NaN": "betg def.", - negativeInfinity: "-infinit", - positiveInfinity: "+infinit", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "fr." - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dumengia","glindesdi","mardi","mesemna","gievgia","venderdi","sonda"], - namesAbbr: ["du","gli","ma","me","gie","ve","so"], - namesShort: ["du","gli","ma","me","gie","ve","so"] - }, - months: { - names: ["schaner","favrer","mars","avrigl","matg","zercladur","fanadur","avust","settember","october","november","december",""], - namesAbbr: ["schan","favr","mars","avr","matg","zercl","fan","avust","sett","oct","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"s. Cr.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d MMMM yyyy HH:mm", - F: "dddd, d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ro-RO.js b/pub/lib/globalize/cultures/globalize.culture.ro-RO.js deleted file mode 100644 index 1335db4eee21a48025da61983b43c09cb8208d31..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ro-RO.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture ro-RO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ro-RO", "default", { - name: "ro-RO", - englishName: "Romanian (Romania)", - nativeName: "română (România)", - language: "ro", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "lei" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["duminică","luni","marÅ£i","miercuri","joi","vineri","sâmbătă"], - namesAbbr: ["D","L","Ma","Mi","J","V","S"], - namesShort: ["D","L","Ma","Mi","J","V","S"] - }, - months: { - names: ["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""], - namesAbbr: ["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ro.js b/pub/lib/globalize/cultures/globalize.culture.ro.js deleted file mode 100644 index 6952e4cd0148270a6f62036e6d92079e6e5efbda..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ro.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture ro - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ro", "default", { - name: "ro", - englishName: "Romanian", - nativeName: "română", - language: "ro", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "lei" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["duminică","luni","marÅ£i","miercuri","joi","vineri","sâmbătă"], - namesAbbr: ["D","L","Ma","Mi","J","V","S"], - namesShort: ["D","L","Ma","Mi","J","V","S"] - }, - months: { - names: ["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""], - namesAbbr: ["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ru-RU.js b/pub/lib/globalize/cultures/globalize.culture.ru-RU.js deleted file mode 100644 index 5e246b4dca7923e2dcffc46f735836a754f45dc3..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ru-RU.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Globalize Culture ru-RU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ru-RU", "default", { - name: "ru-RU", - englishName: "Russian (Russia)", - nativeName: "руÑÑкий (РоÑÑиÑ)", - language: "ru", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["воÑкреÑенье","понедельник","вторник","Ñреда","четверг","пÑтница","Ñуббота"], - namesAbbr: ["Ð’Ñ","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"], - namesShort: ["Ð’Ñ","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"] - }, - months: { - names: ["Январь","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Ñнв","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - monthsGenitive: { - names: ["ÑнварÑ","февралÑ","марта","апрелÑ","маÑ","июнÑ","июлÑ","авгуÑта","ÑентÑбрÑ","октÑбрÑ","ноÑбрÑ","декабрÑ",""], - namesAbbr: ["Ñнв","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy 'г.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'г.' H:mm", - F: "d MMMM yyyy 'г.' H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ru.js b/pub/lib/globalize/cultures/globalize.culture.ru.js deleted file mode 100644 index 5f523659e391c48d57438378e7df2cfe3b72ddfe..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ru.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Globalize Culture ru - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ru", "default", { - name: "ru", - englishName: "Russian", - nativeName: "руÑÑкий", - language: "ru", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["воÑкреÑенье","понедельник","вторник","Ñреда","четверг","пÑтница","Ñуббота"], - namesAbbr: ["Ð’Ñ","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"], - namesShort: ["Ð’Ñ","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"] - }, - months: { - names: ["Январь","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Ñнв","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - monthsGenitive: { - names: ["ÑнварÑ","февралÑ","марта","апрелÑ","маÑ","июнÑ","июлÑ","авгуÑта","ÑентÑбрÑ","октÑбрÑ","ноÑбрÑ","декабрÑ",""], - namesAbbr: ["Ñнв","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy 'г.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'г.' H:mm", - F: "d MMMM yyyy 'г.' H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.rw-RW.js b/pub/lib/globalize/cultures/globalize.culture.rw-RW.js deleted file mode 100644 index 71345fa4de7ff756e12199c6c56d533ecbd3d71b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.rw-RW.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Globalize Culture rw-RW - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "rw-RW", "default", { - name: "rw-RW", - englishName: "Kinyarwanda (Rwanda)", - nativeName: "Kinyarwanda (Rwanda)", - language: "rw", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$-n","$ n"], - ",": " ", - ".": ",", - symbol: "RWF" - } - }, - calendars: { - standard: { - days: { - names: ["Ku wa mbere","Ku wa kabiri","Ku wa gatatu","Ku wa kane","Ku wa gatanu","Ku wa gatandatu","Ku cyumweru"], - namesAbbr: ["mbe.","kab.","gat.","kan.","gat.","gat.","cyu."], - namesShort: ["mb","ka","ga","ka","ga","ga","cy"] - }, - months: { - names: ["Mutarama","Gashyantare","Werurwe","Mata","Gicurasi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza",""], - namesAbbr: ["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukwa","Ugu","Uku",""] - }, - AM: ["saa moya z.m.","saa moya z.m.","SAA MOYA Z.M."], - PM: ["saa moya z.n.","saa moya z.n.","SAA MOYA Z.N."], - eras: [{"name":"AD","start":null,"offset":0}] - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.rw.js b/pub/lib/globalize/cultures/globalize.culture.rw.js deleted file mode 100644 index 94155def7cb2b56bb73201692dee822c85828080..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.rw.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Globalize Culture rw - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "rw", "default", { - name: "rw", - englishName: "Kinyarwanda", - nativeName: "Kinyarwanda", - language: "rw", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$-n","$ n"], - ",": " ", - ".": ",", - symbol: "RWF" - } - }, - calendars: { - standard: { - days: { - names: ["Ku wa mbere","Ku wa kabiri","Ku wa gatatu","Ku wa kane","Ku wa gatanu","Ku wa gatandatu","Ku cyumweru"], - namesAbbr: ["mbe.","kab.","gat.","kan.","gat.","gat.","cyu."], - namesShort: ["mb","ka","ga","ka","ga","ga","cy"] - }, - months: { - names: ["Mutarama","Gashyantare","Werurwe","Mata","Gicurasi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza",""], - namesAbbr: ["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukwa","Ugu","Uku",""] - }, - AM: ["saa moya z.m.","saa moya z.m.","SAA MOYA Z.M."], - PM: ["saa moya z.n.","saa moya z.n.","SAA MOYA Z.N."], - eras: [{"name":"AD","start":null,"offset":0}] - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sa-IN.js b/pub/lib/globalize/cultures/globalize.culture.sa-IN.js deleted file mode 100644 index c9ba68490f6f98b722bc4378a5ac54f4c0dbb234..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sa-IN.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Globalize Culture sa-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sa-IN", "default", { - name: "sa-IN", - englishName: "Sanskrit (India)", - nativeName: "संसà¥à¤•ृत (à¤à¤¾à¤°à¤¤à¤®à¥)", - language: "sa", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["रविवासरः","सोमवासरः","मङà¥à¤—लवासरः","बà¥à¤§à¤µà¤¾à¤¸à¤°à¤ƒ","गà¥à¤°à¥à¤µà¤¾à¤¸à¤°à¤ƒ","शà¥à¤•à¥à¤°à¤µà¤¾à¤¸à¤°à¤ƒ","शनिवासरः"], - namesAbbr: ["रविवासरः","सोमवासरः","मङà¥à¤—लवासरः","बà¥à¤§à¤µà¤¾à¤¸à¤°à¤ƒ","गà¥à¤°à¥à¤µà¤¾à¤¸à¤°à¤ƒ","शà¥à¤•à¥à¤°à¤µà¤¾à¤¸à¤°à¤ƒ","शनिवासरः"], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""], - namesAbbr: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""] - }, - AM: ["पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨"], - PM: ["अपराहà¥à¤¨","अपराहà¥à¤¨","अपराहà¥à¤¨"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy dddd", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy dddd HH:mm", - F: "dd MMMM yyyy dddd HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sa.js b/pub/lib/globalize/cultures/globalize.culture.sa.js deleted file mode 100644 index ad1ec93262bdf2b2715a8450c77ecc1ff5ac9cf6..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sa.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Globalize Culture sa - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sa", "default", { - name: "sa", - englishName: "Sanskrit", - nativeName: "संसà¥à¤•ृत", - language: "sa", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["रविवासरः","सोमवासरः","मङà¥à¤—लवासरः","बà¥à¤§à¤µà¤¾à¤¸à¤°à¤ƒ","गà¥à¤°à¥à¤µà¤¾à¤¸à¤°à¤ƒ","शà¥à¤•à¥à¤°à¤µà¤¾à¤¸à¤°à¤ƒ","शनिवासरः"], - namesAbbr: ["रविवासरः","सोमवासरः","मङà¥à¤—लवासरः","बà¥à¤§à¤µà¤¾à¤¸à¤°à¤ƒ","गà¥à¤°à¥à¤µà¤¾à¤¸à¤°à¤ƒ","शà¥à¤•à¥à¤°à¤µà¤¾à¤¸à¤°à¤ƒ","शनिवासरः"], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""], - namesAbbr: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""] - }, - AM: ["पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨"], - PM: ["अपराहà¥à¤¨","अपराहà¥à¤¨","अपराहà¥à¤¨"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy dddd", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy dddd HH:mm", - F: "dd MMMM yyyy dddd HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sah-RU.js b/pub/lib/globalize/cultures/globalize.culture.sah-RU.js deleted file mode 100644 index d0ba553cc6cc21d16e26fbfa3cff5cbd31a59e1f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sah-RU.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture sah-RU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sah-RU", "default", { - name: "sah-RU", - englishName: "Yakut (Russia)", - nativeName: "Ñаха (РоÑÑиÑ)", - language: "sah", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "NAN", - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "Ñ." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["баÑкыһыанньа","бÑнидиÑнньик","оптуорунньук","ÑÑÑ€ÑдÑ","чÑппиÑÑ€","бÑÑтинÑÑ","Ñубуота"], - namesAbbr: ["БÑ","Бн","Оп","Ср","Чп","Бт","Сб"], - namesShort: ["БÑ","Бн","Оп","Ср","Чп","Бт","Сб"] - }, - months: { - names: ["ТохÑунньу","Олунньу","Кулун тутар","ÐœÑƒÑƒÑ ÑƒÑтар","Ыам ыйа","БÑÑ Ñ‹Ð¹Ð°","От ыйа","Ðтырдьах ыйа","Балаҕан ыйа","Ðлтынньы","СÑтинньи","ÐÑ…Ñынньы",""], - namesAbbr: ["тхÑ","олн","кул","мÑÑ‚","ыам","бÑÑ","отй","атр","блҕ","алт","Ñтн","ахÑ",""] - }, - monthsGenitive: { - names: ["тохÑунньу","олунньу","кулун тутар","Ð¼ÑƒÑƒÑ ÑƒÑтар","ыам ыйын","бÑÑ Ñ‹Ð¹Ñ‹Ð½","от ыйын","атырдьах ыйын","балаҕан ыйын","алтынньы","ÑÑтинньи","ахÑынньы",""], - namesAbbr: ["тхÑ","олн","кул","мÑÑ‚","ыам","бÑÑ","отй","атр","блҕ","алт","Ñтн","ахÑ",""] - }, - AM: null, - PM: null, - patterns: { - d: "MM.dd.yyyy", - D: "MMMM d yyyy 'Ñ.'", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d yyyy 'Ñ.' H:mm", - F: "MMMM d yyyy 'Ñ.' H:mm:ss", - Y: "MMMM yyyy 'Ñ.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sah.js b/pub/lib/globalize/cultures/globalize.culture.sah.js deleted file mode 100644 index d79571f5fa993264906b7af8064f22bde43e60b1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sah.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture sah - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sah", "default", { - name: "sah", - englishName: "Yakut", - nativeName: "Ñаха", - language: "sah", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "NAN", - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "Ñ." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["баÑкыһыанньа","бÑнидиÑнньик","оптуорунньук","ÑÑÑ€ÑдÑ","чÑппиÑÑ€","бÑÑтинÑÑ","Ñубуота"], - namesAbbr: ["БÑ","Бн","Оп","Ср","Чп","Бт","Сб"], - namesShort: ["БÑ","Бн","Оп","Ср","Чп","Бт","Сб"] - }, - months: { - names: ["ТохÑунньу","Олунньу","Кулун тутар","ÐœÑƒÑƒÑ ÑƒÑтар","Ыам ыйа","БÑÑ Ñ‹Ð¹Ð°","От ыйа","Ðтырдьах ыйа","Балаҕан ыйа","Ðлтынньы","СÑтинньи","ÐÑ…Ñынньы",""], - namesAbbr: ["тхÑ","олн","кул","мÑÑ‚","ыам","бÑÑ","отй","атр","блҕ","алт","Ñтн","ахÑ",""] - }, - monthsGenitive: { - names: ["тохÑунньу","олунньу","кулун тутар","Ð¼ÑƒÑƒÑ ÑƒÑтар","ыам ыйын","бÑÑ Ñ‹Ð¹Ñ‹Ð½","от ыйын","атырдьах ыйын","балаҕан ыйын","алтынньы","ÑÑтинньи","ахÑынньы",""], - namesAbbr: ["тхÑ","олн","кул","мÑÑ‚","ыам","бÑÑ","отй","атр","блҕ","алт","Ñтн","ахÑ",""] - }, - AM: null, - PM: null, - patterns: { - d: "MM.dd.yyyy", - D: "MMMM d yyyy 'Ñ.'", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d yyyy 'Ñ.' H:mm", - F: "MMMM d yyyy 'Ñ.' H:mm:ss", - Y: "MMMM yyyy 'Ñ.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.se-FI.js b/pub/lib/globalize/cultures/globalize.culture.se-FI.js deleted file mode 100644 index 9d4ee4fabe987b665a067701288e1eacfead9b2b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.se-FI.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture se-FI - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "se-FI", "default", { - name: "se-FI", - englishName: "Sami, Northern (Finland)", - nativeName: "davvisámegiella (Suopma)", - language: "se", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"], - namesAbbr: ["sotn","vuos","maÅ‹","gask","duor","bear","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["ođđajagemánnu","guovvamánnu","njukÄamánnu","cuoÅ‹ománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","ÄakÄamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - monthsGenitive: { - names: ["ođđajagimánu","guovvamánu","njukÄamánu","cuoÅ‹ománu","miessemánu","geassemánu","suoidnemánu","borgemánu","ÄakÄamánu","golggotmánu","skábmamánu","juovlamánu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. b. 'yyyy H:mm", - F: "MMMM d'. b. 'yyyy H:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.se-NO.js b/pub/lib/globalize/cultures/globalize.culture.se-NO.js deleted file mode 100644 index 07c0a3616f798d822ce3aeef3c885f4b754ab3e9..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.se-NO.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture se-NO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "se-NO", "default", { - name: "se-NO", - englishName: "Sami, Northern (Norway)", - nativeName: "davvisámegiella (Norga)", - language: "se", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"], - namesAbbr: ["sotn","vuos","maÅ‹","gask","duor","bear","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["ođđajagemánnu","guovvamánnu","njukÄamánnu","cuoÅ‹ománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","ÄakÄamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - monthsGenitive: { - names: ["ođđajagimánu","guovvamánu","njukÄamánu","cuoÅ‹ománu","miessemánu","geassemánu","suoidnemánu","borgemánu","ÄakÄamánu","golggotmánu","skábmamánu","juovlamánu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.se-SE.js b/pub/lib/globalize/cultures/globalize.culture.se-SE.js deleted file mode 100644 index a1031090d7a21801abbbc0c4641338ab365cb4b2..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.se-SE.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture se-SE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "se-SE", "default", { - name: "se-SE", - englishName: "Sami, Northern (Sweden)", - nativeName: "davvisámegiella (Ruoŧŧa)", - language: "se", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sotnabeaivi","mánnodat","disdat","gaskavahkku","duorastat","bearjadat","lávvardat"], - namesAbbr: ["sotn","mán","dis","gask","duor","bear","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["ođđajagemánnu","guovvamánnu","njukÄamánnu","cuoÅ‹ománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","ÄakÄamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - monthsGenitive: { - names: ["ođđajagimánu","guovvamánu","njukÄamánu","cuoÅ‹ománu","miessemánu","geassemánu","suoidnemánu","borgemánu","ÄakÄamánu","golggotmánu","skábmamánu","juovlamánu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.se.js b/pub/lib/globalize/cultures/globalize.culture.se.js deleted file mode 100644 index 9327f03ba5d07d02075ca8b33269e977463d48f7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.se.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture se - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "se", "default", { - name: "se", - englishName: "Sami (Northern)", - nativeName: "davvisámegiella", - language: "se", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"], - namesAbbr: ["sotn","vuos","maÅ‹","gask","duor","bear","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["ođđajagemánnu","guovvamánnu","njukÄamánnu","cuoÅ‹ománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","ÄakÄamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - monthsGenitive: { - names: ["ođđajagimánu","guovvamánu","njukÄamánu","cuoÅ‹ománu","miessemánu","geassemánu","suoidnemánu","borgemánu","ÄakÄamánu","golggotmánu","skábmamánu","juovlamánu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.si-LK.js b/pub/lib/globalize/cultures/globalize.culture.si-LK.js deleted file mode 100644 index 0dcc6c55d691425d8335d535e4bf1e2011fb9418..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.si-LK.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture si-LK - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "si-LK", "default", { - name: "si-LK", - englishName: "Sinhala (Sri Lanka)", - nativeName: "සිංහල (à·à·Š\u200dරී ලංකà·)", - language: "si", - numberFormat: { - groupSizes: [3,2], - negativeInfinity: "-අනන්à¶à¶º", - positiveInfinity: "අනන්à¶à¶º", - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["($ n)","$ n"], - symbol: "රු." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ඉරිදà·","සඳුදà·","අඟහරුවà·à¶¯à·","බදà·à¶¯à·","à¶¶à·Š\u200dරහස්පà¶à·’න්දà·","සිකුරà·à¶¯à·","සෙනසුරà·à¶¯à·"], - namesAbbr: ["ඉරිදà·","සඳුදà·","කුජදà·","බුදදà·","ගුරුදà·","කිවිදà·","à·à¶±à·’දà·"], - namesShort: ["ඉ","à·ƒ","à¶…","à¶¶","à¶¶à·Š\u200dà¶»","සි","සෙ"] - }, - months: { - names: ["ජනවà·à¶»à·’","පෙබරවà·à¶»à·’","මà·à¶»à·Šà¶à·”","à¶…\u200cà¶´à·Š\u200dරේල්","මà·à¶ºà·’","ජූනි","ජූලි","à¶…\u200cà¶œà·à·ƒà·Šà¶à·”","à·ƒà·à¶´à·Šà¶à·à¶¸à·Šà¶¶à¶»à·Š","ඔක්à¶à·à¶¶à¶»à·Š","නොවà·à¶¸à·Šà¶¶à¶»à·Š","දෙසà·à¶¸à·Šà¶¶à¶»à·Š",""], - namesAbbr: ["ජන.","පෙබ.","මà·à¶»à·Šà¶à·”.","à¶…à¶´à·Š\u200dරේල්.","මà·à¶ºà·’.","ජූනි.","ජූලි.","à¶…à¶œà·.","à·ƒà·à¶´à·Š.","ඔක්.","නොවà·.","දෙසà·.",""] - }, - AM: ["à¶´à·™.à·€.","à¶´à·™.à·€.","à¶´à·™.à·€."], - PM: ["à¶´.à·€.","à¶´.à·€.","à¶´.à·€."], - eras: [{"name":"à¶šà·Š\u200dරි.à·€.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd", - f: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd h:mm tt", - F: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd h:mm:ss tt", - Y: "yyyy MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.si.js b/pub/lib/globalize/cultures/globalize.culture.si.js deleted file mode 100644 index d6fb518b90aae8a45c1d391f10e7166370239f37..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.si.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture si - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "si", "default", { - name: "si", - englishName: "Sinhala", - nativeName: "සිංහල", - language: "si", - numberFormat: { - groupSizes: [3,2], - negativeInfinity: "-අනන්à¶à¶º", - positiveInfinity: "අනන්à¶à¶º", - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["($ n)","$ n"], - symbol: "රු." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ඉරිදà·","සඳුදà·","අඟහරුවà·à¶¯à·","බදà·à¶¯à·","à¶¶à·Š\u200dරහස්පà¶à·’න්දà·","සිකුරà·à¶¯à·","සෙනසුරà·à¶¯à·"], - namesAbbr: ["ඉරිදà·","සඳුදà·","කුජදà·","බුදදà·","ගුරුදà·","කිවිදà·","à·à¶±à·’දà·"], - namesShort: ["ඉ","à·ƒ","à¶…","à¶¶","à¶¶à·Š\u200dà¶»","සි","සෙ"] - }, - months: { - names: ["ජනවà·à¶»à·’","පෙබරවà·à¶»à·’","මà·à¶»à·Šà¶à·”","à¶…\u200cà¶´à·Š\u200dරේල්","මà·à¶ºà·’","ජූනි","ජූලි","à¶…\u200cà¶œà·à·ƒà·Šà¶à·”","à·ƒà·à¶´à·Šà¶à·à¶¸à·Šà¶¶à¶»à·Š","ඔක්à¶à·à¶¶à¶»à·Š","නොවà·à¶¸à·Šà¶¶à¶»à·Š","දෙසà·à¶¸à·Šà¶¶à¶»à·Š",""], - namesAbbr: ["ජන.","පෙබ.","මà·à¶»à·Šà¶à·”.","à¶…à¶´à·Š\u200dරේල්.","මà·à¶ºà·’.","ජූනි.","ජූලි.","à¶…à¶œà·.","à·ƒà·à¶´à·Š.","ඔක්.","නොවà·.","දෙසà·.",""] - }, - AM: ["à¶´à·™.à·€.","à¶´à·™.à·€.","à¶´à·™.à·€."], - PM: ["à¶´.à·€.","à¶´.à·€.","à¶´.à·€."], - eras: [{"name":"à¶šà·Š\u200dරි.à·€.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd", - f: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd h:mm tt", - F: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd h:mm:ss tt", - Y: "yyyy MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sk-SK.js b/pub/lib/globalize/cultures/globalize.culture.sk-SK.js deleted file mode 100644 index 708a7aae8a5070435af031c7d3c73f3ab5b8c9d0..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sk-SK.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Globalize Culture sk-SK - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sk-SK", "default", { - name: "sk-SK", - englishName: "Slovak (Slovakia)", - nativeName: "slovenÄina (Slovenská republika)", - language: "sk", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Nie je ÄÃslo", - negativeInfinity: "-nekoneÄno", - positiveInfinity: "+nekoneÄno", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["nedeľa","pondelok","utorok","streda","Å¡tvrtok","piatok","sobota"], - namesAbbr: ["ne","po","ut","st","Å¡t","pi","so"], - namesShort: ["ne","po","ut","st","Å¡t","pi","so"] - }, - months: { - names: ["január","február","marec","aprÃl","máj","jún","júl","august","september","október","november","december",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - monthsGenitive: { - names: ["januára","februára","marca","aprÃla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. l.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sk.js b/pub/lib/globalize/cultures/globalize.culture.sk.js deleted file mode 100644 index 2f05718e3ba35c957f999ca4e29d847e3f9b9f44..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sk.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Globalize Culture sk - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sk", "default", { - name: "sk", - englishName: "Slovak", - nativeName: "slovenÄina", - language: "sk", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Nie je ÄÃslo", - negativeInfinity: "-nekoneÄno", - positiveInfinity: "+nekoneÄno", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["nedeľa","pondelok","utorok","streda","Å¡tvrtok","piatok","sobota"], - namesAbbr: ["ne","po","ut","st","Å¡t","pi","so"], - namesShort: ["ne","po","ut","st","Å¡t","pi","so"] - }, - months: { - names: ["január","február","marec","aprÃl","máj","jún","júl","august","september","október","november","december",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - monthsGenitive: { - names: ["januára","februára","marca","aprÃla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. l.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sl-SI.js b/pub/lib/globalize/cultures/globalize.culture.sl-SI.js deleted file mode 100644 index 66b776197ce0f56590fc79599d6eed03add3c79b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sl-SI.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture sl-SI - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sl-SI", "default", { - name: "sl-SI", - englishName: "Slovenian (Slovenia)", - nativeName: "slovenski (Slovenija)", - language: "sl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-neskonÄnost", - positiveInfinity: "neskonÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljek","torek","sreda","Äetrtek","petek","sobota"], - namesAbbr: ["ned","pon","tor","sre","Äet","pet","sob"], - namesShort: ["ne","po","to","sr","Äe","pe","so"] - }, - months: { - names: ["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sl.js b/pub/lib/globalize/cultures/globalize.culture.sl.js deleted file mode 100644 index 94d4d6782cac19a3f7d14b4b68fba4fcab07286a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sl.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture sl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sl", "default", { - name: "sl", - englishName: "Slovenian", - nativeName: "slovenski", - language: "sl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-neskonÄnost", - positiveInfinity: "neskonÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljek","torek","sreda","Äetrtek","petek","sobota"], - namesAbbr: ["ned","pon","tor","sre","Äet","pet","sob"], - namesShort: ["ne","po","to","sr","Äe","pe","so"] - }, - months: { - names: ["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sma-NO.js b/pub/lib/globalize/cultures/globalize.culture.sma-NO.js deleted file mode 100644 index 120607559e38163eccc6f2f75f922eb05836fd4d..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sma-NO.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture sma-NO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sma-NO", "default", { - name: "sma-NO", - englishName: "Sami, Southern (Norway)", - nativeName: "Ã¥arjelsaemiengiele (Nöörje)", - language: "sma", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["aejlege","mÃ¥anta","dæjsta","gaskevÃ¥hkoe","duarsta","bearjadahke","laavvardahke"], - namesAbbr: ["aej","mÃ¥a","dæj","gask","duar","bearj","laav"], - namesShort: ["a","m","d","g","d","b","l"] - }, - months: { - names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - monthsGenitive: { - names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sma-SE.js b/pub/lib/globalize/cultures/globalize.culture.sma-SE.js deleted file mode 100644 index 3c73b5c40c2e10aff41b4267861b4e6ee91859ea..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sma-SE.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sma-SE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sma-SE", "default", { - name: "sma-SE", - englishName: "Sami, Southern (Sweden)", - nativeName: "Ã¥arjelsaemiengiele (Sveerje)", - language: "sma", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["aejlege","mÃ¥anta","dæjsta","gaskevÃ¥hkoe","duarsta","bearjadahke","laavvardahke"], - namesAbbr: ["aej","mÃ¥a","dæj","gask","duar","bearj","laav"], - namesShort: ["a","m","d","g","d","b","l"] - }, - months: { - names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - monthsGenitive: { - names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sma.js b/pub/lib/globalize/cultures/globalize.culture.sma.js deleted file mode 100644 index 16140d5a0d707c5438b2fd192868fed3ac240d20..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sma.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sma - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sma", "default", { - name: "sma", - englishName: "Sami (Southern)", - nativeName: "Ã¥arjelsaemiengiele", - language: "sma", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["aejlege","mÃ¥anta","dæjsta","gaskevÃ¥hkoe","duarsta","bearjadahke","laavvardahke"], - namesAbbr: ["aej","mÃ¥a","dæj","gask","duar","bearj","laav"], - namesShort: ["a","m","d","g","d","b","l"] - }, - months: { - names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - monthsGenitive: { - names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.smj-NO.js b/pub/lib/globalize/cultures/globalize.culture.smj-NO.js deleted file mode 100644 index 5c28cd3c59f32e3eada393fa55cc446d10d6eb32..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.smj-NO.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture smj-NO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "smj-NO", "default", { - name: "smj-NO", - englishName: "Sami, Lule (Norway)", - nativeName: "julevusámegiella (Vuodna)", - language: "smj", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sÃ¥dnÃ¥biejvve","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"], - namesAbbr: ["sÃ¥d","mán","dis","gas","duor","bier","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["Ã¥dÃ¥jakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bÃ¥rggemánno","ragátmánno","gÃ¥lgÃ¥dismánno","basádismánno","javllamánno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - monthsGenitive: { - names: ["Ã¥dÃ¥jakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bÃ¥rggemáno","ragátmáno","gÃ¥lgÃ¥dismáno","basádismáno","javllamáno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.smj-SE.js b/pub/lib/globalize/cultures/globalize.culture.smj-SE.js deleted file mode 100644 index 5dd2b123faffc87b22eb74eb37f9b3c21c5fdd8e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.smj-SE.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture smj-SE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "smj-SE", "default", { - name: "smj-SE", - englishName: "Sami, Lule (Sweden)", - nativeName: "julevusámegiella (Svierik)", - language: "smj", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"], - namesAbbr: ["ájl","mán","dis","gas","duor","bier","láv"], - namesShort: ["á","m","d","g","d","b","l"] - }, - months: { - names: ["Ã¥dÃ¥jakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bÃ¥rggemánno","ragátmánno","gÃ¥lgÃ¥dismánno","basádismánno","javllamánno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - monthsGenitive: { - names: ["Ã¥dÃ¥jakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bÃ¥rggemáno","ragátmáno","gÃ¥lgÃ¥dismáno","basádismáno","javllamáno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.smj.js b/pub/lib/globalize/cultures/globalize.culture.smj.js deleted file mode 100644 index 1b61e4d6ff6c22cef5769906aaff3d65408338bc..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.smj.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture smj - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "smj", "default", { - name: "smj", - englishName: "Sami (Lule)", - nativeName: "julevusámegiella", - language: "smj", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"], - namesAbbr: ["ájl","mán","dis","gas","duor","bier","láv"], - namesShort: ["á","m","d","g","d","b","l"] - }, - months: { - names: ["Ã¥dÃ¥jakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bÃ¥rggemánno","ragátmánno","gÃ¥lgÃ¥dismánno","basádismánno","javllamánno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - monthsGenitive: { - names: ["Ã¥dÃ¥jakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bÃ¥rggemáno","ragátmáno","gÃ¥lgÃ¥dismáno","basádismáno","javllamáno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.smn-FI.js b/pub/lib/globalize/cultures/globalize.culture.smn-FI.js deleted file mode 100644 index 6ca13b8a9b457b37fe6a7a79301560445f98ed2d..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.smn-FI.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture smn-FI - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "smn-FI", "default", { - name: "smn-FI", - englishName: "Sami, Inari (Finland)", - nativeName: "sämikielâ (Suomâ)", - language: "smn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"], - namesAbbr: ["pa","vu","ma","ko","tu","vá","lá"], - namesShort: ["p","v","m","k","t","v","l"] - }, - months: { - names: ["uđđâivemáánu","kuovâmáánu","njuhÄâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","ÄohÄâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu",""], - namesAbbr: ["uÄ‘iv","kuov","njuh","cuoÅ‹","vyes","kesi","syei","porg","Äoh","roov","ska","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. p. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. p. 'yyyy H:mm", - F: "MMMM d'. p. 'yyyy H:mm:ss", - M: "MMMM d'. p. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.smn.js b/pub/lib/globalize/cultures/globalize.culture.smn.js deleted file mode 100644 index c43c7e3da601595ef014a58f59c05aa3259aa1ab..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.smn.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Globalize Culture smn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "smn", "default", { - name: "smn", - englishName: "Sami (Inari)", - nativeName: "sämikielâ", - language: "smn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"], - namesAbbr: ["pa","vu","ma","ko","tu","vá","lá"], - namesShort: ["p","v","m","k","t","v","l"] - }, - months: { - names: ["uđđâivemáánu","kuovâmáánu","njuhÄâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","ÄohÄâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu",""], - namesAbbr: ["uÄ‘iv","kuov","njuh","cuoÅ‹","vyes","kesi","syei","porg","Äoh","roov","ska","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. p. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. p. 'yyyy H:mm", - F: "MMMM d'. p. 'yyyy H:mm:ss", - M: "MMMM d'. p. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sms-FI.js b/pub/lib/globalize/cultures/globalize.culture.sms-FI.js deleted file mode 100644 index 4fa333ca67422cef370f64483090a57648a97452..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sms-FI.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sms-FI - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sms-FI", "default", { - name: "sms-FI", - englishName: "Sami, Skolt (Finland)", - nativeName: "sääm´ǩiõll (Lää´ddjânnam)", - language: "sms", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"], - namesAbbr: ["pâ","vu","mâ","se","ne","pi","su"], - namesShort: ["p","v","m","s","n","p","s"] - }, - months: { - names: ["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhÄÄmään","vue´ssmään","Ç©ie´ssmään","suei´nnmään","på´rǧǧmään","ÄõhÄÄmään","kÃ¥lggmään","skamm´mään","rosttovmään",""], - namesAbbr: ["oÄ‘jm","tä´lvv","pâzl","njuh","vue","Ç©ie","suei","på´r","Äõh","kÃ¥lg","ska","rost",""] - }, - monthsGenitive: { - names: ["ođđee´jjmannu","tä´lvvmannu","pâ´zzlâšttammannu","njuhÄÄmannu","vue´ssmannu","Ç©ie´ssmannu","suei´nnmannu","på´rǧǧmannu","ÄõhÄÄmannu","kÃ¥lggmannu","skamm´mannu","rosttovmannu",""], - namesAbbr: ["oÄ‘jm","tä´lvv","pâzl","njuh","vue","Ç©ie","suei","på´r","Äõh","kÃ¥lg","ska","rost",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. p. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. p. 'yyyy H:mm", - F: "MMMM d'. p. 'yyyy H:mm:ss", - M: "MMMM d'. p. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sms.js b/pub/lib/globalize/cultures/globalize.culture.sms.js deleted file mode 100644 index e71dffa832a0fefcad63606a31c84a7f2e8907dd..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sms.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sms - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sms", "default", { - name: "sms", - englishName: "Sami (Skolt)", - nativeName: "sääm´ǩiõll", - language: "sms", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"], - namesAbbr: ["pâ","vu","mâ","se","ne","pi","su"], - namesShort: ["p","v","m","s","n","p","s"] - }, - months: { - names: ["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhÄÄmään","vue´ssmään","Ç©ie´ssmään","suei´nnmään","på´rǧǧmään","ÄõhÄÄmään","kÃ¥lggmään","skamm´mään","rosttovmään",""], - namesAbbr: ["oÄ‘jm","tä´lvv","pâzl","njuh","vue","Ç©ie","suei","på´r","Äõh","kÃ¥lg","ska","rost",""] - }, - monthsGenitive: { - names: ["ođđee´jjmannu","tä´lvvmannu","pâ´zzlâšttammannu","njuhÄÄmannu","vue´ssmannu","Ç©ie´ssmannu","suei´nnmannu","på´rǧǧmannu","ÄõhÄÄmannu","kÃ¥lggmannu","skamm´mannu","rosttovmannu",""], - namesAbbr: ["oÄ‘jm","tä´lvv","pâzl","njuh","vue","Ç©ie","suei","på´r","Äõh","kÃ¥lg","ska","rost",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. p. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. p. 'yyyy H:mm", - F: "MMMM d'. p. 'yyyy H:mm:ss", - M: "MMMM d'. p. '", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sq-AL.js b/pub/lib/globalize/cultures/globalize.culture.sq-AL.js deleted file mode 100644 index 49435fe3521e04b4284790d2537a620cdf1c0309..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sq-AL.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture sq-AL - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sq-AL", "default", { - name: "sq-AL", - englishName: "Albanian (Albania)", - nativeName: "shqipe (Shqipëria)", - language: "sq", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-infinit", - positiveInfinity: "infinit", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": ".", - ".": ",", - symbol: "Lek" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"], - namesAbbr: ["Die","Hën","Mar","Mër","Enj","Pre","Sht"], - namesShort: ["Di","Hë","Ma","Më","En","Pr","Sh"] - }, - months: { - names: ["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor",""], - namesAbbr: ["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj",""] - }, - AM: ["PD","pd","PD"], - PM: ["MD","md","MD"], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy-MM-dd", - t: "h:mm.tt", - T: "h:mm:ss.tt", - f: "yyyy-MM-dd h:mm.tt", - F: "yyyy-MM-dd h:mm:ss.tt", - Y: "yyyy-MM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sq.js b/pub/lib/globalize/cultures/globalize.culture.sq.js deleted file mode 100644 index 87d204f54c5d907e11e5f1a59b5da812fd35b326..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sq.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture sq - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sq", "default", { - name: "sq", - englishName: "Albanian", - nativeName: "shqipe", - language: "sq", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-infinit", - positiveInfinity: "infinit", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": ".", - ".": ",", - symbol: "Lek" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"], - namesAbbr: ["Die","Hën","Mar","Mër","Enj","Pre","Sht"], - namesShort: ["Di","Hë","Ma","Më","En","Pr","Sh"] - }, - months: { - names: ["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor",""], - namesAbbr: ["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj",""] - }, - AM: ["PD","pd","PD"], - PM: ["MD","md","MD"], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy-MM-dd", - t: "h:mm.tt", - T: "h:mm:ss.tt", - f: "yyyy-MM-dd h:mm.tt", - F: "yyyy-MM-dd h:mm:ss.tt", - Y: "yyyy-MM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-BA.js b/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-BA.js deleted file mode 100644 index f26fc41ddd7255b8a4267005f66eb390cc423f36..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-BA.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture sr-Cyrl-BA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Cyrl-BA", "default", { - name: "sr-Cyrl-BA", - englishName: "Serbian (Cyrillic, Bosnia and Herzegovina)", - nativeName: "ÑрпÑки (БоÑна и Херцеговина)", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "КМ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["н","п","у","Ñ","ч","п","Ñ"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-CS.js b/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-CS.js deleted file mode 100644 index bf82b5d78bf7ac10bea8eddef4a386a92a0e5942..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-CS.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr-Cyrl-CS - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Cyrl-CS", "default", { - name: "sr-Cyrl-CS", - englishName: "Serbian (Cyrillic, Serbia and Montenegro (Former))", - nativeName: "ÑрпÑки (Србија и Црна Гора (Претходно))", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Дин." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["не","по","ут","ÑÑ€","че","пе","Ñу"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-ME.js b/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-ME.js deleted file mode 100644 index 0a5b6704deab9c6022f0f45543fa1d1aea3e7387..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-ME.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr-Cyrl-ME - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Cyrl-ME", "default", { - name: "sr-Cyrl-ME", - englishName: "Serbian (Cyrillic, Montenegro)", - nativeName: "ÑрпÑки (Црна Гора)", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["не","по","ут","ÑÑ€","че","пе","Ñу"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-RS.js b/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-RS.js deleted file mode 100644 index 5536d7fc114984e4a4e5aae02afe76305176a2f7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl-RS.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr-Cyrl-RS - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Cyrl-RS", "default", { - name: "sr-Cyrl-RS", - englishName: "Serbian (Cyrillic, Serbia)", - nativeName: "ÑрпÑки (Србија)", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Дин." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["не","по","ут","ÑÑ€","че","пе","Ñу"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl.js b/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl.js deleted file mode 100644 index b8a70d16b32aac4a43c54c085fb0ac7993981fdf..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Cyrl.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr-Cyrl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Cyrl", "default", { - name: "sr-Cyrl", - englishName: "Serbian (Cyrillic)", - nativeName: "ÑрпÑки", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Дин." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["не","по","ут","ÑÑ€","че","пе","Ñу"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Latn-BA.js b/pub/lib/globalize/cultures/globalize.culture.sr-Latn-BA.js deleted file mode 100644 index 35ea151474e7b2970bbbe368cd180f16ccb181ac..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Latn-BA.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture sr-Latn-BA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Latn-BA", "default", { - name: "sr-Latn-BA", - englishName: "Serbian (Latin, Bosnia and Herzegovina)", - nativeName: "srpski (Bosna i Hercegovina)", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Latn-CS.js b/pub/lib/globalize/cultures/globalize.culture.sr-Latn-CS.js deleted file mode 100644 index f36b5a9d0608d5408b575762c3fc5ba62bb92874..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Latn-CS.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr-Latn-CS - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Latn-CS", "default", { - name: "sr-Latn-CS", - englishName: "Serbian (Latin, Serbia and Montenegro (Former))", - nativeName: "srpski (Srbija i Crna Gora (Prethodno))", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Din." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Latn-ME.js b/pub/lib/globalize/cultures/globalize.culture.sr-Latn-ME.js deleted file mode 100644 index 0c3cccc9b4c9cd97abc8d44befbf7a5a268ccccb..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Latn-ME.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr-Latn-ME - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Latn-ME", "default", { - name: "sr-Latn-ME", - englishName: "Serbian (Latin, Montenegro)", - nativeName: "srpski (Crna Gora)", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Latn-RS.js b/pub/lib/globalize/cultures/globalize.culture.sr-Latn-RS.js deleted file mode 100644 index 1d45759b306a94cbc84ffddb1bef4f1a5c310d91..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Latn-RS.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr-Latn-RS - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Latn-RS", "default", { - name: "sr-Latn-RS", - englishName: "Serbian (Latin, Serbia)", - nativeName: "srpski (Srbija)", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Din." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr-Latn.js b/pub/lib/globalize/cultures/globalize.culture.sr-Latn.js deleted file mode 100644 index fe197d669f1e3a7866b9cf37ab69e4d021a9c341..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr-Latn.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr-Latn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr-Latn", "default", { - name: "sr-Latn", - englishName: "Serbian (Latin)", - nativeName: "srpski", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Din." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sr.js b/pub/lib/globalize/cultures/globalize.culture.sr.js deleted file mode 100644 index 284001f172ae94f29e900ec0a3e5d42feae54c7f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sr.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Globalize Culture sr - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sr", "default", { - name: "sr", - englishName: "Serbian", - nativeName: "srpski", - language: "sr", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Din." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sv-FI.js b/pub/lib/globalize/cultures/globalize.culture.sv-FI.js deleted file mode 100644 index 9067d4c0a1f25ad687e3b03e0f0e3a0521dbe837..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sv-FI.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture sv-FI - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sv-FI", "default", { - name: "sv-FI", - englishName: "Swedish (Finland)", - nativeName: "svenska (Finland)", - language: "sv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["söndag","mÃ¥ndag","tisdag","onsdag","torsdag","fredag","lördag"], - namesAbbr: ["sö","mÃ¥","ti","on","to","fr","lö"], - namesShort: ["sö","mÃ¥","ti","on","to","fr","lö"] - }, - months: { - names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "'den 'd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "'den 'd MMMM yyyy HH:mm", - F: "'den 'd MMMM yyyy HH:mm:ss", - M: "'den 'd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sv-SE.js b/pub/lib/globalize/cultures/globalize.culture.sv-SE.js deleted file mode 100644 index 5cf059e3388ec873274324acdacebc3c09e2302f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sv-SE.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture sv-SE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sv-SE", "default", { - name: "sv-SE", - englishName: "Swedish (Sweden)", - nativeName: "svenska (Sverige)", - language: "sv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["söndag","mÃ¥ndag","tisdag","onsdag","torsdag","fredag","lördag"], - namesAbbr: ["sö","mÃ¥","ti","on","to","fr","lö"], - namesShort: ["sö","mÃ¥","ti","on","to","fr","lö"] - }, - months: { - names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "'den 'd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "'den 'd MMMM yyyy HH:mm", - F: "'den 'd MMMM yyyy HH:mm:ss", - M: "'den 'd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sv.js b/pub/lib/globalize/cultures/globalize.culture.sv.js deleted file mode 100644 index 8c370284208e539c247264e1f9091092e29b2414..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sv.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture sv - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sv", "default", { - name: "sv", - englishName: "Swedish", - nativeName: "svenska", - language: "sv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["söndag","mÃ¥ndag","tisdag","onsdag","torsdag","fredag","lördag"], - namesAbbr: ["sö","mÃ¥","ti","on","to","fr","lö"], - namesShort: ["sö","mÃ¥","ti","on","to","fr","lö"] - }, - months: { - names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "'den 'd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "'den 'd MMMM yyyy HH:mm", - F: "'den 'd MMMM yyyy HH:mm:ss", - M: "'den 'd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sw-KE.js b/pub/lib/globalize/cultures/globalize.culture.sw-KE.js deleted file mode 100644 index 236bb277f2d63918dc78f57f76ac0e6259afb42c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sw-KE.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Globalize Culture sw-KE - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sw-KE", "default", { - name: "sw-KE", - englishName: "Kiswahili (Kenya)", - nativeName: "Kiswahili (Kenya)", - language: "sw", - numberFormat: { - currency: { - symbol: "S" - } - }, - calendars: { - standard: { - days: { - names: ["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"], - namesAbbr: ["Jumap.","Jumat.","Juman.","Jumat.","Alh.","Iju.","Jumam."], - namesShort: ["P","T","N","T","A","I","M"] - }, - months: { - names: ["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Decemba",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Dec",""] - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.sw.js b/pub/lib/globalize/cultures/globalize.culture.sw.js deleted file mode 100644 index c3c313c1e29e44dd6aa32cd1777147d5762f742b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.sw.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Globalize Culture sw - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "sw", "default", { - name: "sw", - englishName: "Kiswahili", - nativeName: "Kiswahili", - language: "sw", - numberFormat: { - currency: { - symbol: "S" - } - }, - calendars: { - standard: { - days: { - names: ["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"], - namesAbbr: ["Jumap.","Jumat.","Juman.","Jumat.","Alh.","Iju.","Jumam."], - namesShort: ["P","T","N","T","A","I","M"] - }, - months: { - names: ["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Decemba",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Dec",""] - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.syr-SY.js b/pub/lib/globalize/cultures/globalize.culture.syr-SY.js deleted file mode 100644 index b3fa598720129173c3abd12b1d44bd648418772a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.syr-SY.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture syr-SY - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "syr-SY", "default", { - name: "syr-SY", - englishName: "Syriac (Syria)", - nativeName: "ܣܘܪÜÜÜ (سوريا)", - language: "syr", - isRTL: true, - numberFormat: { - currency: { - pattern: ["$n-","$ n"], - symbol: "Ù„.س.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["ܚܕ ܒܫܒÜ","ܬܪÜܢ ܒܫܒÜ","Ü¬Ü Ü¬Ü ܒܫܒÜ","ÜܪܒܥÜ ܒܫܒÜ","ܚܡܫÜ ܒܫܒÜ","ܥܪܘܒܬÜ","ܫܒܬÜ"], - namesAbbr: ["\u070fÜ \u070fÜ’Ü«","\u070fÜ’Â \u070fÜ’Ü«","\u070fܓ \u070fÜ’Ü«","\u070fܕ \u070fÜ’Ü«","\u070fÜ—Â \u070fÜ’Ü«","\u070fܥܪܘܒ","\u070fܫܒ"], - namesShort: ["Ü","Ü’","Ü“","Ü•","Ü—","Ü¥","Ü«"] - }, - months: { - names: ["ܟܢܘܢ ÜܚܪÜ","ܫܒܛ","Üܕܪ","Ü¢Üܣܢ","ÜÜܪ","ܚܙÜܪܢ","ܬܡܘܙ","ÜÜ’","ÜÜÜ Ü˜Ü ","ܬܫܪÜ ܩܕÜÜ¡","ܬܫܪÜ ÜܚܪÜ","ܟܢܘܢ ܩܕÜÜ¡",""], - namesAbbr: ["\u070fܟܢ \u070fÜ’","ܫܒܛ","Üܕܪ","Ü¢Üܣܢ","ÜÜܪ","ܚܙÜܪܢ","ܬܡܘܙ","ÜÜ’","ÜÜÜ Ü˜Ü ","\u070fܬܫ \u070fÜ","\u070fܬܫ \u070fÜ’","\u070fܟܢ \u070fÜ",""] - }, - AM: ["Ü©.Ü›","Ü©.Ü›","Ü©.Ü›"], - PM: ["Ü’.Ü›","Ü’.Ü›","Ü’.Ü›"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.syr.js b/pub/lib/globalize/cultures/globalize.culture.syr.js deleted file mode 100644 index f48dfdacf690faf00068ab4f4ea996786dbf0410..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.syr.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture syr - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "syr", "default", { - name: "syr", - englishName: "Syriac", - nativeName: "ܣܘܪÜÜÜ", - language: "syr", - isRTL: true, - numberFormat: { - currency: { - pattern: ["$n-","$ n"], - symbol: "Ù„.س.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["ܚܕ ܒܫܒÜ","ܬܪÜܢ ܒܫܒÜ","Ü¬Ü Ü¬Ü ܒܫܒÜ","ÜܪܒܥÜ ܒܫܒÜ","ܚܡܫÜ ܒܫܒÜ","ܥܪܘܒܬÜ","ܫܒܬÜ"], - namesAbbr: ["\u070fÜ \u070fÜ’Ü«","\u070fÜ’Â \u070fÜ’Ü«","\u070fܓ \u070fÜ’Ü«","\u070fܕ \u070fÜ’Ü«","\u070fÜ—Â \u070fÜ’Ü«","\u070fܥܪܘܒ","\u070fܫܒ"], - namesShort: ["Ü","Ü’","Ü“","Ü•","Ü—","Ü¥","Ü«"] - }, - months: { - names: ["ܟܢܘܢ ÜܚܪÜ","ܫܒܛ","Üܕܪ","Ü¢Üܣܢ","ÜÜܪ","ܚܙÜܪܢ","ܬܡܘܙ","ÜÜ’","ÜÜÜ Ü˜Ü ","ܬܫܪÜ ܩܕÜÜ¡","ܬܫܪÜ ÜܚܪÜ","ܟܢܘܢ ܩܕÜÜ¡",""], - namesAbbr: ["\u070fܟܢ \u070fÜ’","ܫܒܛ","Üܕܪ","Ü¢Üܣܢ","ÜÜܪ","ܚܙÜܪܢ","ܬܡܘܙ","ÜÜ’","ÜÜÜ Ü˜Ü ","\u070fܬܫ \u070fÜ","\u070fܬܫ \u070fÜ’","\u070fܟܢ \u070fÜ",""] - }, - AM: ["Ü©.Ü›","Ü©.Ü›","Ü©.Ü›"], - PM: ["Ü’.Ü›","Ü’.Ü›","Ü’.Ü›"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ta-IN.js b/pub/lib/globalize/cultures/globalize.culture.ta-IN.js deleted file mode 100644 index fff637cbe4de37e6fc12639992720b1c1b50997b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ta-IN.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture ta-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ta-IN", "default", { - name: "ta-IN", - englishName: "Tamil (India)", - nativeName: "தமிழ௠(இநà¯à®¤à®¿à®¯à®¾)", - language: "ta", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ரூ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ஞாயிறà¯à®±à¯à®•à¯à®•ிழமை","திஙà¯à®•ளà¯à®•ிழமை","செவà¯à®µà®¾à®¯à¯à®•ிழமை","பà¯à®¤à®©à¯à®•ிழமை","வியாழகà¯à®•ிழமை","வெளà¯à®³à®¿à®•à¯à®•ிழமை","சனிகà¯à®•ிழமை"], - namesAbbr: ["ஞாயிறà¯","திஙà¯à®•ளà¯","செவà¯à®µà®¾à®¯à¯","பà¯à®¤à®©à¯","வியாழனà¯","வெளà¯à®³à®¿","சனி"], - namesShort: ["ஞா","தி","செ","பà¯","வி","வெ","ச"] - }, - months: { - names: ["ஜனவரி","பிபà¯à®°à®µà®°à®¿","மாரà¯à®šà¯","à®à®ªà¯à®°à®²à¯","மே","ஜூனà¯","ஜூலை","ஆகஸà¯à®Ÿà¯","செபà¯à®Ÿà®®à¯à®ªà®°à¯","அகà¯à®Ÿà¯‹à®ªà®°à¯","நவமà¯à®ªà®°à¯","டிசமà¯à®ªà®°à¯",""], - namesAbbr: ["ஜனவரி","பிபà¯à®°à®µà®°à®¿","மாரà¯à®šà¯","à®à®ªà¯à®°à®²à¯","மே","ஜூனà¯","ஜூலை","ஆகஸà¯à®Ÿà¯","செபà¯à®Ÿà®®à¯à®ªà®°à¯","அகà¯à®Ÿà¯‹à®ªà®°à¯","நவமà¯à®ªà®°à¯","டிசமà¯à®ªà®°à¯",""] - }, - AM: ["காலை","காலை","காலை"], - PM: ["மாலை","மாலை","மாலை"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ta.js b/pub/lib/globalize/cultures/globalize.culture.ta.js deleted file mode 100644 index 669306503eddf4b847fa7f0a35a4087b4b7173d3..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ta.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture ta - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ta", "default", { - name: "ta", - englishName: "Tamil", - nativeName: "தமிழà¯", - language: "ta", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ரூ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ஞாயிறà¯à®±à¯à®•à¯à®•ிழமை","திஙà¯à®•ளà¯à®•ிழமை","செவà¯à®µà®¾à®¯à¯à®•ிழமை","பà¯à®¤à®©à¯à®•ிழமை","வியாழகà¯à®•ிழமை","வெளà¯à®³à®¿à®•à¯à®•ிழமை","சனிகà¯à®•ிழமை"], - namesAbbr: ["ஞாயிறà¯","திஙà¯à®•ளà¯","செவà¯à®µà®¾à®¯à¯","பà¯à®¤à®©à¯","வியாழனà¯","வெளà¯à®³à®¿","சனி"], - namesShort: ["ஞா","தி","செ","பà¯","வி","வெ","ச"] - }, - months: { - names: ["ஜனவரி","பிபà¯à®°à®µà®°à®¿","மாரà¯à®šà¯","à®à®ªà¯à®°à®²à¯","மே","ஜூனà¯","ஜூலை","ஆகஸà¯à®Ÿà¯","செபà¯à®Ÿà®®à¯à®ªà®°à¯","அகà¯à®Ÿà¯‹à®ªà®°à¯","நவமà¯à®ªà®°à¯","டிசமà¯à®ªà®°à¯",""], - namesAbbr: ["ஜனவரி","பிபà¯à®°à®µà®°à®¿","மாரà¯à®šà¯","à®à®ªà¯à®°à®²à¯","மே","ஜூனà¯","ஜூலை","ஆகஸà¯à®Ÿà¯","செபà¯à®Ÿà®®à¯à®ªà®°à¯","அகà¯à®Ÿà¯‹à®ªà®°à¯","நவமà¯à®ªà®°à¯","டிசமà¯à®ªà®°à¯",""] - }, - AM: ["காலை","காலை","காலை"], - PM: ["மாலை","மாலை","மாலை"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.te-IN.js b/pub/lib/globalize/cultures/globalize.culture.te-IN.js deleted file mode 100644 index 9b7afdae7d9a1c5bba62c34581488923454047ba..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.te-IN.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture te-IN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "te-IN", "default", { - name: "te-IN", - englishName: "Telugu (India)", - nativeName: "తెలà±à°—à± (à°à°¾à°°à°¤Â దేశం)", - language: "te", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "రూ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ఆదివారం","సోమవారం","మంగళవారం","à°¬à±à°§à°µà°¾à°°à°‚","à°—à±à°°à±à°µà°¾à°°à°‚","à°¶à±à°•à±à°°à°µà°¾à°°à°‚","శనివారం"], - namesAbbr: ["ఆది.","సోమ.","మంగళ.","à°¬à±à°§.","à°—à±à°°à±.","à°¶à±à°•à±à°°.","శని."], - namesShort: ["à°†","సో","మం","à°¬à±","à°—à±","à°¶à±","à°¶"] - }, - months: { - names: ["జనవరి","à°«à°¿à°¬à±à°°à°µà°°à°¿","మారà±à°šà°¿","à°à°ªà±à°°à°¿à°²à±","మే","జూనà±","జూలై","ఆగసà±à°Ÿà±","సెపà±à°Ÿà±†à°‚బరà±","à°…à°•à±à°Ÿà±‹à°¬à°°à±","నవంబరà±","డిసెంబరà±",""], - namesAbbr: ["జనవరి","à°«à°¿à°¬à±à°°à°µà°°à°¿","మారà±à°šà°¿","à°à°ªà±à°°à°¿à°²à±","మే","జూనà±","జూలై","ఆగసà±à°Ÿà±","సెపà±à°Ÿà±†à°‚బరà±","à°…à°•à±à°Ÿà±‹à°¬à°°à±","నవంబరà±","డిసెంబరà±",""] - }, - AM: ["పూరà±à°µà°¾à°¹à±à°¨","పూరà±à°µà°¾à°¹à±à°¨","పూరà±à°µà°¾à°¹à±à°¨"], - PM: ["అపరాహà±à°¨","అపరాహà±à°¨","అపరాహà±à°¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.te.js b/pub/lib/globalize/cultures/globalize.culture.te.js deleted file mode 100644 index 44ff54233729410e076c2e3b26d69f2234819c43..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.te.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture te - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "te", "default", { - name: "te", - englishName: "Telugu", - nativeName: "తెలà±à°—à±", - language: "te", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "రూ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ఆదివారం","సోమవారం","మంగళవారం","à°¬à±à°§à°µà°¾à°°à°‚","à°—à±à°°à±à°µà°¾à°°à°‚","à°¶à±à°•à±à°°à°µà°¾à°°à°‚","శనివారం"], - namesAbbr: ["ఆది.","సోమ.","మంగళ.","à°¬à±à°§.","à°—à±à°°à±.","à°¶à±à°•à±à°°.","శని."], - namesShort: ["à°†","సో","మం","à°¬à±","à°—à±","à°¶à±","à°¶"] - }, - months: { - names: ["జనవరి","à°«à°¿à°¬à±à°°à°µà°°à°¿","మారà±à°šà°¿","à°à°ªà±à°°à°¿à°²à±","మే","జూనà±","జూలై","ఆగసà±à°Ÿà±","సెపà±à°Ÿà±†à°‚బరà±","à°…à°•à±à°Ÿà±‹à°¬à°°à±","నవంబరà±","డిసెంబరà±",""], - namesAbbr: ["జనవరి","à°«à°¿à°¬à±à°°à°µà°°à°¿","మారà±à°šà°¿","à°à°ªà±à°°à°¿à°²à±","మే","జూనà±","జూలై","ఆగసà±à°Ÿà±","సెపà±à°Ÿà±†à°‚బరà±","à°…à°•à±à°Ÿà±‹à°¬à°°à±","నవంబరà±","డిసెంబరà±",""] - }, - AM: ["పూరà±à°µà°¾à°¹à±à°¨","పూరà±à°µà°¾à°¹à±à°¨","పూరà±à°µà°¾à°¹à±à°¨"], - PM: ["అపరాహà±à°¨","అపరాహà±à°¨","అపరాహà±à°¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tg-Cyrl-TJ.js b/pub/lib/globalize/cultures/globalize.culture.tg-Cyrl-TJ.js deleted file mode 100644 index c831495c69a1b66c8bc902785d30adb836b155a1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tg-Cyrl-TJ.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture tg-Cyrl-TJ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tg-Cyrl-TJ", "default", { - name: "tg-Cyrl-TJ", - englishName: "Tajik (Cyrillic, Tajikistan)", - nativeName: "Тоҷикӣ (ТоҷикиÑтон)", - language: "tg-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ";", - symbol: "Ñ‚.Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - days: { - names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"], - namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"], - namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвари","феврали","марти","апрели","маи","июни","июли","авгуÑти","ÑентÑбри","октÑбри","ноÑбри","декабри",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tg-Cyrl.js b/pub/lib/globalize/cultures/globalize.culture.tg-Cyrl.js deleted file mode 100644 index fceb858e1bfcf1a63081607ec2f4160c3bd50e35..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tg-Cyrl.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture tg-Cyrl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tg-Cyrl", "default", { - name: "tg-Cyrl", - englishName: "Tajik (Cyrillic)", - nativeName: "Тоҷикӣ", - language: "tg-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ";", - symbol: "Ñ‚.Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - days: { - names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"], - namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"], - namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвари","феврали","марти","апрели","маи","июни","июли","авгуÑти","ÑентÑбри","октÑбри","ноÑбри","декабри",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tg.js b/pub/lib/globalize/cultures/globalize.culture.tg.js deleted file mode 100644 index c8dbc2a82045735bfc9eed94df1f4aa4aaefd273..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tg.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Globalize Culture tg - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tg", "default", { - name: "tg", - englishName: "Tajik", - nativeName: "Тоҷикӣ", - language: "tg", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ";", - symbol: "Ñ‚.Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - days: { - names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"], - namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"], - namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвари","феврали","марти","апрели","маи","июни","июли","авгуÑти","ÑентÑбри","октÑбри","ноÑбри","декабри",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.th-TH.js b/pub/lib/globalize/cultures/globalize.culture.th-TH.js deleted file mode 100644 index e963b58526f5cd1ac1af65948ab284314eb494ff..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.th-TH.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Globalize Culture th-TH - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "th-TH", "default", { - name: "th-TH", - englishName: "Thai (Thailand)", - nativeName: "ไทย (ไทย)", - language: "th", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "฿" - } - }, - calendars: { - standard: { - name: "ThaiBuddhist", - firstDay: 1, - days: { - names: ["à¸à¸²à¸—ิตย์","จันทร์","à¸à¸±à¸‡à¸„าร","พุธ","พฤหัสบดี","ศุà¸à¸£à¹Œ","เสาร์"], - namesAbbr: ["à¸à¸².","จ.","à¸.","พ.","พฤ.","ศ.","ส."], - namesShort: ["à¸","จ","à¸","พ","พ","ศ","ส"] - }, - months: { - names: ["มà¸à¸£à¸²à¸„ม","à¸à¸¸à¸¡à¸ าพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","à¸à¸£à¸à¸Žà¸²à¸„ม","สิงหาคม","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","ตุลาคม","พฤศจิà¸à¸²à¸¢à¸™","ธันวาคม",""], - namesAbbr: ["ม.ค.","à¸.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","à¸.ค.","ส.ค.","à¸.ย.","ต.ค.","พ.ย.","ธ.ค.",""] - }, - eras: [{"name":"พ.ศ.","start":null,"offset":-543}], - twoDigitYearMax: 2572, - patterns: { - d: "d/M/yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - }, - Gregorian_Localized: { - firstDay: 1, - days: { - names: ["à¸à¸²à¸—ิตย์","จันทร์","à¸à¸±à¸‡à¸„าร","พุธ","พฤหัสบดี","ศุà¸à¸£à¹Œ","เสาร์"], - namesAbbr: ["à¸à¸².","จ.","à¸.","พ.","พฤ.","ศ.","ส."], - namesShort: ["à¸","จ","à¸","พ","พ","ศ","ส"] - }, - months: { - names: ["มà¸à¸£à¸²à¸„ม","à¸à¸¸à¸¡à¸ าพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","à¸à¸£à¸à¸Žà¸²à¸„ม","สิงหาคม","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","ตุลาคม","พฤศจิà¸à¸²à¸¢à¸™","ธันวาคม",""], - namesAbbr: ["ม.ค.","à¸.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","à¸.ค.","ส.ค.","à¸.ย.","ต.ค.","พ.ย.","ธ.ค.",""] - }, - patterns: { - d: "d/M/yyyy", - D: "'วัน'dddd'ที่' d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "'วัน'dddd'ที่' d MMMM yyyy H:mm", - F: "'วัน'dddd'ที่' d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.th.js b/pub/lib/globalize/cultures/globalize.culture.th.js deleted file mode 100644 index d8baae5fe5eb74b5d11cfc37a158725b96b0aaec..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.th.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Globalize Culture th - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "th", "default", { - name: "th", - englishName: "Thai", - nativeName: "ไทย", - language: "th", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "฿" - } - }, - calendars: { - standard: { - name: "ThaiBuddhist", - firstDay: 1, - days: { - names: ["à¸à¸²à¸—ิตย์","จันทร์","à¸à¸±à¸‡à¸„าร","พุธ","พฤหัสบดี","ศุà¸à¸£à¹Œ","เสาร์"], - namesAbbr: ["à¸à¸².","จ.","à¸.","พ.","พฤ.","ศ.","ส."], - namesShort: ["à¸","จ","à¸","พ","พ","ศ","ส"] - }, - months: { - names: ["มà¸à¸£à¸²à¸„ม","à¸à¸¸à¸¡à¸ าพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","à¸à¸£à¸à¸Žà¸²à¸„ม","สิงหาคม","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","ตุลาคม","พฤศจิà¸à¸²à¸¢à¸™","ธันวาคม",""], - namesAbbr: ["ม.ค.","à¸.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","à¸.ค.","ส.ค.","à¸.ย.","ต.ค.","พ.ย.","ธ.ค.",""] - }, - eras: [{"name":"พ.ศ.","start":null,"offset":-543}], - twoDigitYearMax: 2572, - patterns: { - d: "d/M/yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - }, - Gregorian_Localized: { - firstDay: 1, - days: { - names: ["à¸à¸²à¸—ิตย์","จันทร์","à¸à¸±à¸‡à¸„าร","พุธ","พฤหัสบดี","ศุà¸à¸£à¹Œ","เสาร์"], - namesAbbr: ["à¸à¸².","จ.","à¸.","พ.","พฤ.","ศ.","ส."], - namesShort: ["à¸","จ","à¸","พ","พ","ศ","ส"] - }, - months: { - names: ["มà¸à¸£à¸²à¸„ม","à¸à¸¸à¸¡à¸ าพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","à¸à¸£à¸à¸Žà¸²à¸„ม","สิงหาคม","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","ตุลาคม","พฤศจิà¸à¸²à¸¢à¸™","ธันวาคม",""], - namesAbbr: ["ม.ค.","à¸.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","à¸.ค.","ส.ค.","à¸.ย.","ต.ค.","พ.ย.","ธ.ค.",""] - }, - patterns: { - d: "d/M/yyyy", - D: "'วัน'dddd'ที่' d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "'วัน'dddd'ที่' d MMMM yyyy H:mm", - F: "'วัน'dddd'ที่' d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tk-TM.js b/pub/lib/globalize/cultures/globalize.culture.tk-TM.js deleted file mode 100644 index e1367edfe77facf69db236529537d02cfc0c1c25..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tk-TM.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture tk-TM - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tk-TM", "default", { - name: "tk-TM", - englishName: "Turkmen (Turkmenistan)", - nativeName: "türkmençe (Türkmenistan)", - language: "tk", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-üznüksizlik", - positiveInfinity: "üznüksizlik", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "m." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["DuÅŸenbe","SiÅŸenbe","ÇarÅŸenbe","PenÅŸenbe","Anna","Åženbe","ÃekÅŸenbe"], - namesAbbr: ["Db","Sb","Çb","Pb","An","Åžb","Ãb"], - namesShort: ["D","S","Ç","P","A","Åž","Ã"] - }, - months: { - names: ["Ãanwar","Fewral","Mart","Aprel","Maý","lýun","lýul","Awgust","Sentýabr","Oktýabr","Noýabr","Dekabr",""], - namesAbbr: ["Ãan","Few","Mart","Apr","Maý","lýun","lýul","Awg","Sen","Okt","Not","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "yyyy 'ý.' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'ý.' MMMM d H:mm", - F: "yyyy 'ý.' MMMM d H:mm:ss", - Y: "yyyy 'ý.' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tk.js b/pub/lib/globalize/cultures/globalize.culture.tk.js deleted file mode 100644 index de58ad4b8f6a872da798d417aff074f19b71a3d3..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tk.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Globalize Culture tk - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tk", "default", { - name: "tk", - englishName: "Turkmen", - nativeName: "türkmençe", - language: "tk", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-üznüksizlik", - positiveInfinity: "üznüksizlik", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "m." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["DuÅŸenbe","SiÅŸenbe","ÇarÅŸenbe","PenÅŸenbe","Anna","Åženbe","ÃekÅŸenbe"], - namesAbbr: ["Db","Sb","Çb","Pb","An","Åžb","Ãb"], - namesShort: ["D","S","Ç","P","A","Åž","Ã"] - }, - months: { - names: ["Ãanwar","Fewral","Mart","Aprel","Maý","lýun","lýul","Awgust","Sentýabr","Oktýabr","Noýabr","Dekabr",""], - namesAbbr: ["Ãan","Few","Mart","Apr","Maý","lýun","lýul","Awg","Sen","Okt","Not","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "yyyy 'ý.' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'ý.' MMMM d H:mm", - F: "yyyy 'ý.' MMMM d H:mm:ss", - Y: "yyyy 'ý.' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tn-ZA.js b/pub/lib/globalize/cultures/globalize.culture.tn-ZA.js deleted file mode 100644 index e46d573c5442e1c60b93961934bec26a11c46157..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tn-ZA.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture tn-ZA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tn-ZA", "default", { - name: "tn-ZA", - englishName: "Setswana (South Africa)", - nativeName: "Setswana (Aforika Borwa)", - language: "tn", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"], - namesAbbr: ["Ltp.","Mos.","Lbd.","Lbr.","Lbn.","Lbt.","Lmt."], - namesShort: ["Lp","Ms","Lb","Lr","Ln","Lt","Lm"] - }, - months: { - names: ["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole",""], - namesAbbr: ["Fer.","Tlhak.","Mop.","Mor.","Motsh.","Seet.","Phukw.","Phatw.","Lwets.","Diph.","Ngwan.","Sed.",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tn.js b/pub/lib/globalize/cultures/globalize.culture.tn.js deleted file mode 100644 index 2d19780ba9dc37c5e01678d72c51bc1015de8edd..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tn.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Globalize Culture tn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tn", "default", { - name: "tn", - englishName: "Setswana", - nativeName: "Setswana", - language: "tn", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"], - namesAbbr: ["Ltp.","Mos.","Lbd.","Lbr.","Lbn.","Lbt.","Lmt."], - namesShort: ["Lp","Ms","Lb","Lr","Ln","Lt","Lm"] - }, - months: { - names: ["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole",""], - namesAbbr: ["Fer.","Tlhak.","Mop.","Mor.","Motsh.","Seet.","Phukw.","Phatw.","Lwets.","Diph.","Ngwan.","Sed.",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tr-TR.js b/pub/lib/globalize/cultures/globalize.culture.tr-TR.js deleted file mode 100644 index f3188223041dafa398a36a0bc08434645dc631c8..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tr-TR.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture tr-TR - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tr-TR", "default", { - name: "tr-TR", - englishName: "Turkish (Turkey)", - nativeName: "Türkçe (Türkiye)", - language: "tr", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "TL" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Pazar","Pazartesi","Salı","ÇarÅŸamba","PerÅŸembe","Cuma","Cumartesi"], - namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"], - namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"] - }, - months: { - names: ["Ocak","Åžubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄŸustos","Eylül","Ekim","Kasım","Aralık",""], - namesAbbr: ["Oca","Åžub","Mar","Nis","May","Haz","Tem","AÄŸu","Eyl","Eki","Kas","Ara",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "dd MMMM yyyy dddd", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy dddd HH:mm", - F: "dd MMMM yyyy dddd HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tr.js b/pub/lib/globalize/cultures/globalize.culture.tr.js deleted file mode 100644 index 1f38d83c2d12dcfba22dba31977548f9c065dadb..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tr.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture tr - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tr", "default", { - name: "tr", - englishName: "Turkish", - nativeName: "Türkçe", - language: "tr", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "TL" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Pazar","Pazartesi","Salı","ÇarÅŸamba","PerÅŸembe","Cuma","Cumartesi"], - namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"], - namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"] - }, - months: { - names: ["Ocak","Åžubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄŸustos","Eylül","Ekim","Kasım","Aralık",""], - namesAbbr: ["Oca","Åžub","Mar","Nis","May","Haz","Tem","AÄŸu","Eyl","Eki","Kas","Ara",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "dd MMMM yyyy dddd", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy dddd HH:mm", - F: "dd MMMM yyyy dddd HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tt-RU.js b/pub/lib/globalize/cultures/globalize.culture.tt-RU.js deleted file mode 100644 index 434e6a6fac62c798f1747d5a11a3bec1a549ec6b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tt-RU.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture tt-RU - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tt-RU", "default", { - name: "tt-RU", - englishName: "Tatar (Russia)", - nativeName: "Татар (РоÑÑиÑ)", - language: "tt", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"], - namesAbbr: ["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"], - namesShort: ["Я","Д","С","Ч","П","Ò–","Ш"] - }, - months: { - names: ["Гыйнвар","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Гыйн.","Фев.","Мар.","Ðпр.","Май","Июнь","Июль","Ðвг.","Сен.","Окт.","ÐоÑб.","Дек.",""] - }, - monthsGenitive: { - names: ["Гыйнварның","Февральнең","Мартның","Ðпрельнең","Майның","Июньнең","Июльнең","ÐвгуÑтның","СентÑбрьның","ОктÑбрьның","ÐоÑбрьның","Декабрьның",""], - namesAbbr: ["Гыйн.-ның","Фев.-нең","Мар.-ның","Ðпр.-нең","Майның","Июньнең","Июльнең","Ðвг.-ның","Сен.-ның","Окт.-ның","ÐоÑб.-ның","Дек.-ның",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tt.js b/pub/lib/globalize/cultures/globalize.culture.tt.js deleted file mode 100644 index ee9c11bf08677bcd706881b0172e7c052e178e10..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tt.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture tt - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tt", "default", { - name: "tt", - englishName: "Tatar", - nativeName: "Татар", - language: "tt", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"], - namesAbbr: ["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"], - namesShort: ["Я","Д","С","Ч","П","Ò–","Ш"] - }, - months: { - names: ["Гыйнвар","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Гыйн.","Фев.","Мар.","Ðпр.","Май","Июнь","Июль","Ðвг.","Сен.","Окт.","ÐоÑб.","Дек.",""] - }, - monthsGenitive: { - names: ["Гыйнварның","Февральнең","Мартның","Ðпрельнең","Майның","Июньнең","Июльнең","ÐвгуÑтның","СентÑбрьның","ОктÑбрьның","ÐоÑбрьның","Декабрьның",""], - namesAbbr: ["Гыйн.-ның","Фев.-нең","Мар.-ның","Ðпр.-нең","Майның","Июньнең","Июльнең","Ðвг.-ның","Сен.-ның","Окт.-ның","ÐоÑб.-ның","Дек.-ның",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tzm-Latn-DZ.js b/pub/lib/globalize/cultures/globalize.culture.tzm-Latn-DZ.js deleted file mode 100644 index d6ece98f2904c4bf71dad830b78d5d52d342b04f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tzm-Latn-DZ.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture tzm-Latn-DZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tzm-Latn-DZ", "default", { - name: "tzm-Latn-DZ", - englishName: "Tamazight (Latin, Algeria)", - nativeName: "Tamazight (Djazaïr)", - language: "tzm-Latn", - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - symbol: "DZD" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 6, - days: { - names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"], - namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"], - namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"] - }, - months: { - names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""], - namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tzm-Latn.js b/pub/lib/globalize/cultures/globalize.culture.tzm-Latn.js deleted file mode 100644 index b201d1f656cf5892c18625749e406bd3f893c24b..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tzm-Latn.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture tzm-Latn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tzm-Latn", "default", { - name: "tzm-Latn", - englishName: "Tamazight (Latin)", - nativeName: "Tamazight", - language: "tzm-Latn", - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - symbol: "DZD" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 6, - days: { - names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"], - namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"], - namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"] - }, - months: { - names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""], - namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.tzm.js b/pub/lib/globalize/cultures/globalize.culture.tzm.js deleted file mode 100644 index acd6ccd88e3312ee9d0ebc8b3796743805dee9b5..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.tzm.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture tzm - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "tzm", "default", { - name: "tzm", - englishName: "Tamazight", - nativeName: "Tamazight", - language: "tzm", - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - symbol: "DZD" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 6, - days: { - names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"], - namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"], - namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"] - }, - months: { - names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""], - namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ug-CN.js b/pub/lib/globalize/cultures/globalize.culture.ug-CN.js deleted file mode 100644 index 41af88fe7cb0009d2041a660718fea46e0a5b76c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ug-CN.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Globalize Culture ug-CN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ug-CN", "default", { - name: "ug-CN", - englishName: "Uyghur (PRC)", - nativeName: "ئۇيغۇرچە (Ø¬Û‡ÚØ®Û‡Ø§ خەلق جۇمھۇرىيىتى)", - language: "ug", - isRTL: true, - numberFormat: { - "NaN": "سان ئەمەس", - negativeInfinity: "مەنپىي چەكسىزلىك", - positiveInfinity: "مۇسبەت چەكسىزلىك", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"], - namesAbbr: ["ÙŠÛ•","دۈ","سە","چا","Ù¾Û•","جۈ","Ø´Û•"], - namesShort: ["ÙŠ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""], - namesAbbr: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""] - }, - AM: ["چۈشتىن بۇرۇن","چۈشتىن بۇرۇن","چۈشتىن بۇرۇن"], - PM: ["چۈشتىن ÙƒÛيىن","چۈشتىن ÙƒÛيىن","چۈشتىن ÙƒÛيىن"], - eras: [{"name":"مىلادى","start":null,"offset":0}], - patterns: { - d: "yyyy-M-d", - D: "yyyy-'يىلى' MMMM d-'كۈنى،'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm", - F: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm:ss", - M: "MMMM d'-كۈنى'", - Y: "yyyy-'يىلى' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ug.js b/pub/lib/globalize/cultures/globalize.culture.ug.js deleted file mode 100644 index 3f95c4b6c9c977f121c70cca5ce12fd65819498c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ug.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Globalize Culture ug - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ug", "default", { - name: "ug", - englishName: "Uyghur", - nativeName: "ئۇيغۇرچە", - language: "ug", - isRTL: true, - numberFormat: { - "NaN": "سان ئەمەس", - negativeInfinity: "مەنپىي چەكسىزلىك", - positiveInfinity: "مۇسبەت چەكسىزلىك", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"], - namesAbbr: ["ÙŠÛ•","دۈ","سە","چا","Ù¾Û•","جۈ","Ø´Û•"], - namesShort: ["ÙŠ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""], - namesAbbr: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""] - }, - AM: ["چۈشتىن بۇرۇن","چۈشتىن بۇرۇن","چۈشتىن بۇرۇن"], - PM: ["چۈشتىن ÙƒÛيىن","چۈشتىن ÙƒÛيىن","چۈشتىن ÙƒÛيىن"], - eras: [{"name":"مىلادى","start":null,"offset":0}], - patterns: { - d: "yyyy-M-d", - D: "yyyy-'يىلى' MMMM d-'كۈنى،'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm", - F: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm:ss", - M: "MMMM d'-كۈنى'", - Y: "yyyy-'يىلى' MMMM" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.uk-UA.js b/pub/lib/globalize/cultures/globalize.culture.uk-UA.js deleted file mode 100644 index 84653b470f4dfb7b1d3e253c9146e379bc28142d..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.uk-UA.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture uk-UA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "uk-UA", "default", { - name: "uk-UA", - englishName: "Ukrainian (Ukraine)", - nativeName: "українÑька (Україна)", - language: "uk", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-безмежніÑть", - positiveInfinity: "безмежніÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚´" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["неділÑ","понеділок","вівторок","Ñереда","четвер","п'ÑтницÑ","Ñубота"], - namesAbbr: ["Ðд","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"], - namesShort: ["Ðд","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"] - }, - months: { - names: ["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","ВереÑень","Жовтень","ЛиÑтопад","Грудень",""], - namesAbbr: ["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","ЛиÑ","Гру",""] - }, - monthsGenitive: { - names: ["ÑічнÑ","лютого","березнÑ","квітнÑ","травнÑ","червнÑ","липнÑ","ÑерпнÑ","вереÑнÑ","жовтнÑ","лиÑтопада","груднÑ",""], - namesAbbr: ["Ñіч","лют","бер","кві","тра","чер","лип","Ñер","вер","жов","лиÑ","гру",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy' Ñ€.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy' Ñ€.' H:mm", - F: "d MMMM yyyy' Ñ€.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy' Ñ€.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.uk.js b/pub/lib/globalize/cultures/globalize.culture.uk.js deleted file mode 100644 index e1951bc11af633557f11d406030b070ac06c1d4a..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.uk.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Globalize Culture uk - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "uk", "default", { - name: "uk", - englishName: "Ukrainian", - nativeName: "українÑька", - language: "uk", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-безмежніÑть", - positiveInfinity: "безмежніÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚´" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["неділÑ","понеділок","вівторок","Ñереда","четвер","п'ÑтницÑ","Ñубота"], - namesAbbr: ["Ðд","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"], - namesShort: ["Ðд","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"] - }, - months: { - names: ["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","ВереÑень","Жовтень","ЛиÑтопад","Грудень",""], - namesAbbr: ["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","ЛиÑ","Гру",""] - }, - monthsGenitive: { - names: ["ÑічнÑ","лютого","березнÑ","квітнÑ","травнÑ","червнÑ","липнÑ","ÑерпнÑ","вереÑнÑ","жовтнÑ","лиÑтопада","груднÑ",""], - namesAbbr: ["Ñіч","лют","бер","кві","тра","чер","лип","Ñер","вер","жов","лиÑ","гру",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy' Ñ€.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy' Ñ€.' H:mm", - F: "d MMMM yyyy' Ñ€.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy' Ñ€.'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ur-PK.js b/pub/lib/globalize/cultures/globalize.culture.ur-PK.js deleted file mode 100644 index 62438a1bc4824f291e1b694dfa67a8a99907cc21..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ur-PK.js +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Globalize Culture ur-PK - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ur-PK", "default", { - name: "ur-PK", - englishName: "Urdu (Islamic Republic of Pakistan)", - nativeName: "Ø§ÙØ±Ø¯Ùˆ (پاکستان)", - language: "ur", - isRTL: true, - numberFormat: { - currency: { - pattern: ["$n-","$n"], - symbol: "Rs" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","Ù‡ÙØªÙ‡"], - namesAbbr: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","Ù‡ÙØªÙ‡"], - namesShort: ["ا","Ù¾","Ù…","ب","ج","ج","Ù‡"] - }, - months: { - names: ["جنوری","ÙØ±ÙˆØ±ÛŒ","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""], - namesAbbr: ["جنوری","ÙØ±ÙˆØ±ÛŒ","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""] - }, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - f: "dd MMMM, yyyy h:mm tt", - F: "dd MMMM, yyyy h:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.ur.js b/pub/lib/globalize/cultures/globalize.culture.ur.js deleted file mode 100644 index a2a364100f773241bb1a30566ea8b06855ad75c8..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.ur.js +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Globalize Culture ur - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ur", "default", { - name: "ur", - englishName: "Urdu", - nativeName: "Ø§ÙØ±Ø¯Ùˆ", - language: "ur", - isRTL: true, - numberFormat: { - currency: { - pattern: ["$n-","$n"], - symbol: "Rs" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","Ù‡ÙØªÙ‡"], - namesAbbr: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","Ù‡ÙØªÙ‡"], - namesShort: ["ا","Ù¾","Ù…","ب","ج","ج","Ù‡"] - }, - months: { - names: ["جنوری","ÙØ±ÙˆØ±ÛŒ","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""], - namesAbbr: ["جنوری","ÙØ±ÙˆØ±ÛŒ","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""] - }, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - f: "dd MMMM, yyyy h:mm tt", - F: "dd MMMM, yyyy h:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.uz-Cyrl-UZ.js b/pub/lib/globalize/cultures/globalize.culture.uz-Cyrl-UZ.js deleted file mode 100644 index df24315e4a5ab11b4c26f1aa5ae8d351f06f17ed..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.uz-Cyrl-UZ.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture uz-Cyrl-UZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "uz-Cyrl-UZ", "default", { - name: "uz-Cyrl-UZ", - englishName: "Uzbek (Cyrillic, Uzbekistan)", - nativeName: "Ўзбек (ЎзбекиÑтон)", - language: "uz-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñўм" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Ñкшанба","душанба","Ñешанба","чоршанба","пайшанба","жума","шанба"], - namesAbbr: ["Ñкш","дш","Ñш","чш","пш","ж","ш"], - namesShort: ["Ñ","д","Ñ","ч","п","ж","ш"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвар","феврал","март","апрел","май","июн","июл","авгуÑÑ‚","ÑентÑбр","октÑбр","ноÑбр","декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","маÑ","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "yyyy 'йил' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'йил' d-MMMM HH:mm", - F: "yyyy 'йил' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.uz-Cyrl.js b/pub/lib/globalize/cultures/globalize.culture.uz-Cyrl.js deleted file mode 100644 index 8fb8aad8fff0afa3fa6f1f238b49e8a2b1d92b4d..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.uz-Cyrl.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Globalize Culture uz-Cyrl - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "uz-Cyrl", "default", { - name: "uz-Cyrl", - englishName: "Uzbek (Cyrillic)", - nativeName: "Ўзбек", - language: "uz-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñўм" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Ñкшанба","душанба","Ñешанба","чоршанба","пайшанба","жума","шанба"], - namesAbbr: ["Ñкш","дш","Ñш","чш","пш","ж","ш"], - namesShort: ["Ñ","д","Ñ","ч","п","ж","ш"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвар","феврал","март","апрел","май","июн","июл","авгуÑÑ‚","ÑентÑбр","октÑбр","ноÑбр","декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","маÑ","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "yyyy 'йил' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'йил' d-MMMM HH:mm", - F: "yyyy 'йил' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.uz-Latn-UZ.js b/pub/lib/globalize/cultures/globalize.culture.uz-Latn-UZ.js deleted file mode 100644 index 2ce219cb68902db07c74f0cc047552f27862f44f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.uz-Latn-UZ.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture uz-Latn-UZ - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "uz-Latn-UZ", "default", { - name: "uz-Latn-UZ", - englishName: "Uzbek (Latin, Uzbekistan)", - nativeName: "U'zbek (U'zbekiston Respublikasi)", - language: "uz-Latn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": " ", - ".": ",", - symbol: "so'm" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"], - namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."], - namesShort: ["ya","d","s","ch","p","j","sh"] - }, - months: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM yyyy", - D: "yyyy 'yil' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'yil' d-MMMM HH:mm", - F: "yyyy 'yil' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.uz-Latn.js b/pub/lib/globalize/cultures/globalize.culture.uz-Latn.js deleted file mode 100644 index ab03776adcc89ac49140ee3918c2b8bd5f111133..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.uz-Latn.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture uz-Latn - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "uz-Latn", "default", { - name: "uz-Latn", - englishName: "Uzbek (Latin)", - nativeName: "U'zbek", - language: "uz-Latn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": " ", - ".": ",", - symbol: "so'm" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"], - namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."], - namesShort: ["ya","d","s","ch","p","j","sh"] - }, - months: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM yyyy", - D: "yyyy 'yil' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'yil' d-MMMM HH:mm", - F: "yyyy 'yil' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.uz.js b/pub/lib/globalize/cultures/globalize.culture.uz.js deleted file mode 100644 index c5e752fd66b313cafa0d49cd531ee23978086807..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.uz.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Globalize Culture uz - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "uz", "default", { - name: "uz", - englishName: "Uzbek", - nativeName: "U'zbek", - language: "uz", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": " ", - ".": ",", - symbol: "so'm" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"], - namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."], - namesShort: ["ya","d","s","ch","p","j","sh"] - }, - months: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM yyyy", - D: "yyyy 'yil' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'yil' d-MMMM HH:mm", - F: "yyyy 'yil' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.vi-VN.js b/pub/lib/globalize/cultures/globalize.culture.vi-VN.js deleted file mode 100644 index 7e4194908a3107f34563467aec6c32df0cd030f4..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.vi-VN.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture vi-VN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "vi-VN", "default", { - name: "vi-VN", - englishName: "Vietnamese (Vietnam)", - nativeName: "TiêÌng Việt (Việt Nam)", - language: "vi", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "â‚«" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Chủ Nhật","ThÆ°Ì Hai","ThÆ°Ì Ba","ThÆ°Ì Tư","ThÆ°Ì Năm","ThÆ°Ì SaÌu","ThÆ°Ì Bảy"], - namesAbbr: ["CN","Hai","Ba","Tư","Năm","SaÌu","Bảy"], - namesShort: ["C","H","B","T","N","S","B"] - }, - months: { - names: ["ThaÌng Giêng","ThaÌng Hai","ThaÌng Ba","ThaÌng Tư","ThaÌng Năm","ThaÌng SaÌu","ThaÌng Bảy","ThaÌng TaÌm","ThaÌng ChiÌn","ThaÌng Mười","ThaÌng Mười Một","ThaÌng Mười Hai",""], - namesAbbr: ["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12",""] - }, - AM: ["SA","sa","SA"], - PM: ["CH","ch","CH"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - f: "dd MMMM yyyy h:mm tt", - F: "dd MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.vi.js b/pub/lib/globalize/cultures/globalize.culture.vi.js deleted file mode 100644 index 63aea14a78d715a7ba28070b51d733df7f74f59c..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.vi.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture vi - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "vi", "default", { - name: "vi", - englishName: "Vietnamese", - nativeName: "TiêÌng Việt", - language: "vi", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "â‚«" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Chủ Nhật","ThÆ°Ì Hai","ThÆ°Ì Ba","ThÆ°Ì Tư","ThÆ°Ì Năm","ThÆ°Ì SaÌu","ThÆ°Ì Bảy"], - namesAbbr: ["CN","Hai","Ba","Tư","Năm","SaÌu","Bảy"], - namesShort: ["C","H","B","T","N","S","B"] - }, - months: { - names: ["ThaÌng Giêng","ThaÌng Hai","ThaÌng Ba","ThaÌng Tư","ThaÌng Năm","ThaÌng SaÌu","ThaÌng Bảy","ThaÌng TaÌm","ThaÌng ChiÌn","ThaÌng Mười","ThaÌng Mười Một","ThaÌng Mười Hai",""], - namesAbbr: ["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12",""] - }, - AM: ["SA","sa","SA"], - PM: ["CH","ch","CH"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - f: "dd MMMM yyyy h:mm tt", - F: "dd MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.wo-SN.js b/pub/lib/globalize/cultures/globalize.culture.wo-SN.js deleted file mode 100644 index 3d57db287d601fab54a6d491136529b00203d351..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.wo-SN.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture wo-SN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "wo-SN", "default", { - name: "wo-SN", - englishName: "Wolof (Senegal)", - nativeName: "Wolof (Sénégal)", - language: "wo", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "XOF" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.wo.js b/pub/lib/globalize/cultures/globalize.culture.wo.js deleted file mode 100644 index de914b02b0747723efe0fc9122e7f168d161e5c0..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.wo.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Globalize Culture wo - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "wo", "default", { - name: "wo", - englishName: "Wolof", - nativeName: "Wolof", - language: "wo", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "XOF" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.xh-ZA.js b/pub/lib/globalize/cultures/globalize.culture.xh-ZA.js deleted file mode 100644 index 8cd414b70ea6a88b5399ee92bde4c189ac640dae..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.xh-ZA.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Globalize Culture xh-ZA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "xh-ZA", "default", { - name: "xh-ZA", - englishName: "isiXhosa (South Africa)", - nativeName: "isiXhosa (uMzantsi Afrika)", - language: "xh", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"], - namesShort: ["Ca","Mv","Lb","Lt","Ln","Lh","Mg"] - }, - months: { - names: ["Mqungu","Mdumba","Kwindla","Tshazimpuzi","Canzibe","Silimela","Khala","Thupha","Msintsi","Dwarha","Nkanga","Mnga",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.xh.js b/pub/lib/globalize/cultures/globalize.culture.xh.js deleted file mode 100644 index 44b023c7d5e680bb67dcaa3d3ba426fb2c29d33f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.xh.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Globalize Culture xh - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "xh", "default", { - name: "xh", - englishName: "isiXhosa", - nativeName: "isiXhosa", - language: "xh", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"], - namesShort: ["Ca","Mv","Lb","Lt","Ln","Lh","Mg"] - }, - months: { - names: ["Mqungu","Mdumba","Kwindla","Tshazimpuzi","Canzibe","Silimela","Khala","Thupha","Msintsi","Dwarha","Nkanga","Mnga",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.yo-NG.js b/pub/lib/globalize/cultures/globalize.culture.yo-NG.js deleted file mode 100644 index 1f8bb4f239f5ef5d294df8d4c60fdad6c5972195..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.yo-NG.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture yo-NG - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "yo-NG", "default", { - name: "yo-NG", - englishName: "Yoruba (Nigeria)", - nativeName: "Yoruba (Nigeria)", - language: "yo", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"], - namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"], - namesShort: ["A","A","I","O","O","E","A"] - }, - months: { - names: ["Osu kinni","Osu keji","Osu keta","Osu kerin","Osu karun","Osu kefa","Osu keje","Osu kejo","Osu kesan","Osu kewa","Osu kokanla","Osu keresi",""], - namesAbbr: ["kin.","kej.","ket.","ker.","kar.","kef.","kej.","kej.","kes.","kew.","kok.","ker.",""] - }, - AM: ["Owuro","owuro","OWURO"], - PM: ["Ale","ale","ALE"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.yo.js b/pub/lib/globalize/cultures/globalize.culture.yo.js deleted file mode 100644 index a081e59ccf05f540cfba5c72cd19289324a70b09..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.yo.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Globalize Culture yo - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "yo", "default", { - name: "yo", - englishName: "Yoruba", - nativeName: "Yoruba", - language: "yo", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"], - namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"], - namesShort: ["A","A","I","O","O","E","A"] - }, - months: { - names: ["Osu kinni","Osu keji","Osu keta","Osu kerin","Osu karun","Osu kefa","Osu keje","Osu kejo","Osu kesan","Osu kewa","Osu kokanla","Osu keresi",""], - namesAbbr: ["kin.","kej.","ket.","ker.","kar.","kef.","kej.","kej.","kes.","kew.","kok.","ker.",""] - }, - AM: ["Owuro","owuro","OWURO"], - PM: ["Ale","ale","ALE"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-CHS.js b/pub/lib/globalize/cultures/globalize.culture.zh-CHS.js deleted file mode 100644 index a34813129f582250234e83cd67c7a6da9621d053..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-CHS.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture zh-CHS - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-CHS", "default", { - name: "zh-CHS", - englishName: "Chinese (Simplified) Legacy", - nativeName: "䏿–‡(简体) 旧版", - language: "zh-CHS", - numberFormat: { - "NaN": "éžæ•°å—", - negativeInfinity: "è´Ÿæ— ç©·å¤§", - positiveInfinity: "æ£æ— 穷大", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-CHT.js b/pub/lib/globalize/cultures/globalize.culture.zh-CHT.js deleted file mode 100644 index 3449b909607cab2029405c2bebd0bcce05276bd0..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-CHT.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture zh-CHT - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-CHT", "default", { - name: "zh-CHT", - englishName: "Chinese (Traditional) Legacy", - nativeName: "䏿–‡(ç¹é«”) 舊版", - language: "zh-CHT", - numberFormat: { - "NaN": "éžæ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "HK$" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-CN.js b/pub/lib/globalize/cultures/globalize.culture.zh-CN.js deleted file mode 100644 index 88d67b3cf9ad43839c91ade47596e37d8df2f9e2..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-CN.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture zh-CN - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-CN", "default", { - name: "zh-CN", - englishName: "Chinese (Simplified, PRC)", - nativeName: "䏿–‡(ä¸åŽäººæ°‘共和国)", - language: "zh-CHS", - numberFormat: { - "NaN": "éžæ•°å—", - negativeInfinity: "è´Ÿæ— ç©·å¤§", - positiveInfinity: "æ£æ— 穷大", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-HK.js b/pub/lib/globalize/cultures/globalize.culture.zh-HK.js deleted file mode 100644 index 0886288c2adc91e67a2e033bf8a4a5e662bf3565..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-HK.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture zh-HK - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-HK", "default", { - name: "zh-HK", - englishName: "Chinese (Traditional, Hong Kong S.A.R.)", - nativeName: "䏿–‡(香港特別行政å€)", - language: "zh-CHT", - numberFormat: { - "NaN": "éžæ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "HK$" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-Hans.js b/pub/lib/globalize/cultures/globalize.culture.zh-Hans.js deleted file mode 100644 index c18946e3171343510f907c431b80c4e3ac6bb3d0..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-Hans.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture zh-Hans - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-Hans", "default", { - name: "zh-Hans", - englishName: "Chinese (Simplified)", - nativeName: "䏿–‡(简体)", - language: "zh-Hans", - numberFormat: { - "NaN": "éžæ•°å—", - negativeInfinity: "è´Ÿæ— ç©·å¤§", - positiveInfinity: "æ£æ— 穷大", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-Hant.js b/pub/lib/globalize/cultures/globalize.culture.zh-Hant.js deleted file mode 100644 index d34fa0309a2d2d90d6ddb29d31fc00357629e98f..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-Hant.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture zh-Hant - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-Hant", "default", { - name: "zh-Hant", - englishName: "Chinese (Traditional)", - nativeName: "䏿–‡(ç¹é«”)", - language: "zh-Hant", - numberFormat: { - "NaN": "éžæ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "HK$" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-MO.js b/pub/lib/globalize/cultures/globalize.culture.zh-MO.js deleted file mode 100644 index 4c138a5b754914a1b53305f4dda010c1c4f464c1..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-MO.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Globalize Culture zh-MO - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-MO", "default", { - name: "zh-MO", - englishName: "Chinese (Traditional, Macao S.A.R.)", - nativeName: "䏿–‡(澳門特別行政å€)", - language: "zh-CHT", - numberFormat: { - "NaN": "éžæ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "MOP" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-SG.js b/pub/lib/globalize/cultures/globalize.culture.zh-SG.js deleted file mode 100644 index 1e982e97687d0c6b4ba81b2b7a50db441534acdf..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-SG.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Globalize Culture zh-SG - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-SG", "default", { - name: "zh-SG", - englishName: "Chinese (Simplified, Singapore)", - nativeName: "䏿–‡(æ–°åŠ å¡)", - language: "zh-CHS", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' tt h:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' tt h:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh-TW.js b/pub/lib/globalize/cultures/globalize.culture.zh-TW.js deleted file mode 100644 index 67a71b98f9a9bb77e12ce1ab640287f9e763bc9e..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh-TW.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Globalize Culture zh-TW - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh-TW", "default", { - name: "zh-TW", - englishName: "Chinese (Traditional, Taiwan)", - nativeName: "䏿–‡(å°ç£)", - language: "zh-CHT", - numberFormat: { - "NaN": "䏿˜¯ä¸€å€‹æ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "NT$" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"西元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "tt hh:mm", - T: "tt hh:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' tt hh:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' tt hh:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - }, - Taiwan: { - name: "Taiwan", - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"","start":null,"offset":1911}], - twoDigitYearMax: 99, - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "tt hh:mm", - T: "tt hh:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' tt hh:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' tt hh:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zh.js b/pub/lib/globalize/cultures/globalize.culture.zh.js deleted file mode 100644 index 5d4ea5c76ef537cb046c7b7ebc4bfd80a419c540..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zh.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Globalize Culture zh - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zh", "default", { - name: "zh", - englishName: "Chinese", - nativeName: "䏿–‡", - language: "zh", - numberFormat: { - "NaN": "éžæ•°å—", - negativeInfinity: "è´Ÿæ— ç©·å¤§", - positiveInfinity: "æ£æ— 穷大", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zu-ZA.js b/pub/lib/globalize/cultures/globalize.culture.zu-ZA.js deleted file mode 100644 index 45aeea1ec1ae7a32ea155f8b30e6bc8103687316..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zu-ZA.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Globalize Culture zu-ZA - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zu-ZA", "default", { - name: "zu-ZA", - englishName: "isiZulu (South Africa)", - nativeName: "isiZulu (iNingizimu Afrika)", - language: "zu", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"], - namesAbbr: ["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."] - }, - months: { - names: ["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""], - namesAbbr: ["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.culture.zu.js b/pub/lib/globalize/cultures/globalize.culture.zu.js deleted file mode 100644 index 74981993eb2e678aaba3d5ec6704c1349cf8cf27..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.culture.zu.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Globalize Culture zu - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "zu", "default", { - name: "zu", - englishName: "isiZulu", - nativeName: "isiZulu", - language: "zu", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"], - namesAbbr: ["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."] - }, - months: { - names: ["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""], - namesAbbr: ["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/cultures/globalize.cultures.js b/pub/lib/globalize/cultures/globalize.cultures.js deleted file mode 100644 index 71f5f4bf96256909a422cbdfacedc55033d00f91..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/cultures/globalize.cultures.js +++ /dev/null @@ -1,24063 +0,0 @@ -/** - * Globalize Cultures - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * This file was generated by the Globalize Culture Generator - * Translation: bugs found in this file need to be fixed in the generator - */ - -(function( window, undefined ) { - -var Globalize; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - Globalize = require( "globalize" ); -} else { - // Global variable - Globalize = window.Globalize; -} - -Globalize.addCultureInfo( "ar", "default", { - name: "ar", - englishName: "Arabic", - nativeName: "العربية", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "ر.س.\u200f" - } - }, - calendars: { - standard: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "bg", "default", { - name: "bg", - englishName: "Bulgarian", - nativeName: "българÑки", - language: "bg", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "- безкрайноÑÑ‚", - positiveInfinity: "+ безкрайноÑÑ‚", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "лв." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["неделÑ","понеделник","вторник","ÑÑ€Ñда","четвъртък","петък","Ñъбота"], - namesAbbr: ["нед","пон","вт","ÑÑ€","четв","пет","Ñъб"], - namesShort: ["н","п","в","Ñ","ч","п","Ñ"] - }, - months: { - names: ["Ñнуари","февруари","март","април","май","юни","юли","авгуÑÑ‚","Ñептември","октомври","ноември","декември",""], - namesAbbr: ["Ñн","февр","март","апр","май","юни","юли","авг","Ñепт","окт","ноември","дек",""] - }, - AM: null, - PM: null, - eras: [{"name":"Ñлед новата ера","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy 'г.'", - D: "dd MMMM yyyy 'г.'", - t: "HH:mm 'ч.'", - T: "HH:mm:ss 'ч.'", - f: "dd MMMM yyyy 'г.' HH:mm 'ч.'", - F: "dd MMMM yyyy 'г.' HH:mm:ss 'ч.'", - M: "dd MMMM", - Y: "MMMM yyyy 'г.'" - } - } - } -}); - -Globalize.addCultureInfo( "ca", "default", { - name: "ca", - englishName: "Catalan", - nativeName: "català ", - language: "ca", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinit", - positiveInfinity: "Infinit", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"], - namesAbbr: ["dg.","dl.","dt.","dc.","dj.","dv.","ds."], - namesShort: ["dg","dl","dt","dc","dj","dv","ds"] - }, - months: { - names: ["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""], - namesAbbr: ["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' / 'MMMM' / 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' / 'MMMM' / 'yyyy HH:mm", - F: "dddd, d' / 'MMMM' / 'yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM' / 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "zh-Hans", "default", { - name: "zh-Hans", - englishName: "Chinese (Simplified)", - nativeName: "䏿–‡(简体)", - language: "zh-Hans", - numberFormat: { - "NaN": "éžæ•°å—", - negativeInfinity: "è´Ÿæ— ç©·å¤§", - positiveInfinity: "æ£æ— 穷大", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "cs", "default", { - name: "cs", - englishName: "Czech", - nativeName: "ÄeÅ¡tina", - language: "cs", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Nenà ÄÃslo", - negativeInfinity: "-nekoneÄno", - positiveInfinity: "+nekoneÄno", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "KÄ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedÄ›le","pondÄ›lÃ","úterý","stÅ™eda","Ätvrtek","pátek","sobota"], - namesAbbr: ["ne","po","út","st","Ät","pá","so"], - namesShort: ["ne","po","út","st","Ät","pá","so"] - }, - months: { - names: ["leden","únor","bÅ™ezen","duben","kvÄ›ten","Äerven","Äervenec","srpen","zářÃ","Å™Ãjen","listopad","prosinec",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - monthsGenitive: { - names: ["ledna","února","bÅ™ezna","dubna","kvÄ›tna","Äervna","Äervence","srpna","zářÃ","Å™Ãjna","listopadu","prosince",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["dop.","dop.","DOP."], - PM: ["odp.","odp.","ODP."], - eras: [{"name":"n. l.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "da", "default", { - name: "da", - englishName: "Danish", - nativeName: "dansk", - language: "da", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "de", "default", { - name: "de", - englishName: "German", - nativeName: "Deutsch", - language: "de", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "el", "default", { - name: "el", - englishName: "Greek", - nativeName: "Ελληνικά", - language: "el", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "μη αÏιθμός", - negativeInfinity: "-ΆπειÏο", - positiveInfinity: "ΆπειÏο", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["ΚυÏιακή","ΔευτÎÏα","ΤÏίτη","ΤετάÏτη","Î Îμπτη","ΠαÏασκευή","Σάββατο"], - namesAbbr: ["ΚυÏ","Δευ","ΤÏι","Τετ","Πεμ","ΠαÏ","Σαβ"], - namesShort: ["Κυ","Δε","ΤÏ","Τε","Πε","Πα","Σά"] - }, - months: { - names: ["ΙανουάÏιος","ΦεβÏουάÏιος","ΜάÏτιος","ΑπÏίλιος","Μάιος","ΙοÏνιος","ΙοÏλιος","ΑÏγουστος","ΣεπτÎμβÏιος","ΟκτώβÏιος","ÎοÎμβÏιος","ΔεκÎμβÏιος",""], - namesAbbr: ["Ιαν","Φεβ","ΜαÏ","ΑπÏ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Îοε","Δεκ",""] - }, - monthsGenitive: { - names: ["ΙανουαÏίου","ΦεβÏουαÏίου","ΜαÏτίου","ΑπÏιλίου","ΜαÎου","Ιουνίου","Ιουλίου","ΑυγοÏστου","ΣεπτεμβÏίου","ΟκτωβÏίου","ÎοεμβÏίου","ΔεκεμβÏίου",""], - namesAbbr: ["Ιαν","Φεβ","ΜαÏ","ΑπÏ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Îοε","Δεκ",""] - }, - AM: ["πμ","πμ","ΠΜ"], - PM: ["μμ","μμ","ΜΜ"], - eras: [{"name":"μ.Χ.","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "dddd, d MMMM yyyy", - f: "dddd, d MMMM yyyy h:mm tt", - F: "dddd, d MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es", "default", { - name: "es", - englishName: "Spanish", - nativeName: "español", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fi", "default", { - name: "fi", - englishName: "Finnish", - nativeName: "suomi", - language: "fi", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"], - namesAbbr: ["su","ma","ti","ke","to","pe","la"], - namesShort: ["su","ma","ti","ke","to","pe","la"] - }, - months: { - names: ["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""], - namesAbbr: ["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM'ta 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM'ta 'yyyy H:mm", - F: "d. MMMM'ta 'yyyy H:mm:ss", - M: "d. MMMM'ta'", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fr", "default", { - name: "fr", - englishName: "French", - nativeName: "français", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "he", "default", { - name: "he", - englishName: "Hebrew", - nativeName: "עברית", - language: "he", - isRTL: true, - numberFormat: { - "NaN": "×œ× ×ž×¡×¤×¨", - negativeInfinity: "××™× ×¡×•×£Â ×©×œ×™×œ×™", - positiveInfinity: "××™× ×¡×•×£Â ×—×™×•×‘×™", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "₪" - } - }, - calendars: { - standard: { - days: { - names: ["יו× ר×שון","יו×Â ×©× ×™","יו× שלישי","יו× רביעי","יו× חמישי","יו× שישי","שבת"], - namesAbbr: ["יו× ×","יו× ב","יו× ג","יו× ד","יו× ה","יו× ו","שבת"], - namesShort: ["×","ב","×’","ד","×”","ו","ש"] - }, - months: { - names: ["×™× ×•×ר","פברו×ר","מרץ","×פריל","מ××™","×™×•× ×™","יולי","×וגוסט","ספטמבר","×וקטובר","× ×•×‘×ž×‘×¨","דצמבר",""], - namesAbbr: ["×™× ×•","פבר","מרץ","×פר","מ××™","×™×•× ","יול","×וג","ספט","×וק","× ×•×‘","דצמ",""] - }, - eras: [{"name":"לספירה","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd dd MMMM yyyy HH:mm", - F: "dddd dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - }, - Hebrew: { - name: "Hebrew", - "/": " ", - days: { - names: ["יו× ר×שון","יו×Â ×©× ×™","יו× שלישי","יו× רביעי","יו× חמישי","יו× שישי","שבת"], - namesAbbr: ["×","ב","×’","ד","×”","ו","ש"], - namesShort: ["×","ב","×’","ד","×”","ו","ש"] - }, - months: { - names: ["תשרי","חשון","כסלו","טבת","שבט","×דר","×דר ב","× ×™×¡×Ÿ","×ייר","סיון","תמוז","×ב","×לול"], - namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","×דר","×דר ב","× ×™×¡×Ÿ","×ייר","סיון","תמוז","×ב","×לול"] - }, - eras: [{"name":"C.E.","start":null,"offset":0}], - twoDigitYearMax: 5790, - patterns: { - d: "dd MMMM yyyy", - D: "dddd dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd dd MMMM yyyy HH:mm", - F: "dddd dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hu", "default", { - name: "hu", - englishName: "Hungarian", - nativeName: "magyar", - language: "hu", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "nem szám", - negativeInfinity: "negatÃv végtelen", - positiveInfinity: "végtelen", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ft" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["vasárnap","hétfÅ‘","kedd","szerda","csütörtök","péntek","szombat"], - namesAbbr: ["V","H","K","Sze","Cs","P","Szo"], - namesShort: ["V","H","K","Sze","Cs","P","Szo"] - }, - months: { - names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""], - namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""] - }, - AM: ["de.","de.","DE."], - PM: ["du.","du.","DU."], - eras: [{"name":"i.sz.","start":null,"offset":0}], - patterns: { - d: "yyyy.MM.dd.", - D: "yyyy. MMMM d.", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy. MMMM d. H:mm", - F: "yyyy. MMMM d. H:mm:ss", - M: "MMMM d.", - Y: "yyyy. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "is", "default", { - name: "is", - englishName: "Icelandic", - nativeName: "Ãslenska", - language: "is", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"], - namesAbbr: ["sun.","mán.","þri.","mið.","fim.","fös.","lau."], - namesShort: ["su","má","þr","mi","fi","fö","la"] - }, - months: { - names: ["janúar","febrúar","mars","aprÃl","maÃ","júnÃ","júlÃ","ágúst","september","október","nóvember","desember",""], - namesAbbr: ["jan.","feb.","mar.","apr.","maÃ","jún.","júl.","ágú.","sep.","okt.","nóv.","des.",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "it", "default", { - name: "it", - englishName: "Italian", - nativeName: "italiano", - language: "it", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "Non un numero reale", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"], - namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"], - namesShort: ["do","lu","ma","me","gi","ve","sa"] - }, - months: { - names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""], - namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ja", "default", { - name: "ja", - englishName: "Japanese", - nativeName: "日本語", - language: "ja", - numberFormat: { - "NaN": "NaN (éžæ•°å€¤)", - negativeInfinity: "-∞", - positiveInfinity: "+∞", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["-$n","$n"], - decimals: 0, - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["日曜日","月曜日","ç«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"], - namesAbbr: ["æ—¥","月","ç«","æ°´","木","金","土"], - namesShort: ["æ—¥","月","ç«","æ°´","木","金","土"] - }, - months: { - names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["åˆå‰","åˆå‰","åˆå‰"], - PM: ["åˆå¾Œ","åˆå¾Œ","åˆå¾Œ"], - eras: [{"name":"西暦","start":null,"offset":0}], - patterns: { - d: "yyyy/MM/dd", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - }, - Japanese: { - name: "Japanese", - days: { - names: ["日曜日","月曜日","ç«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"], - namesAbbr: ["æ—¥","月","ç«","æ°´","木","金","土"], - namesShort: ["æ—¥","月","ç«","æ°´","木","金","土"] - }, - months: { - names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["åˆå‰","åˆå‰","åˆå‰"], - PM: ["åˆå¾Œ","åˆå¾Œ","åˆå¾Œ"], - eras: [{"name":"å¹³æˆ","start":null,"offset":1867},{"name":"æ˜å’Œ","start":-1812153600000,"offset":1911},{"name":"大æ£","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}], - twoDigitYearMax: 99, - patterns: { - d: "gg y/M/d", - D: "gg y'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "gg y'å¹´'M'月'd'æ—¥' H:mm", - F: "gg y'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "gg y'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "ko", "default", { - name: "ko", - englishName: "Korean", - nativeName: "한êµì–´", - language: "ko", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - decimals: 0, - symbol: "â‚©" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ì¼ìš”ì¼","월요ì¼","화요ì¼","수요ì¼","목요ì¼","금요ì¼","í† ìš”ì¼"], - namesAbbr: ["ì¼","ì›”","í™”","수","목","금","í† "], - namesShort: ["ì¼","ì›”","í™”","수","목","금","í† "] - }, - months: { - names: ["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["ì˜¤ì „","ì˜¤ì „","ì˜¤ì „"], - PM: ["오후","오후","오후"], - eras: [{"name":"서기","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy'ë…„' M'ì›”' d'ì¼' dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm", - F: "yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm:ss", - M: "M'ì›”' d'ì¼'", - Y: "yyyy'ë…„' M'ì›”'" - } - }, - Korean: { - name: "Korean", - "/": "-", - days: { - names: ["ì¼ìš”ì¼","월요ì¼","화요ì¼","수요ì¼","목요ì¼","금요ì¼","í† ìš”ì¼"], - namesAbbr: ["ì¼","ì›”","í™”","수","목","금","í† "], - namesShort: ["ì¼","ì›”","í™”","수","목","금","í† "] - }, - months: { - names: ["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["ì˜¤ì „","ì˜¤ì „","ì˜¤ì „"], - PM: ["오후","오후","오후"], - eras: [{"name":"단기","start":null,"offset":-2333}], - twoDigitYearMax: 4362, - patterns: { - d: "gg yyyy-MM-dd", - D: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm", - F: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm:ss", - M: "M'ì›”' d'ì¼'", - Y: "gg yyyy'ë…„' M'ì›”'" - } - } - } -}); - -Globalize.addCultureInfo( "nl", "default", { - name: "nl", - englishName: "Dutch", - nativeName: "Nederlands", - language: "nl", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"], - namesAbbr: ["zo","ma","di","wo","do","vr","za"], - namesShort: ["zo","ma","di","wo","do","vr","za"] - }, - months: { - names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d-M-yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "no", "default", { - name: "no", - englishName: "Norwegian", - nativeName: "norsk", - language: "no", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "pl", "default", { - name: "pl", - englishName: "Polish", - nativeName: "polski", - language: "pl", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "nie jest liczbÄ…", - negativeInfinity: "-nieskoÅ„czoność", - positiveInfinity: "+nieskoÅ„czoność", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "zÅ‚" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["niedziela","poniedziaÅ‚ek","wtorek","Å›roda","czwartek","piÄ…tek","sobota"], - namesAbbr: ["N","Pn","Wt","Åšr","Cz","Pt","So"], - namesShort: ["N","Pn","Wt","Åšr","Cz","Pt","So"] - }, - months: { - names: ["styczeÅ„","luty","marzec","kwiecieÅ„","maj","czerwiec","lipiec","sierpieÅ„","wrzesieÅ„","październik","listopad","grudzieÅ„",""], - namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""] - }, - monthsGenitive: { - names: ["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","wrzeÅ›nia","października","listopada","grudnia",""], - namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "pt", "default", { - name: "pt", - englishName: "Portuguese", - nativeName: "Português", - language: "pt", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NaN (Não é um número)", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "R$" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"], - namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"], - namesShort: ["D","S","T","Q","Q","S","S"] - }, - months: { - names: ["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""], - namesAbbr: ["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' de 'MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' de 'MMMM' de 'yyyy HH:mm", - F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss", - M: "dd' de 'MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "rm", "default", { - name: "rm", - englishName: "Romansh", - nativeName: "Rumantsch", - language: "rm", - numberFormat: { - ",": "'", - "NaN": "betg def.", - negativeInfinity: "-infinit", - positiveInfinity: "+infinit", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "fr." - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dumengia","glindesdi","mardi","mesemna","gievgia","venderdi","sonda"], - namesAbbr: ["du","gli","ma","me","gie","ve","so"], - namesShort: ["du","gli","ma","me","gie","ve","so"] - }, - months: { - names: ["schaner","favrer","mars","avrigl","matg","zercladur","fanadur","avust","settember","october","november","december",""], - namesAbbr: ["schan","favr","mars","avr","matg","zercl","fan","avust","sett","oct","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"s. Cr.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d MMMM yyyy HH:mm", - F: "dddd, d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ro", "default", { - name: "ro", - englishName: "Romanian", - nativeName: "română", - language: "ro", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "lei" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["duminică","luni","marÅ£i","miercuri","joi","vineri","sâmbătă"], - namesAbbr: ["D","L","Ma","Mi","J","V","S"], - namesShort: ["D","L","Ma","Mi","J","V","S"] - }, - months: { - names: ["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""], - namesAbbr: ["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ru", "default", { - name: "ru", - englishName: "Russian", - nativeName: "руÑÑкий", - language: "ru", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["воÑкреÑенье","понедельник","вторник","Ñреда","четверг","пÑтница","Ñуббота"], - namesAbbr: ["Ð’Ñ","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"], - namesShort: ["Ð’Ñ","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"] - }, - months: { - names: ["Январь","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Ñнв","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - monthsGenitive: { - names: ["ÑнварÑ","февралÑ","марта","апрелÑ","маÑ","июнÑ","июлÑ","авгуÑта","ÑентÑбрÑ","октÑбрÑ","ноÑбрÑ","декабрÑ",""], - namesAbbr: ["Ñнв","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy 'г.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'г.' H:mm", - F: "d MMMM yyyy 'г.' H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hr", "default", { - name: "hr", - englishName: "Croatian", - nativeName: "hrvatski", - language: "hr", - numberFormat: { - pattern: ["- n"], - ",": ".", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kn" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["sijeÄanj","veljaÄa","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - monthsGenitive: { - names: ["sijeÄnja","veljaÄe","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy.", - D: "d. MMMM yyyy.", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy. H:mm", - F: "d. MMMM yyyy. H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "sk", "default", { - name: "sk", - englishName: "Slovak", - nativeName: "slovenÄina", - language: "sk", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Nie je ÄÃslo", - negativeInfinity: "-nekoneÄno", - positiveInfinity: "+nekoneÄno", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["nedeľa","pondelok","utorok","streda","Å¡tvrtok","piatok","sobota"], - namesAbbr: ["ne","po","ut","st","Å¡t","pi","so"], - namesShort: ["ne","po","ut","st","Å¡t","pi","so"] - }, - months: { - names: ["január","február","marec","aprÃl","máj","jún","júl","august","september","október","november","december",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - monthsGenitive: { - names: ["januára","februára","marca","aprÃla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. l.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sq", "default", { - name: "sq", - englishName: "Albanian", - nativeName: "shqipe", - language: "sq", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-infinit", - positiveInfinity: "infinit", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": ".", - ".": ",", - symbol: "Lek" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"], - namesAbbr: ["Die","Hën","Mar","Mër","Enj","Pre","Sht"], - namesShort: ["Di","Hë","Ma","Më","En","Pr","Sh"] - }, - months: { - names: ["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor",""], - namesAbbr: ["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj",""] - }, - AM: ["PD","pd","PD"], - PM: ["MD","md","MD"], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy-MM-dd", - t: "h:mm.tt", - T: "h:mm:ss.tt", - f: "yyyy-MM-dd h:mm.tt", - F: "yyyy-MM-dd h:mm:ss.tt", - Y: "yyyy-MM" - } - } - } -}); - -Globalize.addCultureInfo( "sv", "default", { - name: "sv", - englishName: "Swedish", - nativeName: "svenska", - language: "sv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["söndag","mÃ¥ndag","tisdag","onsdag","torsdag","fredag","lördag"], - namesAbbr: ["sö","mÃ¥","ti","on","to","fr","lö"], - namesShort: ["sö","mÃ¥","ti","on","to","fr","lö"] - }, - months: { - names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "'den 'd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "'den 'd MMMM yyyy HH:mm", - F: "'den 'd MMMM yyyy HH:mm:ss", - M: "'den 'd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "th", "default", { - name: "th", - englishName: "Thai", - nativeName: "ไทย", - language: "th", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "฿" - } - }, - calendars: { - standard: { - name: "ThaiBuddhist", - firstDay: 1, - days: { - names: ["à¸à¸²à¸—ิตย์","จันทร์","à¸à¸±à¸‡à¸„าร","พุธ","พฤหัสบดี","ศุà¸à¸£à¹Œ","เสาร์"], - namesAbbr: ["à¸à¸².","จ.","à¸.","พ.","พฤ.","ศ.","ส."], - namesShort: ["à¸","จ","à¸","พ","พ","ศ","ส"] - }, - months: { - names: ["มà¸à¸£à¸²à¸„ม","à¸à¸¸à¸¡à¸ าพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","à¸à¸£à¸à¸Žà¸²à¸„ม","สิงหาคม","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","ตุลาคม","พฤศจิà¸à¸²à¸¢à¸™","ธันวาคม",""], - namesAbbr: ["ม.ค.","à¸.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","à¸.ค.","ส.ค.","à¸.ย.","ต.ค.","พ.ย.","ธ.ค.",""] - }, - eras: [{"name":"พ.ศ.","start":null,"offset":-543}], - twoDigitYearMax: 2572, - patterns: { - d: "d/M/yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - }, - Gregorian_Localized: { - firstDay: 1, - days: { - names: ["à¸à¸²à¸—ิตย์","จันทร์","à¸à¸±à¸‡à¸„าร","พุธ","พฤหัสบดี","ศุà¸à¸£à¹Œ","เสาร์"], - namesAbbr: ["à¸à¸².","จ.","à¸.","พ.","พฤ.","ศ.","ส."], - namesShort: ["à¸","จ","à¸","พ","พ","ศ","ส"] - }, - months: { - names: ["มà¸à¸£à¸²à¸„ม","à¸à¸¸à¸¡à¸ าพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","à¸à¸£à¸à¸Žà¸²à¸„ม","สิงหาคม","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","ตุลาคม","พฤศจิà¸à¸²à¸¢à¸™","ธันวาคม",""], - namesAbbr: ["ม.ค.","à¸.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","à¸.ค.","ส.ค.","à¸.ย.","ต.ค.","พ.ย.","ธ.ค.",""] - }, - patterns: { - d: "d/M/yyyy", - D: "'วัน'dddd'ที่' d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "'วัน'dddd'ที่' d MMMM yyyy H:mm", - F: "'วัน'dddd'ที่' d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "tr", "default", { - name: "tr", - englishName: "Turkish", - nativeName: "Türkçe", - language: "tr", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "TL" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Pazar","Pazartesi","Salı","ÇarÅŸamba","PerÅŸembe","Cuma","Cumartesi"], - namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"], - namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"] - }, - months: { - names: ["Ocak","Åžubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄŸustos","Eylül","Ekim","Kasım","Aralık",""], - namesAbbr: ["Oca","Åžub","Mar","Nis","May","Haz","Tem","AÄŸu","Eyl","Eki","Kas","Ara",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "dd MMMM yyyy dddd", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy dddd HH:mm", - F: "dd MMMM yyyy dddd HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ur", "default", { - name: "ur", - englishName: "Urdu", - nativeName: "Ø§ÙØ±Ø¯Ùˆ", - language: "ur", - isRTL: true, - numberFormat: { - currency: { - pattern: ["$n-","$n"], - symbol: "Rs" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","Ù‡ÙØªÙ‡"], - namesAbbr: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","Ù‡ÙØªÙ‡"], - namesShort: ["ا","Ù¾","Ù…","ب","ج","ج","Ù‡"] - }, - months: { - names: ["جنوری","ÙØ±ÙˆØ±ÛŒ","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""], - namesAbbr: ["جنوری","ÙØ±ÙˆØ±ÛŒ","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""] - }, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - f: "dd MMMM, yyyy h:mm tt", - F: "dd MMMM, yyyy h:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - } - } -}); - -Globalize.addCultureInfo( "id", "default", { - name: "id", - englishName: "Indonesian", - nativeName: "Bahasa Indonesia", - language: "id", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - decimals: 0, - ",": ".", - ".": ",", - symbol: "Rp" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"], - namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"], - namesShort: ["M","S","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""], - namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "uk", "default", { - name: "uk", - englishName: "Ukrainian", - nativeName: "українÑька", - language: "uk", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-безмежніÑть", - positiveInfinity: "безмежніÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚´" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["неділÑ","понеділок","вівторок","Ñереда","четвер","п'ÑтницÑ","Ñубота"], - namesAbbr: ["Ðд","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"], - namesShort: ["Ðд","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"] - }, - months: { - names: ["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","ВереÑень","Жовтень","ЛиÑтопад","Грудень",""], - namesAbbr: ["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","ЛиÑ","Гру",""] - }, - monthsGenitive: { - names: ["ÑічнÑ","лютого","березнÑ","квітнÑ","травнÑ","червнÑ","липнÑ","ÑерпнÑ","вереÑнÑ","жовтнÑ","лиÑтопада","груднÑ",""], - namesAbbr: ["Ñіч","лют","бер","кві","тра","чер","лип","Ñер","вер","жов","лиÑ","гру",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy' Ñ€.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy' Ñ€.' H:mm", - F: "d MMMM yyyy' Ñ€.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy' Ñ€.'" - } - } - } -}); - -Globalize.addCultureInfo( "be", "default", { - name: "be", - englishName: "Belarusian", - nativeName: "БеларуÑкі", - language: "be", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["нÑдзелÑ","панÑдзелак","аўторак","Ñерада","чацвер","пÑтніца","Ñубота"], - namesAbbr: ["нд","пн","аў","ÑÑ€","чц","пт","Ñб"], - namesShort: ["нд","пн","аў","ÑÑ€","чц","пт","Ñб"] - }, - months: { - names: ["Студзень","Люты","Сакавік","КраÑавік","Май","ЧÑрвень","Ліпень","Жнівень","ВераÑень","КаÑтрычнік","ЛіÑтапад","Снежань",""], - namesAbbr: ["Сту","Лют","Сак","Кра","Май","ЧÑÑ€","Ліп","Жні","Вер","КаÑ","ЛіÑ","Сне",""] - }, - monthsGenitive: { - names: ["ÑтудзенÑ","лютага","Ñакавіка","краÑавіка","маÑ","чÑрвенÑ","ліпенÑ","жніўнÑ","вераÑнÑ","каÑтрычніка","ліÑтапада","ÑнежнÑ",""], - namesAbbr: ["Сту","Лют","Сак","Кра","Май","ЧÑÑ€","Ліп","Жні","Вер","КаÑ","ЛіÑ","Сне",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sl", "default", { - name: "sl", - englishName: "Slovenian", - nativeName: "slovenski", - language: "sl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-neskonÄnost", - positiveInfinity: "neskonÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljek","torek","sreda","Äetrtek","petek","sobota"], - namesAbbr: ["ned","pon","tor","sre","Äet","pet","sob"], - namesShort: ["ne","po","to","sr","Äe","pe","so"] - }, - months: { - names: ["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "et", "default", { - name: "et", - englishName: "Estonian", - nativeName: "eesti", - language: "et", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "avaldamatu", - negativeInfinity: "miinuslõpmatus", - positiveInfinity: "plusslõpmatus", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"], - namesAbbr: ["P","E","T","K","N","R","L"], - namesShort: ["P","E","T","K","N","R","L"] - }, - months: { - names: ["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember",""], - namesAbbr: ["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets",""] - }, - AM: ["EL","el","EL"], - PM: ["PL","pl","PL"], - patterns: { - d: "d.MM.yyyy", - D: "d. MMMM yyyy'. a.'", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy'. a.' H:mm", - F: "d. MMMM yyyy'. a.' H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy'. a.'" - } - } - } -}); - -Globalize.addCultureInfo( "lv", "default", { - name: "lv", - englishName: "Latvian", - nativeName: "latvieÅ¡u", - language: "lv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-bezgalÄ«ba", - positiveInfinity: "bezgalÄ«ba", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": " ", - ".": ",", - symbol: "Ls" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["svÄ“tdiena","pirmdiena","otrdiena","treÅ¡diena","ceturtdiena","piektdiena","sestdiena"], - namesAbbr: ["sv","pr","ot","tr","ce","pk","se"], - namesShort: ["sv","pr","ot","tr","ce","pk","se"] - }, - months: { - names: ["janvÄris","februÄris","marts","aprÄ«lis","maijs","jÅ«nijs","jÅ«lijs","augusts","septembris","oktobris","novembris","decembris",""], - namesAbbr: ["jan","feb","mar","apr","mai","jÅ«n","jÅ«l","aug","sep","okt","nov","dec",""] - }, - monthsGenitive: { - names: ["janvÄrÄ«","februÄrÄ«","martÄ","aprÄ«lÄ«","maijÄ","jÅ«nijÄ","jÅ«lijÄ","augustÄ","septembrÄ«","oktobrÄ«","novembrÄ«","decembrÄ«",""], - namesAbbr: ["jan","feb","mar","apr","mai","jÅ«n","jÅ«l","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy.MM.dd.", - D: "dddd, yyyy'. gada 'd. MMMM", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, yyyy'. gada 'd. MMMM H:mm", - F: "dddd, yyyy'. gada 'd. MMMM H:mm:ss", - M: "d. MMMM", - Y: "yyyy. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "lt", "default", { - name: "lt", - englishName: "Lithuanian", - nativeName: "lietuvių", - language: "lt", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-begalybÄ—", - positiveInfinity: "begalybÄ—", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Lt" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sekmadienis","pirmadienis","antradienis","treÄiadienis","ketvirtadienis","penktadienis","Å¡eÅ¡tadienis"], - namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Å t"], - namesShort: ["S","P","A","T","K","Pn","Å "] - }, - months: { - names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjÅ«tis","rugsÄ—jis","spalis","lapkritis","gruodis",""], - namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] - }, - monthsGenitive: { - names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjÅ«Äio","rugsÄ—jo","spalio","lapkriÄio","gruodžio",""], - namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy.MM.dd", - D: "yyyy 'm.' MMMM d 'd.'", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'm.' MMMM d 'd.' HH:mm", - F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss", - M: "MMMM d 'd.'", - Y: "yyyy 'm.' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "tg", "default", { - name: "tg", - englishName: "Tajik", - nativeName: "Тоҷикӣ", - language: "tg", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ";", - symbol: "Ñ‚.Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - days: { - names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"], - namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"], - namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвари","феврали","марти","апрели","маи","июни","июли","авгуÑти","ÑентÑбри","октÑбри","ноÑбри","декабри",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fa", "default", { - name: "fa", - englishName: "Persian", - nativeName: "ÙØ§Ø±Ø³Ù‰", - language: "fa", - isRTL: true, - numberFormat: { - pattern: ["n-"], - currency: { - pattern: ["$n-","$ n"], - ".": "/", - symbol: "ريال" - } - }, - calendars: { - standard: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["ژانويه","Ùوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اÙكتبر","نوامبر","دسامبر",""], - namesAbbr: ["ژانويه","Ùوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اÙكتبر","نوامبر","دسامبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - patterns: { - d: "yyyy/MM/dd", - D: "yyyy/MM/dd", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "yyyy/MM/dd hh:mm tt", - F: "yyyy/MM/dd hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "vi", "default", { - name: "vi", - englishName: "Vietnamese", - nativeName: "TiêÌng Việt", - language: "vi", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "â‚«" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Chủ Nhật","ThÆ°Ì Hai","ThÆ°Ì Ba","ThÆ°Ì Tư","ThÆ°Ì Năm","ThÆ°Ì SaÌu","ThÆ°Ì Bảy"], - namesAbbr: ["CN","Hai","Ba","Tư","Năm","SaÌu","Bảy"], - namesShort: ["C","H","B","T","N","S","B"] - }, - months: { - names: ["ThaÌng Giêng","ThaÌng Hai","ThaÌng Ba","ThaÌng Tư","ThaÌng Năm","ThaÌng SaÌu","ThaÌng Bảy","ThaÌng TaÌm","ThaÌng ChiÌn","ThaÌng Mười","ThaÌng Mười Một","ThaÌng Mười Hai",""], - namesAbbr: ["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12",""] - }, - AM: ["SA","sa","SA"], - PM: ["CH","ch","CH"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - f: "dd MMMM yyyy h:mm tt", - F: "dd MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hy", "default", { - name: "hy", - englishName: "Armenian", - nativeName: "Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶", - language: "hy", - numberFormat: { - currency: { - pattern: ["-n $","n $"], - symbol: "Õ¤Ö€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Ô¿Õ«Ö€Õ¡Õ¯Õ«","ÔµÖ€Õ¯Õ¸Ö‚Õ·Õ¡Õ¢Õ©Õ«","ÔµÖ€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«","Õ‰Õ¸Ö€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«","Õ€Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«","ÕˆÕ’Ö€Õ¢Õ¡Õ©","Õ‡Õ¡Õ¢Õ¡Õ©"], - namesAbbr: ["Ô¿Õ«Ö€","ÔµÖ€Õ¯","ÔµÖ€Ö„","Õ‰Ö€Ö„","Õ€Õ¶Õ£","ÕˆÕ’Ö€","Õ‡Õ¢Õ©"], - namesShort: ["Ô¿","Ôµ","Ôµ","Õ‰","Õ€","Õˆ","Õ‡"] - }, - months: { - names: ["Õ€Õ¸Ö‚Õ¶Õ¾Õ¡Ö€","Õ“Õ¥Õ¿Ö€Õ¾Õ¡Ö€","Õ„Õ¡Ö€Õ¿","Ô±ÕºÖ€Õ«Õ¬","Õ„Õ¡ÕµÕ«Õ½","Õ€Õ¸Ö‚Õ¶Õ«Õ½","Õ€Õ¸Ö‚Õ¬Õ«Õ½","Õ•Õ£Õ¸Õ½Õ¿Õ¸Õ½","ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö€","Õ€Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€","Õ†Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö€","Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€",""], - namesAbbr: ["Õ€Õ†ÕŽ","Õ“ÕÕŽ","Õ„ÕÕ","Ô±ÕŠÕ","Õ„Õ…Õ","Õ€Õ†Õ","Õ€Ô¼Õ","Õ•Ô³Õ","ÕÔµÕŠ","Õ€ÕˆÔ¿","Õ†ÕˆÕ…","Ô´ÔµÔ¿",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM, yyyy H:mm", - F: "d MMMM, yyyy H:mm:ss", - M: "d MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "az", "default", { - name: "az", - englishName: "Azeri", - nativeName: "AzÉ™rbaycan\xadılı", - language: "az", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "man." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Bazar","Bazar ertÉ™si","ÇərÅŸÉ™nbə axÅŸamı","ÇərÅŸÉ™nbÉ™","Cümə axÅŸamı","CümÉ™","ŞənbÉ™"], - namesAbbr: ["B","Be","Ça","Ç","Ca","C","Åž"], - namesShort: ["B","Be","Ça","Ç","Ca","C","Åž"] - }, - months: { - names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - monthsGenitive: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "eu", "default", { - name: "eu", - englishName: "Basque", - nativeName: "euskara", - language: "eu", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "EdZ", - negativeInfinity: "-Infinitu", - positiveInfinity: "Infinitu", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"], - namesAbbr: ["ig.","al.","as.","az.","og.","or.","lr."], - namesShort: ["ig","al","as","az","og","or","lr"] - }, - months: { - names: ["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""], - namesAbbr: ["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "yyyy/MM/dd", - D: "dddd, yyyy.'eko' MMMM'k 'd", - t: "HH:mm", - T: "H:mm:ss", - f: "dddd, yyyy.'eko' MMMM'k 'd HH:mm", - F: "dddd, yyyy.'eko' MMMM'k 'd H:mm:ss", - Y: "yyyy.'eko' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "hsb", "default", { - name: "hsb", - englishName: "Upper Sorbian", - nativeName: "hornjoserbšćina", - language: "hsb", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "njedefinowane", - negativeInfinity: "-njekónÄne", - positiveInfinity: "+njekónÄne", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["njedźela","póndźela","wutora","srjeda","Å¡twórtk","pjatk","sobota"], - namesAbbr: ["nje","pón","wut","srj","Å¡tw","pja","sob"], - namesShort: ["n","p","w","s","Å¡","p","s"] - }, - months: { - names: ["januar","februar","mÄ›rc","apryl","meja","junij","julij","awgust","september","oktober","nowember","december",""], - namesAbbr: ["jan","feb","mÄ›r","apr","mej","jun","jul","awg","sep","okt","now","dec",""] - }, - monthsGenitive: { - names: ["januara","februara","mÄ›rca","apryla","meje","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""], - namesAbbr: ["jan","feb","mÄ›r","apr","mej","jun","jul","awg","sep","okt","now","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"po Chr.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "dddd, 'dnja' d. MMMM yyyy", - t: "H.mm 'hodź.'", - T: "H:mm:ss", - f: "dddd, 'dnja' d. MMMM yyyy H.mm 'hodź.'", - F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "mk", "default", { - name: "mk", - englishName: "Macedonian (FYROM)", - nativeName: "македонÑки јазик", - language: "mk", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "ден." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недела","понеделник","вторник","Ñреда","четврток","петок","Ñабота"], - namesAbbr: ["нед","пон","втр","Ñрд","чет","пет","Ñаб"], - namesShort: ["не","по","вт","ÑÑ€","че","пе","Ñа"] - }, - months: { - names: ["јануари","февруари","март","април","мај","јуни","јули","авгуÑÑ‚","Ñептември","октомври","ноември","декември",""], - namesAbbr: ["јан","фев","мар","апр","мај","јун","јул","авг","Ñеп","окт","ное","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "dddd, dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, dd MMMM yyyy HH:mm", - F: "dddd, dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "tn", "default", { - name: "tn", - englishName: "Setswana", - nativeName: "Setswana", - language: "tn", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"], - namesAbbr: ["Ltp.","Mos.","Lbd.","Lbr.","Lbn.","Lbt.","Lmt."], - namesShort: ["Lp","Ms","Lb","Lr","Ln","Lt","Lm"] - }, - months: { - names: ["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole",""], - namesAbbr: ["Fer.","Tlhak.","Mop.","Mor.","Motsh.","Seet.","Phukw.","Phatw.","Lwets.","Diph.","Ngwan.","Sed.",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "xh", "default", { - name: "xh", - englishName: "isiXhosa", - nativeName: "isiXhosa", - language: "xh", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"], - namesShort: ["Ca","Mv","Lb","Lt","Ln","Lh","Mg"] - }, - months: { - names: ["Mqungu","Mdumba","Kwindla","Tshazimpuzi","Canzibe","Silimela","Khala","Thupha","Msintsi","Dwarha","Nkanga","Mnga",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "zu", "default", { - name: "zu", - englishName: "isiZulu", - nativeName: "isiZulu", - language: "zu", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"], - namesAbbr: ["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."] - }, - months: { - names: ["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""], - namesAbbr: ["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "af", "default", { - name: "af", - englishName: "Afrikaans", - nativeName: "Afrikaans", - language: "af", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"], - namesAbbr: ["Son","Maan","Dins","Woen","Dond","Vry","Sat"], - namesShort: ["So","Ma","Di","Wo","Do","Vr","Sa"] - }, - months: { - names: ["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember",""], - namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ka", "default", { - name: "ka", - englishName: "Georgian", - nativeName: "ქáƒáƒ თული", - language: "ka", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Lari" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["კვირáƒ","áƒáƒ შáƒáƒ‘áƒáƒ—ი","სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი","áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი","ხუთშáƒáƒ‘áƒáƒ—ი","პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი","შáƒáƒ‘áƒáƒ—ი"], - namesAbbr: ["კვირáƒ","áƒáƒ შáƒáƒ‘áƒáƒ—ი","სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი","áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი","ხუთშáƒáƒ‘áƒáƒ—ი","პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი","შáƒáƒ‘áƒáƒ—ი"], - namesShort: ["კ","áƒ","ს","áƒ","ხ","პ","შ"] - }, - months: { - names: ["იáƒáƒœáƒ•áƒáƒ ი","თებერვáƒáƒšáƒ˜","მáƒáƒ ტი","áƒáƒžáƒ ილი","მáƒáƒ˜áƒ¡áƒ˜","ივნისი","ივლისი","áƒáƒ’ვისტáƒ","სექტემბერი","áƒáƒ¥áƒ¢áƒáƒ›áƒ‘ერი","ნáƒáƒ”მბერი","დეკემბერი",""], - namesAbbr: ["იáƒáƒœ","თებ","მáƒáƒ ","áƒáƒžáƒ ","მáƒáƒ˜áƒ¡","ივნ","ივლ","áƒáƒ’ვ","სექ","áƒáƒ¥áƒ¢","ნáƒáƒ”მ","დეკ",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "yyyy 'წლის' dd MM, dddd", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'წლის' dd MM, dddd H:mm", - F: "yyyy 'წლის' dd MM, dddd H:mm:ss", - M: "dd MM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fo", "default", { - name: "fo", - englishName: "Faroese", - nativeName: "føroyskt", - language: "fo", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","frÃggjadagur","leygardagur"], - namesAbbr: ["sun","mán","týs","mik","hós","frÃ","leyg"], - namesShort: ["su","má","tý","mi","hó","fr","ley"] - }, - months: { - names: ["januar","februar","mars","aprÃl","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hi", "default", { - name: "hi", - englishName: "Hindi", - nativeName: "हिंदी", - language: "hi", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["रविवार","सोमवार","मंगलवार","बà¥à¤§à¤µà¤¾à¤°","गà¥à¤°à¥à¤µà¤¾à¤°","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["रवि.","सोम.","मंगल.","बà¥à¤§.","गà¥à¤°à¥.","शà¥à¤•à¥à¤°.","शनि."], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""], - namesAbbr: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""] - }, - AM: ["पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨"], - PM: ["अपराहà¥à¤¨","अपराहà¥à¤¨","अपराहà¥à¤¨"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "mt", "default", { - name: "mt", - englishName: "Maltese", - nativeName: "Malti", - language: "mt", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ä imgħa","Is-Sibt"], - namesAbbr: ["Ħad","Tne","Tli","Erb","Ħam","Ä im","Sib"], - namesShort: ["I","I","I","L","I","I","I"] - }, - months: { - names: ["Jannar","Frar","Marzu","April","Mejju","Ä unju","Lulju","Awissu","Settembru","Ottubru","Novembru","DiÄ‹embru",""], - namesAbbr: ["Jan","Fra","Mar","Apr","Mej","Ä un","Lul","Awi","Set","Ott","Nov","DiÄ‹",""] - }, - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' ta\\' 'MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' ta\\' 'MMMM yyyy HH:mm", - F: "dddd, d' ta\\' 'MMMM yyyy HH:mm:ss", - M: "d' ta\\' 'MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "se", "default", { - name: "se", - englishName: "Sami (Northern)", - nativeName: "davvisámegiella", - language: "se", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"], - namesAbbr: ["sotn","vuos","maÅ‹","gask","duor","bear","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["ođđajagemánnu","guovvamánnu","njukÄamánnu","cuoÅ‹ománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","ÄakÄamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - monthsGenitive: { - names: ["ođđajagimánu","guovvamánu","njukÄamánu","cuoÅ‹ománu","miessemánu","geassemánu","suoidnemánu","borgemánu","ÄakÄamánu","golggotmánu","skábmamánu","juovlamánu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ga", "default", { - name: "ga", - englishName: "Irish", - nativeName: "Gaeilge", - language: "ga", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"], - namesAbbr: ["Domh","Luan","Máir","Céad","Déar","Aoi","Sath"], - namesShort: ["Do","Lu","Má","Cé","De","Ao","Sa"] - }, - months: { - names: ["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig",""], - namesAbbr: ["Ean","Feabh","Már","Aib","Bealt","Meith","Iúil","Lún","M.Fómh","D.Fómh","Samh","Noll",""] - }, - AM: ["r.n.","r.n.","R.N."], - PM: ["i.n.","i.n.","I.N."], - patterns: { - d: "dd/MM/yyyy", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ms", "default", { - name: "ms", - englishName: "Malay", - nativeName: "Bahasa Melayu", - language: "ms", - numberFormat: { - currency: { - decimals: 0, - symbol: "RM" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"], - namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"], - namesShort: ["A","I","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "kk", "default", { - name: "kk", - englishName: "Kazakh", - nativeName: "Қазақ", - language: "kk", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-$n","$n"], - ",": " ", - ".": "-", - symbol: "Т" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ЖекÑенбі","ДүйÑенбі","СейÑенбі","СәрÑенбі","БейÑенбі","Жұма","Сенбі"], - namesAbbr: ["Жк","ДÑ","СÑ","Ср","БÑ","Жм","Сн"], - namesShort: ["Жк","ДÑ","СÑ","Ср","БÑ","Жм","Сн"] - }, - months: { - names: ["қаңтар","ақпан","наурыз","Ñәуір","мамыр","мауÑым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқÑан",""], - namesAbbr: ["Қаң","Ðқп","Ðау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy 'ж.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'ж.' H:mm", - F: "d MMMM yyyy 'ж.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ky", "default", { - name: "ky", - englishName: "Kyrgyz", - nativeName: "Кыргыз", - language: "ky", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": "-", - symbol: "Ñом" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"], - namesAbbr: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"], - namesShort: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"] - }, - months: { - names: ["Январь","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d'-'MMMM yyyy'-ж.'", - t: "H:mm", - T: "H:mm:ss", - f: "d'-'MMMM yyyy'-ж.' H:mm", - F: "d'-'MMMM yyyy'-ж.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy'-ж.'" - } - } - } -}); - -Globalize.addCultureInfo( "sw", "default", { - name: "sw", - englishName: "Kiswahili", - nativeName: "Kiswahili", - language: "sw", - numberFormat: { - currency: { - symbol: "S" - } - }, - calendars: { - standard: { - days: { - names: ["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"], - namesAbbr: ["Jumap.","Jumat.","Juman.","Jumat.","Alh.","Iju.","Jumam."], - namesShort: ["P","T","N","T","A","I","M"] - }, - months: { - names: ["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Decemba",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Dec",""] - } - } - } -}); - -Globalize.addCultureInfo( "tk", "default", { - name: "tk", - englishName: "Turkmen", - nativeName: "türkmençe", - language: "tk", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-üznüksizlik", - positiveInfinity: "üznüksizlik", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "m." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["DuÅŸenbe","SiÅŸenbe","ÇarÅŸenbe","PenÅŸenbe","Anna","Åženbe","ÃekÅŸenbe"], - namesAbbr: ["Db","Sb","Çb","Pb","An","Åžb","Ãb"], - namesShort: ["D","S","Ç","P","A","Åž","Ã"] - }, - months: { - names: ["Ãanwar","Fewral","Mart","Aprel","Maý","lýun","lýul","Awgust","Sentýabr","Oktýabr","Noýabr","Dekabr",""], - namesAbbr: ["Ãan","Few","Mart","Apr","Maý","lýun","lýul","Awg","Sen","Okt","Not","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "yyyy 'ý.' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'ý.' MMMM d H:mm", - F: "yyyy 'ý.' MMMM d H:mm:ss", - Y: "yyyy 'ý.' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "uz", "default", { - name: "uz", - englishName: "Uzbek", - nativeName: "U'zbek", - language: "uz", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": " ", - ".": ",", - symbol: "so'm" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"], - namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."], - namesShort: ["ya","d","s","ch","p","j","sh"] - }, - months: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM yyyy", - D: "yyyy 'yil' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'yil' d-MMMM HH:mm", - F: "yyyy 'yil' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "tt", "default", { - name: "tt", - englishName: "Tatar", - nativeName: "Татар", - language: "tt", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"], - namesAbbr: ["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"], - namesShort: ["Я","Д","С","Ч","П","Ò–","Ш"] - }, - months: { - names: ["Гыйнвар","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Гыйн.","Фев.","Мар.","Ðпр.","Май","Июнь","Июль","Ðвг.","Сен.","Окт.","ÐоÑб.","Дек.",""] - }, - monthsGenitive: { - names: ["Гыйнварның","Февральнең","Мартның","Ðпрельнең","Майның","Июньнең","Июльнең","ÐвгуÑтның","СентÑбрьның","ОктÑбрьның","ÐоÑбрьның","Декабрьның",""], - namesAbbr: ["Гыйн.-ның","Фев.-нең","Мар.-ның","Ðпр.-нең","Майның","Июньнең","Июльнең","Ðвг.-ның","Сен.-ның","Окт.-ның","ÐоÑб.-ның","Дек.-ның",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "bn", "default", { - name: "bn", - englishName: "Bengali", - nativeName: "বাংলা", - language: "bn", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "টা" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["রবিবার","সোমবার","মঙà§à¦—লবার","বà§à¦§à¦¬à¦¾à¦°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°","শà§à¦•à§à¦°à¦¬à¦¾à¦°","শনিবার"], - namesAbbr: ["রবি.","সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহসà§à¦ªà¦¤à¦¿.","শà§à¦•à§à¦°.","শনি."], - namesShort: ["র","স","ম","ব","ব","শ","শ"] - }, - months: { - names: ["জানà§à¦¯à¦¼à¦¾à¦°à§€","ফেবà§à¦°à§à¦¯à¦¼à¦¾à¦°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগসà§à¦Ÿ","সেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নà¦à§‡à¦®à§à¦¬à¦°","ডিসেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§.","ফেবà§à¦°à§.","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগ.","সেপà§à¦Ÿà§‡.","অকà§à¦Ÿà§‹.","নà¦à§‡.","ডিসে.",""] - }, - AM: ["পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨"], - PM: ["অপরাহà§à¦¨","অপরাহà§à¦¨","অপরাহà§à¦¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "pa", "default", { - name: "pa", - englishName: "Punjabi", - nativeName: "ਪੰਜਾਬੀ", - language: "pa", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ਰà©" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["à¨à¨¤à¨µà¨¾à¨°","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬà©à©±à¨§à¨µà¨¾à¨°","ਵੀਰਵਾਰ","ਸ਼à©à©±à¨•ਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"], - namesAbbr: ["à¨à¨¤.","ਸੋਮ.","ਮੰਗਲ.","ਬà©à©±à¨§.","ਵੀਰ.","ਸ਼à©à¨•ਰ.","ਸ਼ਨਿੱਚਰ."], - namesShort: ["à¨","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"] - }, - months: { - names: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪà©à¨°à©ˆà¨²","ਮਈ","ਜੂਨ","ਜà©à¨²à¨¾à¨ˆ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""], - namesAbbr: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪà©à¨°à©ˆà¨²","ਮਈ","ਜੂਨ","ਜà©à¨²à¨¾à¨ˆ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""] - }, - AM: ["ਸਵੇਰ","ਸਵੇਰ","ਸਵੇਰ"], - PM: ["ਸ਼ਾਮ","ਸ਼ਾਮ","ਸ਼ਾਮ"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy dddd", - t: "tt hh:mm", - T: "tt hh:mm:ss", - f: "dd MMMM yyyy dddd tt hh:mm", - F: "dd MMMM yyyy dddd tt hh:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "gu", "default", { - name: "gu", - englishName: "Gujarati", - nativeName: "ગà«àªœàª°àª¾àª¤à«€", - language: "gu", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "રૂ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["રવિવાર","સોમવાર","મંગળવાર","બà«àª§àªµàª¾àª°","ગà«àª°à«àªµàª¾àª°","શà«àª•à«àª°àªµàª¾àª°","શનિવાર"], - namesAbbr: ["રવિ","સોમ","મંગળ","બà«àª§","ગà«àª°à«","શà«àª•à«àª°","શનિ"], - namesShort: ["ર","સ","મ","બ","ગ","શ","શ"] - }, - months: { - names: ["જાનà«àª¯à«àª†àª°à«€","ફેબà«àª°à«àª†àª°à«€","મારà«àªš","àªàªªà«àª°àª¿àª²","મે","જૂન","જà«àª²àª¾àªˆ","ઑગસà«àªŸ","સપà«àªŸà«‡àª®à«àª¬àª°","ઑકà«àªŸà«àª¬àª°","નવેમà«àª¬àª°","ડિસેમà«àª¬àª°",""], - namesAbbr: ["જાનà«àª¯à«","ફેબà«àª°à«","મારà«àªš","àªàªªà«àª°àª¿àª²","મે","જૂન","જà«àª²àª¾àªˆ","ઑગસà«àªŸ","સપà«àªŸà«‡","ઑકà«àªŸà«‹","નવે","ડિસે",""] - }, - AM: ["પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨","પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨","પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨"], - PM: ["ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨","ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨","ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "or", "default", { - name: "or", - englishName: "Oriya", - nativeName: "ଓàœà¬¿à¬†", - language: "or", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ଟ" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ରବିବାର","ସà‡à¬¾à¬®à¬¬à¬¾à¬°","ମଙàଗଳବାର","ବàଧବାର","ଗàରàବାର","ଶàକàରବାର","ଶନିବାର"], - namesAbbr: ["ରବି.","ସà‡à¬¾à¬®.","ମଙàଗଳ.","ବàଧ.","ଗàରà.","ଶàକàର.","ଶନି."], - namesShort: ["ର","ସà‡à¬¾","ମ","ବà","ଗà","ଶà","ଶ"] - }, - months: { - names: ["ଜାନààŸà¬¾à¬°à€","ଫàରà‡à¬¬àƒàŸà¬¾à¬°à€","ମାରàଚàଚ","à¬à¬ªàରିଲà\u200c","ମà‡","ଜàନà\u200c","ଜàଲାଇ","ଅଗଷàଟ","ସà‡à¬ªàଟà‡à¬®àବର","ଅକàଟà‹à¬¬à¬°","ନà¬à‡à¬®àବର","(ଡିସà‡à¬®àବର",""], - namesAbbr: ["ଜାନààŸà¬¾à¬°à€","ଫàରà‡à¬¬àƒàŸà¬¾à¬°à€","ମାରàଚàଚ","à¬à¬ªàରିଲà\u200c","ମà‡","ଜàନà\u200c","ଜàଲାଇ","ଅଗଷàଟ","ସà‡à¬ªàଟà‡à¬®àବର","ଅକàଟà‹à¬¬à¬°","ନà¬à‡à¬®àବର","(ଡିସà‡à¬®àବର",""] - }, - eras: [{"name":"ଖàରà€à¬·àଟାବàଦ","start":null,"offset":0}], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "ta", "default", { - name: "ta", - englishName: "Tamil", - nativeName: "தமிழà¯", - language: "ta", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ரூ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ஞாயிறà¯à®±à¯à®•à¯à®•ிழமை","திஙà¯à®•ளà¯à®•ிழமை","செவà¯à®µà®¾à®¯à¯à®•ிழமை","பà¯à®¤à®©à¯à®•ிழமை","வியாழகà¯à®•ிழமை","வெளà¯à®³à®¿à®•à¯à®•ிழமை","சனிகà¯à®•ிழமை"], - namesAbbr: ["ஞாயிறà¯","திஙà¯à®•ளà¯","செவà¯à®µà®¾à®¯à¯","பà¯à®¤à®©à¯","வியாழனà¯","வெளà¯à®³à®¿","சனி"], - namesShort: ["ஞா","தி","செ","பà¯","வி","வெ","ச"] - }, - months: { - names: ["ஜனவரி","பிபà¯à®°à®µà®°à®¿","மாரà¯à®šà¯","à®à®ªà¯à®°à®²à¯","மே","ஜூனà¯","ஜூலை","ஆகஸà¯à®Ÿà¯","செபà¯à®Ÿà®®à¯à®ªà®°à¯","அகà¯à®Ÿà¯‹à®ªà®°à¯","நவமà¯à®ªà®°à¯","டிசமà¯à®ªà®°à¯",""], - namesAbbr: ["ஜனவரி","பிபà¯à®°à®µà®°à®¿","மாரà¯à®šà¯","à®à®ªà¯à®°à®²à¯","மே","ஜூனà¯","ஜூலை","ஆகஸà¯à®Ÿà¯","செபà¯à®Ÿà®®à¯à®ªà®°à¯","அகà¯à®Ÿà¯‹à®ªà®°à¯","நவமà¯à®ªà®°à¯","டிசமà¯à®ªà®°à¯",""] - }, - AM: ["காலை","காலை","காலை"], - PM: ["மாலை","மாலை","மாலை"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "te", "default", { - name: "te", - englishName: "Telugu", - nativeName: "తెలà±à°—à±", - language: "te", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "రూ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ఆదివారం","సోమవారం","మంగళవారం","à°¬à±à°§à°µà°¾à°°à°‚","à°—à±à°°à±à°µà°¾à°°à°‚","à°¶à±à°•à±à°°à°µà°¾à°°à°‚","శనివారం"], - namesAbbr: ["ఆది.","సోమ.","మంగళ.","à°¬à±à°§.","à°—à±à°°à±.","à°¶à±à°•à±à°°.","శని."], - namesShort: ["à°†","సో","మం","à°¬à±","à°—à±","à°¶à±","à°¶"] - }, - months: { - names: ["జనవరి","à°«à°¿à°¬à±à°°à°µà°°à°¿","మారà±à°šà°¿","à°à°ªà±à°°à°¿à°²à±","మే","జూనà±","జూలై","ఆగసà±à°Ÿà±","సెపà±à°Ÿà±†à°‚బరà±","à°…à°•à±à°Ÿà±‹à°¬à°°à±","నవంబరà±","డిసెంబరà±",""], - namesAbbr: ["జనవరి","à°«à°¿à°¬à±à°°à°µà°°à°¿","మారà±à°šà°¿","à°à°ªà±à°°à°¿à°²à±","మే","జూనà±","జూలై","ఆగసà±à°Ÿà±","సెపà±à°Ÿà±†à°‚బరà±","à°…à°•à±à°Ÿà±‹à°¬à°°à±","నవంబరà±","డిసెంబరà±",""] - }, - AM: ["పూరà±à°µà°¾à°¹à±à°¨","పూరà±à°µà°¾à°¹à±à°¨","పూరà±à°µà°¾à°¹à±à°¨"], - PM: ["అపరాహà±à°¨","అపరాహà±à°¨","అపరాహà±à°¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "kn", "default", { - name: "kn", - englishName: "Kannada", - nativeName: "ಕನà³à²¨à²¡", - language: "kn", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ರೂ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["à²à²¾à²¨à³à²µà²¾à²°","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬà³à²§à²µà²¾à²°","ಗà³à²°à³à²µà²¾à²°","ಶà³à²•à³à²°à²µà²¾à²°","ಶನಿವಾರ"], - namesAbbr: ["à²à²¾à²¨à³.","ಸೋಮ.","ಮಂಗಳ.","ಬà³à²§.","ಗà³à²°à³.","ಶà³à²•à³à²°.","ಶನಿ."], - namesShort: ["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"] - }, - months: { - names: ["ಜನವರಿ","ಫೆಬà³à²°à²µà²°à²¿","ಮಾರà³à²šà³","ಎಪà³à²°à²¿à²²à³","ಮೇ","ಜೂನà³","ಜà³à²²à³ˆ","ಆಗಸà³à²Ÿà³","ಸೆಪà³à²Ÿà²‚ಬರà³","ಅಕà³à²Ÿà³‹à²¬à²°à³","ನವೆಂಬರà³","ಡಿಸೆಂಬರà³",""], - namesAbbr: ["ಜನವರಿ","ಫೆಬà³à²°à²µà²°à²¿","ಮಾರà³à²šà³","ಎಪà³à²°à²¿à²²à³","ಮೇ","ಜೂನà³","ಜà³à²²à³ˆ","ಆಗಸà³à²Ÿà³","ಸೆಪà³à²Ÿà²‚ಬರà³","ಅಕà³à²Ÿà³‹à²¬à²°à³","ನವೆಂಬರà³","ಡಿಸೆಂಬರà³",""] - }, - AM: ["ಪೂರà³à²µà²¾à²¹à³à²¨","ಪೂರà³à²µà²¾à²¹à³à²¨","ಪೂರà³à²µà²¾à²¹à³à²¨"], - PM: ["ಅಪರಾಹà³à²¨","ಅಪರಾಹà³à²¨","ಅಪರಾಹà³à²¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "ml", "default", { - name: "ml", - englishName: "Malayalam", - nativeName: "മലയാളം", - language: "ml", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "à´•" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["ഞായറാഴàµà´š","തിങàµà´•ളാഴàµà´š","ചൊവàµà´µà´¾à´´àµà´š","à´¬àµà´§à´¨à´¾à´´àµà´š","à´µàµà´¯à´¾à´´à´¾à´´àµà´š","വെളàµà´³à´¿à´¯à´¾à´´àµà´š","ശനിയാഴàµà´š"], - namesAbbr: ["ഞായർ.","തിങàµà´•ൾ.","ചൊവàµà´µ.","à´¬àµà´§àµ».","à´µàµà´¯à´¾à´´à´‚.","വെളàµà´³à´¿.","ശനി."], - namesShort: ["à´ž","à´¤","à´š","à´¬","à´µ","വെ","à´¶"] - }, - months: { - names: ["ജനàµà´µà´°à´¿","ഫെബàµà´±àµà´µà´°à´¿","മാറàµà´šàµà´šàµ","à´à´ªàµà´±à´¿à´²àµ","മെയàµ","ജൂണàµ","ജൂലൈ","à´“à´—à´¸àµà´±à´±àµ","സെപàµà´±à´±à´‚ബറàµ","à´’à´•àµà´Ÿàµ‹à´¬à´±àµ","നവംബറàµ","ഡിസംബറàµ",""], - namesAbbr: ["ജനàµà´µà´°à´¿","ഫെബàµà´±àµà´µà´°à´¿","മാറàµà´šàµà´šàµ","à´à´ªàµà´±à´¿à´²àµ","മെയàµ","ജൂണàµ","ജൂലൈ","à´“à´—à´¸àµà´±à´±àµ","സെപàµà´±à´±à´‚ബറàµ","à´’à´•àµà´Ÿàµ‹à´¬à´±àµ","നവംബറàµ","ഡിസംബറàµ",""] - }, - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "as", "default", { - name: "as", - englishName: "Assamese", - nativeName: "অসমীয়া", - language: "as", - numberFormat: { - groupSizes: [3,2], - "NaN": "nan", - negativeInfinity: "-infinity", - positiveInfinity: "infinity", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","n$"], - groupSizes: [3,2], - symbol: "ট" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["সোমবাৰ","মঙà§à¦—লবাৰ","বà§à¦§à¦¬à¦¾à§°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à§°","শà§à¦•à§à¦°à¦¬à¦¾à§°","শনিবাৰ","ৰবিবাৰ"], - namesAbbr: ["সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহ.","শà§à¦•à§à¦°.","শনি.","ৰবি."], - namesShort: ["সো","ম","বà§","বৃ","শà§","শ","র"] - }, - months: { - names: ["জানà§à§±à¦¾à§°à§€","ফেবà§à¦°à§à§±à¦¾à§°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগষà§à¦Ÿ","চেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নবেমà§à¦¬à¦°","ডিচেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§","ফেবà§à¦°à§","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগষà§à¦Ÿ","চেপà§à¦Ÿà§‡","অকà§à¦Ÿà§‹","নবে","ডিচে",""] - }, - AM: ["ৰাতিপà§","ৰাতিপà§","ৰাতিপà§"], - PM: ["আবেলি","আবেলি","আবেলি"], - eras: [{"name":"খà§à¦°à§€à¦·à§à¦Ÿà¦¾à¦¬à§à¦¦","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "yyyy,MMMM dd, dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy,MMMM dd, dddd tt h:mm", - F: "yyyy,MMMM dd, dddd tt h:mm:ss", - M: "dd MMMM", - Y: "MMMM,yy" - } - } - } -}); - -Globalize.addCultureInfo( "mr", "default", { - name: "mr", - englishName: "Marathi", - nativeName: "मराठी", - language: "mr", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["रविवार","सोमवार","मंगळवार","बà¥à¤§à¤µà¤¾à¤°","गà¥à¤°à¥à¤µà¤¾à¤°","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["रवि.","सोम.","मंगळ.","बà¥à¤§.","गà¥à¤°à¥.","शà¥à¤•à¥à¤°.","शनि."], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवà¥à¤¹à¥‡à¤‚बर","डिसेंबर",""], - namesAbbr: ["जाने.","फेबà¥à¤°à¥.","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚.","ऑकà¥à¤Ÿà¥‹.","नोवà¥à¤¹à¥‡à¤‚.","डिसें.",""] - }, - AM: ["म.पू.","म.पू.","म.पू."], - PM: ["म.नं.","म.नं.","म.नं."], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "sa", "default", { - name: "sa", - englishName: "Sanskrit", - nativeName: "संसà¥à¤•ृत", - language: "sa", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["रविवासरः","सोमवासरः","मङà¥à¤—लवासरः","बà¥à¤§à¤µà¤¾à¤¸à¤°à¤ƒ","गà¥à¤°à¥à¤µà¤¾à¤¸à¤°à¤ƒ","शà¥à¤•à¥à¤°à¤µà¤¾à¤¸à¤°à¤ƒ","शनिवासरः"], - namesAbbr: ["रविवासरः","सोमवासरः","मङà¥à¤—लवासरः","बà¥à¤§à¤µà¤¾à¤¸à¤°à¤ƒ","गà¥à¤°à¥à¤µà¤¾à¤¸à¤°à¤ƒ","शà¥à¤•à¥à¤°à¤µà¤¾à¤¸à¤°à¤ƒ","शनिवासरः"], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""], - namesAbbr: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""] - }, - AM: ["पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨"], - PM: ["अपराहà¥à¤¨","अपराहà¥à¤¨","अपराहà¥à¤¨"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy dddd", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy dddd HH:mm", - F: "dd MMMM yyyy dddd HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "mn", "default", { - name: "mn", - englishName: "Mongolian", - nativeName: "Монгол хÑл", - language: "mn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚®" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ÐÑм","Даваа","МÑгмар","Лхагва","ПүрÑв","БааÑан","БÑмба"], - namesAbbr: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"], - namesShort: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"] - }, - months: { - names: ["1 дүгÑÑр Ñар","2 дугаар Ñар","3 дугаар Ñар","4 дүгÑÑр Ñар","5 дугаар Ñар","6 дугаар Ñар","7 дугаар Ñар","8 дугаар Ñар","9 дүгÑÑр Ñар","10 дугаар Ñар","11 дүгÑÑр Ñар","12 дугаар Ñар",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - monthsGenitive: { - names: ["1 дүгÑÑр Ñарын","2 дугаар Ñарын","3 дугаар Ñарын","4 дүгÑÑр Ñарын","5 дугаар Ñарын","6 дугаар Ñарын","7 дугаар Ñарын","8 дугаар Ñарын","9 дүгÑÑр Ñарын","10 дугаар Ñарын","11 дүгÑÑр Ñарын","12 дугаар Ñарын",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - AM: null, - PM: null, - patterns: { - d: "yy.MM.dd", - D: "yyyy 'оны' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'оны' MMMM d H:mm", - F: "yyyy 'оны' MMMM d H:mm:ss", - M: "d MMMM", - Y: "yyyy 'он' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "bo", "default", { - name: "bo", - englishName: "Tibetan", - nativeName: "བོད་ཡིག", - language: "bo", - numberFormat: { - groupSizes: [3,0], - "NaN": "ཨང་ཀི་མིན་པà¼", - negativeInfinity: "མོ་གྲངས་ཚད་མེད་ཆུང་བà¼", - positiveInfinity: "ཕོ་གྲངས་ཚད་མེད་ཆེ་བà¼", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - groupSizes: [3,0], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["གཟའ་ཉི་མà¼","གཟའ་ཟླ་བà¼","གཟའ་མིག་དམརà¼","གཟའ་ལྷག་པà¼","གཟའ་ཕུར་བུà¼","གཟའ་པ་སངསà¼","གཟའ་སྤེན་པà¼"], - namesAbbr: ["ཉི་མà¼","ཟླ་བà¼","མིག་དམརà¼","ལྷག་པà¼","ཕུར་བུà¼","པ་སངསà¼","སྤེན་པà¼"], - namesShort: ["༧","༡","༢","༣","༤","༥","༦"] - }, - months: { - names: ["སྤྱི་ཟླ་དང་པོà¼","སྤྱི་ཟླ་གཉིས་པà¼","སྤྱི་ཟླ་གསུམ་པà¼","སྤྱི་ཟླ་བཞི་པà¼","སྤྱི་ཟླ་ལྔ་པà¼","སྤྱི་ཟླ་དྲུག་པà¼","སྤྱི་ཟླ་བདུན་པà¼","སྤྱི་ཟླ་བརྒྱད་པà¼","སྤྱི་ཟླ་དགུ་པà¼","སྤྱི་ཟླ་བཅུ་པོà¼","སྤྱི་ཟླ་བཅུ་གཅིག་པà¼","སྤྱི་ཟླ་བཅུ་གཉིས་པà¼",""], - namesAbbr: ["ཟླ་ ༡","ཟླ་ ༢","ཟླ་ ༣","ཟླ་ ༤","ཟླ་ ༥","ཟླ་ ༦","ཟླ་ ༧","ཟླ་ ༨","ཟླ་ ༩","ཟླ་ ༡༠","ཟླ་ ༡༡","ཟླ་ ༡༢",""] - }, - AM: ["སྔ་དྲོ","སྔ་དྲོ","སྔ་དྲོ"], - PM: ["ཕྱི་དྲོ","ཕྱི་དྲོ","ཕྱི་དྲོ"], - eras: [{"name":"སྤྱི་ལོ","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'ལོའི་ཟླ' M'ཚེས' d", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm", - F: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm:ss", - M: "'ཟླ་' M'ཚེས'd", - Y: "yyyy.M" - } - } - } -}); - -Globalize.addCultureInfo( "cy", "default", { - name: "cy", - englishName: "Welsh", - nativeName: "Cymraeg", - language: "cy", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"], - namesAbbr: ["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"], - namesShort: ["Su","Ll","Ma","Me","Ia","Gw","Sa"] - }, - months: { - names: ["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr",""], - namesAbbr: ["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "km", "default", { - name: "km", - englishName: "Khmer", - nativeName: "ážáŸ’មែរ", - language: "km", - numberFormat: { - pattern: ["- n"], - groupSizes: [3,0], - "NaN": "NAN", - negativeInfinity: "-- អនន្áž", - positiveInfinity: "អនន្áž", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["-n$","n$"], - symbol: "៛" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ážáŸ’ងៃអាទិážáŸ’áž™","ážáŸ’ងៃចáŸáž“្ទ","ážáŸ’ងៃអង្គារ","ážáŸ’ងៃពុធ","ážáŸ’ងៃព្រហស្បážáž·áŸ","ážáŸ’ងៃសុក្រ","ážáŸ’ងៃសៅរáŸ"], - namesAbbr: ["អាទិ.","áž….","អ.","áž–áž»","ព្រហ.","សុ.","ស."], - namesShort: ["អា","áž…","អ","áž–áž»","ព្","សុ","ស"] - }, - months: { - names: ["មករា","កុម្ភៈ","មិនា","មáŸážŸáž¶","ឧសភា","មិážáž»áž“áž¶","កក្កដា","សីហា","កញ្ញា","ážáž»áž›áž¶","វិច្ឆិកា","ធ្នូ",""], - namesAbbr: ["១","២","៣","៤","៥","៦","៧","៨","៩","១០","១១","១២",""] - }, - AM: ["ព្រឹក","ព្រឹក","ព្រឹក"], - PM: ["ល្ងាច","ល្ងាច","ល្ងាច"], - eras: [{"name":"មុនគ.ស.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "d MMMM yyyy H:mm tt", - F: "d MMMM yyyy HH:mm:ss", - M: "'ážáŸ’ងៃទី' dd 'ážáŸ‚' MM", - Y: "'ážáŸ‚' MM 'ឆ្នាំ' yyyy" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ព្រឹក","ព្រឹក","ព្រឹក"], - PM: ["ល្ងាច","ល្ងាច","ល្ងាច"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm tt", - F: "dddd, MMMM dd, yyyy HH:mm:ss" - } - } - } -}); - -Globalize.addCultureInfo( "lo", "default", { - name: "lo", - englishName: "Lao", - nativeName: "ລາວ", - language: "lo", - numberFormat: { - pattern: ["(n)"], - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - }, - currency: { - pattern: ["(n$)","n$"], - groupSizes: [3,0], - symbol: "â‚" - } - }, - calendars: { - standard: { - days: { - names: ["ວັນàºàº²àº—ິດ","ວັນຈັນ","ວັນàºàº±àº‡àº„ານ","ວັນພຸດ","ວັນພະຫັດ","ວັນສຸàº","ວັນເສົາ"], - namesAbbr: ["àºàº²àº—ິດ","ຈັນ","àºàº±àº‡àº„ານ","ພຸດ","ພະຫັດ","ສຸàº","ເສົາ"], - namesShort: ["àº","ຈ","àº","ພ","ພ","ສ","ເ"] - }, - months: { - names: ["ມັງàºàºàº™","àºàº¸àº¡àºžàº²","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","àºà»àº¥àº°àºàº»àº”","ສິງຫາ","àºàº±àº™àºàº²","ຕຸລາ","ພະຈິàº","ທັນວາ",""], - namesAbbr: ["ມັງàºàºàº™","àºàº¸àº¡àºžàº²","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","àºà»àº¥àº°àºàº»àº”","ສິງຫາ","àºàº±àº™àºàº²","ຕຸລາ","ພະຈິàº","ທັນວາ",""] - }, - AM: ["ເຊົ້າ","ເຊົ້າ","ເຊົ້າ"], - PM: ["à»àº¥àº‡","à»àº¥àº‡","à»àº¥àº‡"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "dd MMMM yyyy H:mm tt", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "gl", "default", { - name: "gl", - englishName: "Galician", - nativeName: "galego", - language: "gl", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","luns","martes","mércores","xoves","venres","sábado"], - namesAbbr: ["dom","luns","mar","mér","xov","ven","sáb"], - namesShort: ["do","lu","ma","mé","xo","ve","sá"] - }, - months: { - names: ["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""], - namesAbbr: ["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "kok", "default", { - name: "kok", - englishName: "Konkani", - nativeName: "कोंकणी", - language: "kok", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["आयतार","सोमार","मंगळार","बà¥à¤§à¤µà¤¾à¤°","बिरेसà¥à¤¤à¤¾à¤°","सà¥à¤•à¥à¤°à¤¾à¤°","शेनवार"], - namesAbbr: ["आय.","सोम.","मंगळ.","बà¥à¤§.","बिरे.","सà¥à¤•à¥à¤°.","शेन."], - namesShort: ["आ","स","म","ब","ब","स","श"] - }, - months: { - names: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवेमà¥à¤¬à¤°","डिसेंबर",""], - namesAbbr: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवेमà¥à¤¬à¤°","डिसेंबर",""] - }, - AM: ["म.पू.","म.पू.","म.पू."], - PM: ["म.नं.","म.नं.","म.नं."], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "syr", "default", { - name: "syr", - englishName: "Syriac", - nativeName: "ܣܘܪÜÜÜ", - language: "syr", - isRTL: true, - numberFormat: { - currency: { - pattern: ["$n-","$ n"], - symbol: "Ù„.س.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["ܚܕ ܒܫܒÜ","ܬܪÜܢ ܒܫܒÜ","Ü¬Ü Ü¬Ü ܒܫܒÜ","ÜܪܒܥÜ ܒܫܒÜ","ܚܡܫÜ ܒܫܒÜ","ܥܪܘܒܬÜ","ܫܒܬÜ"], - namesAbbr: ["\u070fÜ \u070fÜ’Ü«","\u070fÜ’Â \u070fÜ’Ü«","\u070fܓ \u070fÜ’Ü«","\u070fܕ \u070fÜ’Ü«","\u070fÜ—Â \u070fÜ’Ü«","\u070fܥܪܘܒ","\u070fܫܒ"], - namesShort: ["Ü","Ü’","Ü“","Ü•","Ü—","Ü¥","Ü«"] - }, - months: { - names: ["ܟܢܘܢ ÜܚܪÜ","ܫܒܛ","Üܕܪ","Ü¢Üܣܢ","ÜÜܪ","ܚܙÜܪܢ","ܬܡܘܙ","ÜÜ’","ÜÜÜ Ü˜Ü ","ܬܫܪÜ ܩܕÜÜ¡","ܬܫܪÜ ÜܚܪÜ","ܟܢܘܢ ܩܕÜÜ¡",""], - namesAbbr: ["\u070fܟܢ \u070fÜ’","ܫܒܛ","Üܕܪ","Ü¢Üܣܢ","ÜÜܪ","ܚܙÜܪܢ","ܬܡܘܙ","ÜÜ’","ÜÜÜ Ü˜Ü ","\u070fܬܫ \u070fÜ","\u070fܬܫ \u070fÜ’","\u070fܟܢ \u070fÜ",""] - }, - AM: ["Ü©.Ü›","Ü©.Ü›","Ü©.Ü›"], - PM: ["Ü’.Ü›","Ü’.Ü›","Ü’.Ü›"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "si", "default", { - name: "si", - englishName: "Sinhala", - nativeName: "සිංහල", - language: "si", - numberFormat: { - groupSizes: [3,2], - negativeInfinity: "-අනන්à¶à¶º", - positiveInfinity: "අනන්à¶à¶º", - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["($ n)","$ n"], - symbol: "රු." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ඉරිදà·","සඳුදà·","අඟහරුවà·à¶¯à·","බදà·à¶¯à·","à¶¶à·Š\u200dරහස්පà¶à·’න්දà·","සිකුරà·à¶¯à·","සෙනසුරà·à¶¯à·"], - namesAbbr: ["ඉරිදà·","සඳුදà·","කුජදà·","බුදදà·","ගුරුදà·","කිවිදà·","à·à¶±à·’දà·"], - namesShort: ["ඉ","à·ƒ","à¶…","à¶¶","à¶¶à·Š\u200dà¶»","සි","සෙ"] - }, - months: { - names: ["ජනවà·à¶»à·’","පෙබරවà·à¶»à·’","මà·à¶»à·Šà¶à·”","à¶…\u200cà¶´à·Š\u200dරේල්","මà·à¶ºà·’","ජූනි","ජූලි","à¶…\u200cà¶œà·à·ƒà·Šà¶à·”","à·ƒà·à¶´à·Šà¶à·à¶¸à·Šà¶¶à¶»à·Š","ඔක්à¶à·à¶¶à¶»à·Š","නොවà·à¶¸à·Šà¶¶à¶»à·Š","දෙසà·à¶¸à·Šà¶¶à¶»à·Š",""], - namesAbbr: ["ජන.","පෙබ.","මà·à¶»à·Šà¶à·”.","à¶…à¶´à·Š\u200dරේල්.","මà·à¶ºà·’.","ජූනි.","ජූලි.","à¶…à¶œà·.","à·ƒà·à¶´à·Š.","ඔක්.","නොවà·.","දෙසà·.",""] - }, - AM: ["à¶´à·™.à·€.","à¶´à·™.à·€.","à¶´à·™.à·€."], - PM: ["à¶´.à·€.","à¶´.à·€.","à¶´.à·€."], - eras: [{"name":"à¶šà·Š\u200dරි.à·€.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd", - f: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd h:mm tt", - F: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd h:mm:ss tt", - Y: "yyyy MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "iu", "default", { - name: "iu", - englishName: "Inuktitut", - nativeName: "Inuktitut", - language: "iu", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"], - namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"], - namesShort: ["N","N","A","P","S","T","S"] - }, - months: { - names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""], - namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""] - }, - patterns: { - d: "d/MM/yyyy", - D: "ddd, MMMM dd,yyyy", - f: "ddd, MMMM dd,yyyy h:mm tt", - F: "ddd, MMMM dd,yyyy h:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "am", "default", { - name: "am", - englishName: "Amharic", - nativeName: "አማáˆáŠ›", - language: "am", - numberFormat: { - decimals: 1, - groupSizes: [3,0], - "NaN": "NAN", - percent: { - pattern: ["-n%","n%"], - decimals: 1, - groupSizes: [3,0] - }, - currency: { - pattern: ["-$n","$n"], - groupSizes: [3,0], - symbol: "ETB" - } - }, - calendars: { - standard: { - days: { - names: ["እሑድ","ሰኞ","ማáŠáˆ°áŠž","ረቡዕ","áˆáˆ™áˆµ","á‹“áˆá‰¥","ቅዳሜ"], - namesAbbr: ["እሑድ","ሰኞ","ማáŠáˆ°","ረቡዕ","áˆáˆ™áˆµ","á‹“áˆá‰¥","ቅዳሜ"], - namesShort: ["እ","ሰ","ማ","ረ","áˆ","á‹“","ቅ"] - }, - months: { - names: ["ጃንዩወሪ","áŒá‰¥áˆ©á‹ˆáˆª","ማáˆá‰½","ኤá•ረáˆ","ሜá‹","áŒáŠ•","áŒáˆ‹á‹","ኦገስት","ሴá•ቴáˆá‰ áˆ","ኦáŠá‰°á‹á‰ áˆ","ኖቬáˆá‰ áˆ","ዲሴáˆá‰ áˆ",""], - namesAbbr: ["ጃንዩ","áŒá‰¥áˆ©","ማáˆá‰½","ኤá•ረ","ሜá‹","áŒáŠ•","áŒáˆ‹á‹","ኦገስ","ሴá•ቴ","ኦáŠá‰°","ኖቬáˆ","ዲሴáˆ",""] - }, - AM: ["ጡዋት","ጡዋት","ጡዋት"], - PM: ["ከሰዓት","ከሰዓት","ከሰዓት"], - eras: [{"name":"ዓመተ áˆáˆ•ረት","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "dddd 'á£' MMMM d 'ቀን' yyyy", - f: "dddd 'á£' MMMM d 'ቀን' yyyy h:mm tt", - F: "dddd 'á£' MMMM d 'ቀን' yyyy h:mm:ss tt", - M: "MMMM d ቀን", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "tzm", "default", { - name: "tzm", - englishName: "Tamazight", - nativeName: "Tamazight", - language: "tzm", - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - symbol: "DZD" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 6, - days: { - names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"], - namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"], - namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"] - }, - months: { - names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""], - namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "ne", "default", { - name: "ne", - englishName: "Nepali", - nativeName: "नेपाली", - language: "ne", - numberFormat: { - groupSizes: [3,2], - "NaN": "nan", - negativeInfinity: "-infinity", - positiveInfinity: "infinity", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,2] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "रà¥" - } - }, - calendars: { - standard: { - days: { - names: ["आइतवार","सोमवार","मङà¥à¤—लवार","बà¥à¤§à¤µà¤¾à¤°","बिहीवार","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["आइत","सोम","मङà¥à¤—ल","बà¥à¤§","बिही","शà¥à¤•à¥à¤°","शनि"], - namesShort: ["आ","सो","म","बà¥","बि","शà¥","श"] - }, - months: { - names: ["जनवरी","फेबà¥à¤°à¥à¤…री","मारà¥à¤š","अपà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सेपà¥à¤Ÿà¥‡à¤®à¥à¤¬à¤°","अकà¥à¤Ÿà¥‹à¤¬à¤°","नोà¤à¥‡à¤®à¥à¤¬à¤°","डिसेमà¥à¤¬à¤°",""], - namesAbbr: ["जन","फेब","मारà¥à¤š","अपà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¤¾à¤ˆ","अग","सेपà¥à¤Ÿ","अकà¥à¤Ÿ","नोà¤","डिस",""] - }, - AM: ["विहानी","विहानी","विहानी"], - PM: ["बेलà¥à¤•ी","बेलà¥à¤•ी","बेलà¥à¤•ी"], - eras: [{"name":"a.d.","start":null,"offset":0}], - patterns: { - Y: "MMMM,yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fy", "default", { - name: "fy", - englishName: "Frisian", - nativeName: "Frysk", - language: "fy", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["Snein","Moandei","Tiisdei","Woansdei","Tongersdei","Freed","Sneon"], - namesAbbr: ["Sn","Mo","Ti","Wo","To","Fr","Sn"], - namesShort: ["S","M","T","W","T","F","S"] - }, - months: { - names: ["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber",""], - namesAbbr: ["jann","febr","mrt","apr","maaie","jun","jul","aug","sept","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "d-M-yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ps", "default", { - name: "ps", - englishName: "Pashto", - nativeName: "پښتو", - language: "ps", - isRTL: true, - numberFormat: { - pattern: ["n-"], - ",": "ØŒ", - ".": ",", - "NaN": "غ ع", - negativeInfinity: "-∞", - positiveInfinity: "∞", - percent: { - pattern: ["%n-","%n"], - ",": "ØŒ", - ".": "," - }, - currency: { - pattern: ["$n-","$n"], - ",": "Ù¬", - ".": "Ù«", - symbol: "Ø‹" - } - }, - calendars: { - standard: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["یکشنبه","دوشنبه","سه\u200cشنبه","چارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["یکشنبه","دوشنبه","سه\u200cشنبه","چارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښزمرى","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","لنڈ Û","مرغومى",""], - namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا Úš","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","لنڈ Û","مرغومى",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"Ù„.Ù‡","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy, dd, MMMM, dddd", - f: "yyyy, dd, MMMM, dddd h:mm tt", - F: "yyyy, dd, MMMM, dddd h:mm:ss tt", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fil", "default", { - name: "fil", - englishName: "Filipino", - nativeName: "Filipino", - language: "fil", - numberFormat: { - currency: { - symbol: "PhP" - } - }, - calendars: { - standard: { - days: { - names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"], - namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"], - namesShort: ["L","L","M","M","H","B","S"] - }, - months: { - names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""], - namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""] - }, - eras: [{"name":"Anno Domini","start":null,"offset":0}] - } - } -}); - -Globalize.addCultureInfo( "dv", "default", { - name: "dv", - englishName: "Divehi", - nativeName: "Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ°", - language: "dv", - isRTL: true, - numberFormat: { - currency: { - pattern: ["n $-","n $"], - symbol: "Þƒ." - } - }, - calendars: { - standard: { - name: "Hijri", - days: { - names: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesAbbr: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesShort: ["Þ‡Þ§","Þ€Þ¯","Þ‡Þ¦","Þ„Þª","Þ„Þª","Þ€Þª","Þ€Þ®"] - }, - months: { - names: ["Þ‰ÞªÞ™Þ¦Þ‡Þ°ÞƒÞ¦Þ‰Þ°","ÞžÞ¦ÞŠÞ¦ÞƒÞª","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ¦Þ‡Þ°ÞˆÞ¦ÞÞ°","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞª","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ«ÞÞ§","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞ§","ÞƒÞ¦Þ–Þ¦Þ„Þ°","ÞÞ¦Þ¢Þ°Þ„Þ§Þ‚Þ°","ÞƒÞ¦Þ‰Þ¦ÞŸÞ§Þ‚Þ°","ÞÞ¦Þ‡Þ°ÞˆÞ§ÞÞ°","Þ›ÞªÞÞ°Þ¤Þ¦Þ¢Þ¨Þ‹Þ§","Þ›ÞªÞÞ°Þ™Þ¨Þ‡Þ°Þ–Þ§",""], - namesAbbr: ["Þ‰ÞªÞ™Þ¦Þ‡Þ°ÞƒÞ¦Þ‰Þ°","ÞžÞ¦ÞŠÞ¦ÞƒÞª","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ¦Þ‡Þ°ÞˆÞ¦ÞÞ°","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞª","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ«ÞÞ§","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞ§","ÞƒÞ¦Þ–Þ¦Þ„Þ°","ÞÞ¦Þ¢Þ°Þ„Þ§Þ‚Þ°","ÞƒÞ¦Þ‰Þ¦ÞŸÞ§Þ‚Þ°","ÞÞ¦Þ‡Þ°ÞˆÞ§ÞÞ°","Þ›ÞªÞÞ°Þ¤Þ¦Þ¢Þ¨Þ‹Þ§","Þ›ÞªÞÞ°Þ™Þ¨Þ‡Þ°Þ–Þ§",""] - }, - AM: ["Þ‰Þ†","Þ‰Þ†","Þ‰Þ†"], - PM: ["Þ‰ÞŠ","Þ‰ÞŠ","Þ‰ÞŠ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd/MM/yyyy HH:mm", - F: "dd/MM/yyyy HH:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - days: { - names: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesAbbr: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesShort: ["Þ‡Þ§","Þ€Þ¯","Þ‡Þ¦","Þ„Þª","Þ„Þª","Þ€Þª","Þ€Þ®"] - }, - months: { - names: ["Þ–Þ¦Þ‚Þ¦ÞˆÞ¦ÞƒÞ©","ÞŠÞ¬Þ„Þ°ÞƒÞªÞ‡Þ¦ÞƒÞ©","Þ‰Þ§Þ—Þ°","Þ‡ÞÞ•Þ°ÞƒÞ¨ÞÞ°","Þ‰Þ¬Þ‡Þ¨","Þ–Þ«Þ‚Þ°","Þ–ÞªÞÞ¦Þ‡Þ¨","Þ‡Þ¯ÞŽÞ¦ÞÞ°Þ“Þ°","ÞÞ¬Þ•Þ°Þ“Þ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‡Þ®Þ†Þ°Þ“Þ¯Þ„Þ¦Þƒ","Þ‚Þ®ÞˆÞ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‘Þ¨ÞÞ¬Þ‰Þ°Þ„Þ¦Þƒ",""], - namesAbbr: ["Þ–Þ¦Þ‚Þ¦ÞˆÞ¦ÞƒÞ©","ÞŠÞ¬Þ„Þ°ÞƒÞªÞ‡Þ¦ÞƒÞ©","Þ‰Þ§Þ—Þ°","Þ‡ÞÞ•Þ°ÞƒÞ¨ÞÞ°","Þ‰Þ¬Þ‡Þ¨","Þ–Þ«Þ‚Þ°","Þ–ÞªÞÞ¦Þ‡Þ¨","Þ‡Þ¯ÞŽÞ¦ÞÞ°Þ“Þ°","ÞÞ¬Þ•Þ°Þ“Þ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‡Þ®Þ†Þ°Þ“Þ¯Þ„Þ¦Þƒ","Þ‚Þ®ÞˆÞ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‘Þ¨ÞÞ¬Þ‰Þ°Þ„Þ¦Þƒ",""] - }, - AM: ["Þ‰Þ†","Þ‰Þ†","Þ‰Þ†"], - PM: ["Þ‰ÞŠ","Þ‰ÞŠ","Þ‰ÞŠ"], - eras: [{"name":"Þ‰Þ©ÞÞ§Þ‹Þ©","start":null,"offset":0}], - patterns: { - d: "dd/MM/yy", - D: "ddd, yyyy MMMM dd", - t: "HH:mm", - T: "HH:mm:ss", - f: "ddd, yyyy MMMM dd HH:mm", - F: "ddd, yyyy MMMM dd HH:mm:ss", - Y: "yyyy, MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "ha", "default", { - name: "ha", - englishName: "Hausa", - nativeName: "Hausa", - language: "ha", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"], - namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"], - namesShort: ["L","L","T","L","A","J","A"] - }, - months: { - names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""], - namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""] - }, - AM: ["Safe","safe","SAFE"], - PM: ["Yamma","yamma","YAMMA"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "yo", "default", { - name: "yo", - englishName: "Yoruba", - nativeName: "Yoruba", - language: "yo", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"], - namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"], - namesShort: ["A","A","I","O","O","E","A"] - }, - months: { - names: ["Osu kinni","Osu keji","Osu keta","Osu kerin","Osu karun","Osu kefa","Osu keje","Osu kejo","Osu kesan","Osu kewa","Osu kokanla","Osu keresi",""], - namesAbbr: ["kin.","kej.","ket.","ker.","kar.","kef.","kej.","kej.","kes.","kew.","kok.","ker.",""] - }, - AM: ["Owuro","owuro","OWURO"], - PM: ["Ale","ale","ALE"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "quz", "default", { - name: "quz", - englishName: "Quechua", - nativeName: "runasimi", - language: "quz", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "$b" - } - }, - calendars: { - standard: { - days: { - names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"], - namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"], - namesShort: ["d","k","a","m","h","b","k"] - }, - months: { - names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""], - namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "nso", "default", { - name: "nso", - englishName: "Sesotho sa Leboa", - nativeName: "Sesotho sa Leboa", - language: "nso", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Lamorena","MoÅ¡upologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"], - namesAbbr: ["Lam","MoÅ¡","Lbb","Lbr","Lbn","Lbh","Mok"], - namesShort: ["L","M","L","L","L","L","M"] - }, - months: { - names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","NgoatoboÅ¡ego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""], - namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ba", "default", { - name: "ba", - englishName: "Bashkir", - nativeName: "Башҡорт", - language: "ba", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ",", - symbol: "Ò»." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Йәкшәмбе","Дүшәмбе","Шишәмбе","Шаршамбы","КеÑаҙна","Йома","Шәмбе"], - namesAbbr: ["Йш","Дш","Шш","Шр","КÑ","Йм","Шб"], - namesShort: ["Йш","Дш","Шш","Шр","КÑ","Йм","Шб"] - }, - months: { - names: ["ғинуар","февраль","март","апрель","май","июнь","июль","авгуÑÑ‚","ÑентÑбрь","октÑбрь","ноÑбрь","декабрь",""], - namesAbbr: ["ғин","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy 'й'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'й' H:mm", - F: "d MMMM yyyy 'й' H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "lb", "default", { - name: "lb", - englishName: "Luxembourgish", - nativeName: "Lëtzebuergesch", - language: "lb", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "n. num.", - negativeInfinity: "-onendlech", - positiveInfinity: "+onendlech", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"], - namesAbbr: ["Son","Méi","Dën","Mët","Don","Fre","Sam"], - namesShort: ["So","Mé","Dë","Më","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "kl", "default", { - name: "kl", - englishName: "Greenlandic", - nativeName: "kalaallisut", - language: "kl", - numberFormat: { - ",": ".", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - groupSizes: [3,0], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,0], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"], - namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"], - namesShort: ["sa","at","ma","pi","si","ta","ar"] - }, - months: { - names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ig", "default", { - name: "ig", - englishName: "Igbo", - nativeName: "Igbo", - language: "ig", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"], - namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"], - namesShort: ["A","A","I","O","O","E","A"] - }, - months: { - names: ["Onwa mbu","Onwa ibua","Onwa ato","Onwa ano","Onwa ise","Onwa isi","Onwa asa","Onwa asato","Onwa itolu","Onwa iri","Onwa iri n'ofu","Onwa iri n'ibua",""], - namesAbbr: ["mbu.","ibu.","ato.","ano.","ise","isi","asa","asa.","ito.","iri.","n'of.","n'ib.",""] - }, - AM: ["Ututu","ututu","UTUTU"], - PM: ["Efifie","efifie","EFIFIE"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ii", "default", { - name: "ii", - englishName: "Yi", - nativeName: "ê†ˆêŒ ê±ê‚·", - language: "ii", - numberFormat: { - groupSizes: [3,0], - "NaN": "ꌗꂷꀋꉬ", - negativeInfinity: "ꀄêŠêŒê€‹ê‰†", - positiveInfinity: "ꈤê‡ê‘–ꀋꉬ", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["ê‘ê†ê‘","ê†êŠ‚ê’”","ê†êŠ‚ê‘","ê†êŠ‚êŒ•","ê†êŠ‚ê‡–","ê†êŠ‚ê‰¬","ê†êŠ‚êƒ˜"], - namesAbbr: ["ê‘ê†","ê†ê’”","ê†ê‘","ê†êŒ•","ê†ê‡–","ê†ê‰¬","ê†êƒ˜"], - namesShort: ["ê†","ê’”","ê‘","ꌕ","ꇖ","ꉬ","ꃘ"] - }, - months: { - names: ["ê‹ê†ª","ê‘ꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","êƒê†ª","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""], - namesAbbr: ["ê‹ê†ª","ê‘ꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","êƒê†ª","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""] - }, - AM: ["ꂵꆪꈌêˆ","ꂵꆪꈌêˆ","ꂵꆪꈌêˆ"], - PM: ["ꂵꆪꈌꉈ","ꂵꆪꈌꉈ","ꂵꆪꈌꉈ"], - eras: [{"name":"ꇬꑼ","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'ꈎ' M'ꆪ' d'ê‘'", - t: "tt h:mm", - T: "H:mm:ss", - f: "yyyy'ꈎ' M'ꆪ' d'ê‘' tt h:mm", - F: "yyyy'ꈎ' M'ꆪ' d'ê‘' H:mm:ss", - M: "M'ꆪ' d'ê‘'", - Y: "yyyy'ꈎ' M'ꆪ'" - } - } - } -}); - -Globalize.addCultureInfo( "arn", "default", { - name: "arn", - englishName: "Mapudungun", - nativeName: "Mapudungun", - language: "arn", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "moh", "default", { - name: "moh", - englishName: "Mohawk", - nativeName: "Kanien'kéha", - language: "moh", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Awentatokentì:ke","Awentataón'ke","Ratironhia'kehronòn:ke","Soséhne","Okaristiiáhne","Ronwaia'tanentaktonhne","Entákta"], - namesShort: ["S","M","T","W","T","F","S"] - }, - months: { - names: ["Tsothohrkó:Wa","Enniska","Enniskó:Wa","Onerahtókha","Onerahtohkó:Wa","Ohiari:Ha","Ohiarihkó:Wa","Seskéha","Seskehkó:Wa","Kenténha","Kentenhkó:Wa","Tsothóhrha",""] - } - } - } -}); - -Globalize.addCultureInfo( "br", "default", { - name: "br", - englishName: "Breton", - nativeName: "brezhoneg", - language: "br", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "NkN", - negativeInfinity: "-Anfin", - positiveInfinity: "+Anfin", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sul","Lun","Meurzh","Merc'her","Yaou","Gwener","Sadorn"], - namesAbbr: ["Sul","Lun","Meu.","Mer.","Yaou","Gwe.","Sad."], - namesShort: ["Su","Lu","Mz","Mc","Ya","Gw","Sa"] - }, - months: { - names: ["Genver","C'hwevrer","Meurzh","Ebrel","Mae","Mezheven","Gouere","Eost","Gwengolo","Here","Du","Kerzu",""], - namesAbbr: ["Gen.","C'hwe.","Meur.","Ebr.","Mae","Mezh.","Goue.","Eost","Gwen.","Here","Du","Kzu",""] - }, - AM: null, - PM: null, - eras: [{"name":"g. J.-K.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ug", "default", { - name: "ug", - englishName: "Uyghur", - nativeName: "ئۇيغۇرچە", - language: "ug", - isRTL: true, - numberFormat: { - "NaN": "سان ئەمەس", - negativeInfinity: "مەنپىي چەكسىزلىك", - positiveInfinity: "مۇسبەت چەكسىزلىك", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"], - namesAbbr: ["ÙŠÛ•","دۈ","سە","چا","Ù¾Û•","جۈ","Ø´Û•"], - namesShort: ["ÙŠ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""], - namesAbbr: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""] - }, - AM: ["چۈشتىن بۇرۇن","چۈشتىن بۇرۇن","چۈشتىن بۇرۇن"], - PM: ["چۈشتىن ÙƒÛيىن","چۈشتىن ÙƒÛيىن","چۈشتىن ÙƒÛيىن"], - eras: [{"name":"مىلادى","start":null,"offset":0}], - patterns: { - d: "yyyy-M-d", - D: "yyyy-'يىلى' MMMM d-'كۈنى،'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm", - F: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm:ss", - M: "MMMM d'-كۈنى'", - Y: "yyyy-'يىلى' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "mi", "default", { - name: "mi", - englishName: "Maori", - nativeName: "Reo MÄori", - language: "mi", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["RÄtapu","RÄhina","RÄtÅ«","RÄapa","RÄpare","RÄmere","RÄhoroi"], - namesAbbr: ["Ta","Hi","TÅ«","Apa","Pa","Me","Ho"], - namesShort: ["Ta","Hi","TÅ«","Aa","Pa","Me","Ho"] - }, - months: { - names: ["Kohi-tÄtea","Hui-tanguru","PoutÅ«-te-rangi","Paenga-whÄwhÄ","Haratua","Pipiri","HÅngongoi","Here-turi-kÅkÄ","Mahuru","Whiringa-Ä-nuku","Whiringa-Ä-rangi","Hakihea",""], - namesAbbr: ["Kohi","Hui","Pou","Pae","Hara","Pipi","HÅngo","Here","Mahu","Nuku","Rangi","Haki",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd MMMM, yyyy", - f: "dddd, dd MMMM, yyyy h:mm tt", - F: "dddd, dd MMMM, yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM, yy" - } - } - } -}); - -Globalize.addCultureInfo( "oc", "default", { - name: "oc", - englishName: "Occitan", - nativeName: "Occitan", - language: "oc", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numeric", - negativeInfinity: "-Infinit", - positiveInfinity: "+Infinit", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"], - namesAbbr: ["dim.","lun.","mar.","mèc.","jòu.","ven.","sab."], - namesShort: ["di","lu","ma","mè","jò","ve","sa"] - }, - months: { - names: ["genier","febrier","març","abril","mai","junh","julh","agost","setembre","octobre","novembre","desembre",""], - namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""] - }, - monthsGenitive: { - names: ["de genier","de febrier","de març","d'abril","de mai","de junh","de julh","d'agost","de setembre","d'octobre","de novembre","de desembre",""], - namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""] - }, - AM: null, - PM: null, - eras: [{"name":"après Jèsus-Crist","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd,' lo 'd MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd,' lo 'd MMMM' de 'yyyy HH:mm", - F: "dddd,' lo 'd MMMM' de 'yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "co", "default", { - name: "co", - englishName: "Corsican", - nativeName: "Corsu", - language: "co", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Mica numericu", - negativeInfinity: "-Infinitu", - positiveInfinity: "+Infinitu", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dumenica","luni","marti","mercuri","ghjovi","venderi","sabbatu"], - namesAbbr: ["dum.","lun.","mar.","mer.","ghj.","ven.","sab."], - namesShort: ["du","lu","ma","me","gh","ve","sa"] - }, - months: { - names: ["ghjennaghju","ferraghju","marzu","aprile","maghju","ghjunghju","lugliu","aostu","settembre","ottobre","nuvembre","dicembre",""], - namesAbbr: ["ghje","ferr","marz","apri","magh","ghju","lugl","aost","sett","otto","nuve","dice",""] - }, - AM: null, - PM: null, - eras: [{"name":"dopu J-C","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "gsw", "default", { - name: "gsw", - englishName: "Alsatian", - nativeName: "Elsässisch", - language: "gsw", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Ohne Nummer", - negativeInfinity: "-Unendlich", - positiveInfinity: "+Unendlich", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sundà à ","Mondà à ","Dienschdà à ","Mittwuch","Dunnerschdà à ","Fridà à ","Sà mschdà à "], - namesAbbr: ["Su.","Mo.","Di.","Mi.","Du.","Fr.","Sà ."], - namesShort: ["Su","Mo","Di","Mi","Du","Fr","Sà "] - }, - months: { - names: ["Jänner","Feverje","März","Àpril","Mai","Jüni","Jüli","Augscht","September","Oktower","Nowember","Dezember",""], - namesAbbr: ["Jän.","Fev.","März","Apr.","Mai","Jüni","Jüli","Aug.","Sept.","Okt.","Now.","Dez.",""] - }, - AM: null, - PM: null, - eras: [{"name":"Vor J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sah", "default", { - name: "sah", - englishName: "Yakut", - nativeName: "Ñаха", - language: "sah", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "NAN", - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "Ñ." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["баÑкыһыанньа","бÑнидиÑнньик","оптуорунньук","ÑÑÑ€ÑдÑ","чÑппиÑÑ€","бÑÑтинÑÑ","Ñубуота"], - namesAbbr: ["БÑ","Бн","Оп","Ср","Чп","Бт","Сб"], - namesShort: ["БÑ","Бн","Оп","Ср","Чп","Бт","Сб"] - }, - months: { - names: ["ТохÑунньу","Олунньу","Кулун тутар","ÐœÑƒÑƒÑ ÑƒÑтар","Ыам ыйа","БÑÑ Ñ‹Ð¹Ð°","От ыйа","Ðтырдьах ыйа","Балаҕан ыйа","Ðлтынньы","СÑтинньи","ÐÑ…Ñынньы",""], - namesAbbr: ["тхÑ","олн","кул","мÑÑ‚","ыам","бÑÑ","отй","атр","блҕ","алт","Ñтн","ахÑ",""] - }, - monthsGenitive: { - names: ["тохÑунньу","олунньу","кулун тутар","Ð¼ÑƒÑƒÑ ÑƒÑтар","ыам ыйын","бÑÑ Ñ‹Ð¹Ñ‹Ð½","от ыйын","атырдьах ыйын","балаҕан ыйын","алтынньы","ÑÑтинньи","ахÑынньы",""], - namesAbbr: ["тхÑ","олн","кул","мÑÑ‚","ыам","бÑÑ","отй","атр","блҕ","алт","Ñтн","ахÑ",""] - }, - AM: null, - PM: null, - patterns: { - d: "MM.dd.yyyy", - D: "MMMM d yyyy 'Ñ.'", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d yyyy 'Ñ.' H:mm", - F: "MMMM d yyyy 'Ñ.' H:mm:ss", - Y: "MMMM yyyy 'Ñ.'" - } - } - } -}); - -Globalize.addCultureInfo( "qut", "default", { - name: "qut", - englishName: "K'iche", - nativeName: "K'iche", - language: "qut", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - symbol: "Q" - } - }, - calendars: { - standard: { - days: { - names: ["juq'ij","kaq'ij","oxq'ij","kajq'ij","joq'ij","waqq'ij","wuqq'ij"], - namesAbbr: ["juq","kaq","oxq","kajq","joq","waqq","wuqq"], - namesShort: ["ju","ka","ox","ka","jo","wa","wu"] - }, - months: { - names: ["nab'e ik'","ukab' ik'","rox ik'","ukaj ik'","uro' ik'","uwaq ik'","uwuq ik'","uwajxaq ik'","ub'elej ik'","ulaj ik'","ujulaj ik'","ukab'laj ik'",""], - namesAbbr: ["nab'e","ukab","rox","ukaj","uro","uwaq","uwuq","uwajxaq","ub'elej","ulaj","ujulaj","ukab'laj",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "rw", "default", { - name: "rw", - englishName: "Kinyarwanda", - nativeName: "Kinyarwanda", - language: "rw", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$-n","$ n"], - ",": " ", - ".": ",", - symbol: "RWF" - } - }, - calendars: { - standard: { - days: { - names: ["Ku wa mbere","Ku wa kabiri","Ku wa gatatu","Ku wa kane","Ku wa gatanu","Ku wa gatandatu","Ku cyumweru"], - namesAbbr: ["mbe.","kab.","gat.","kan.","gat.","gat.","cyu."], - namesShort: ["mb","ka","ga","ka","ga","ga","cy"] - }, - months: { - names: ["Mutarama","Gashyantare","Werurwe","Mata","Gicurasi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza",""], - namesAbbr: ["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukwa","Ugu","Uku",""] - }, - AM: ["saa moya z.m.","saa moya z.m.","SAA MOYA Z.M."], - PM: ["saa moya z.n.","saa moya z.n.","SAA MOYA Z.N."], - eras: [{"name":"AD","start":null,"offset":0}] - } - } -}); - -Globalize.addCultureInfo( "wo", "default", { - name: "wo", - englishName: "Wolof", - nativeName: "Wolof", - language: "wo", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "XOF" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "prs", "default", { - name: "prs", - englishName: "Dari", - nativeName: "درى", - language: "prs", - isRTL: true, - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "غ ع", - negativeInfinity: "-∞", - positiveInfinity: "∞", - percent: { - pattern: ["%n-","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$n-","$n"], - symbol: "Ø‹" - } - }, - calendars: { - standard: { - name: "Hijri", - firstDay: 5, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - firstDay: 5, - days: { - names: ["یکشنبه","دوشنبه","سه\u200cشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["یکشنبه","دوشنبه","سه\u200cشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","ليندÛ","مرغومى",""], - namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","ليندÛ","مرغومى",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"Ù„.Ù‡","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy, dd, MMMM, dddd", - f: "yyyy, dd, MMMM, dddd h:mm tt", - F: "yyyy, dd, MMMM, dddd h:mm:ss tt", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "gd", "default", { - name: "gd", - englishName: "Scottish Gaelic", - nativeName: "Gà idhlig", - language: "gd", - numberFormat: { - negativeInfinity: "-Neo-chrìochnachd", - positiveInfinity: "Neo-chrìochnachd", - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Didòmhnaich","Diluain","Dimà irt","Diciadain","Diardaoin","Dihaoine","Disathairne"], - namesAbbr: ["Dòm","Lua","Mà i","Cia","Ard","Hao","Sat"], - namesShort: ["D","L","M","C","A","H","S"] - }, - months: { - names: ["Am Faoilleach","An Gearran","Am Mà rt","An Giblean","An Cèitean","An t-Ã’gmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dà mhair","An t-Samhain","An Dùbhlachd",""], - namesAbbr: ["Fao","Gea","Mà r","Gib","Cèi","Ã’gm","Iuc","Lùn","Sul","Dà m","Sam","Dùb",""] - }, - AM: ["m","m","M"], - PM: ["f","f","F"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-SA", "default", { - name: "ar-SA", - englishName: "Arabic (Saudi Arabia)", - nativeName: "العربية (المملكة العربية السعودية)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "ر.س.\u200f" - } - }, - calendars: { - standard: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "bg-BG", "default", { - name: "bg-BG", - englishName: "Bulgarian (Bulgaria)", - nativeName: "българÑки (БългариÑ)", - language: "bg", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "- безкрайноÑÑ‚", - positiveInfinity: "+ безкрайноÑÑ‚", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "лв." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["неделÑ","понеделник","вторник","ÑÑ€Ñда","четвъртък","петък","Ñъбота"], - namesAbbr: ["нед","пон","вт","ÑÑ€","четв","пет","Ñъб"], - namesShort: ["н","п","в","Ñ","ч","п","Ñ"] - }, - months: { - names: ["Ñнуари","февруари","март","април","май","юни","юли","авгуÑÑ‚","Ñептември","октомври","ноември","декември",""], - namesAbbr: ["Ñн","февр","март","апр","май","юни","юли","авг","Ñепт","окт","ноември","дек",""] - }, - AM: null, - PM: null, - eras: [{"name":"Ñлед новата ера","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy 'г.'", - D: "dd MMMM yyyy 'г.'", - t: "HH:mm 'ч.'", - T: "HH:mm:ss 'ч.'", - f: "dd MMMM yyyy 'г.' HH:mm 'ч.'", - F: "dd MMMM yyyy 'г.' HH:mm:ss 'ч.'", - M: "dd MMMM", - Y: "MMMM yyyy 'г.'" - } - } - } -}); - -Globalize.addCultureInfo( "ca-ES", "default", { - name: "ca-ES", - englishName: "Catalan (Catalan)", - nativeName: "català (català )", - language: "ca", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinit", - positiveInfinity: "Infinit", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"], - namesAbbr: ["dg.","dl.","dt.","dc.","dj.","dv.","ds."], - namesShort: ["dg","dl","dt","dc","dj","dv","ds"] - }, - months: { - names: ["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""], - namesAbbr: ["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' / 'MMMM' / 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' / 'MMMM' / 'yyyy HH:mm", - F: "dddd, d' / 'MMMM' / 'yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM' / 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "zh-TW", "default", { - name: "zh-TW", - englishName: "Chinese (Traditional, Taiwan)", - nativeName: "䏿–‡(å°ç£)", - language: "zh-CHT", - numberFormat: { - "NaN": "䏿˜¯ä¸€å€‹æ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "NT$" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"西元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "tt hh:mm", - T: "tt hh:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' tt hh:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' tt hh:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - }, - Taiwan: { - name: "Taiwan", - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"","start":null,"offset":1911}], - twoDigitYearMax: 99, - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "tt hh:mm", - T: "tt hh:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' tt hh:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' tt hh:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "cs-CZ", "default", { - name: "cs-CZ", - englishName: "Czech (Czech Republic)", - nativeName: "ÄeÅ¡tina (ÄŒeská republika)", - language: "cs", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Nenà ÄÃslo", - negativeInfinity: "-nekoneÄno", - positiveInfinity: "+nekoneÄno", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "KÄ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedÄ›le","pondÄ›lÃ","úterý","stÅ™eda","Ätvrtek","pátek","sobota"], - namesAbbr: ["ne","po","út","st","Ät","pá","so"], - namesShort: ["ne","po","út","st","Ät","pá","so"] - }, - months: { - names: ["leden","únor","bÅ™ezen","duben","kvÄ›ten","Äerven","Äervenec","srpen","zářÃ","Å™Ãjen","listopad","prosinec",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - monthsGenitive: { - names: ["ledna","února","bÅ™ezna","dubna","kvÄ›tna","Äervna","Äervence","srpna","zářÃ","Å™Ãjna","listopadu","prosince",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["dop.","dop.","DOP."], - PM: ["odp.","odp.","ODP."], - eras: [{"name":"n. l.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "da-DK", "default", { - name: "da-DK", - englishName: "Danish (Denmark)", - nativeName: "dansk (Danmark)", - language: "da", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "de-DE", "default", { - name: "de-DE", - englishName: "German (Germany)", - nativeName: "Deutsch (Deutschland)", - language: "de", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "el-GR", "default", { - name: "el-GR", - englishName: "Greek (Greece)", - nativeName: "Ελληνικά (Ελλάδα)", - language: "el", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "μη αÏιθμός", - negativeInfinity: "-ΆπειÏο", - positiveInfinity: "ΆπειÏο", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["ΚυÏιακή","ΔευτÎÏα","ΤÏίτη","ΤετάÏτη","Î Îμπτη","ΠαÏασκευή","Σάββατο"], - namesAbbr: ["ΚυÏ","Δευ","ΤÏι","Τετ","Πεμ","ΠαÏ","Σαβ"], - namesShort: ["Κυ","Δε","ΤÏ","Τε","Πε","Πα","Σά"] - }, - months: { - names: ["ΙανουάÏιος","ΦεβÏουάÏιος","ΜάÏτιος","ΑπÏίλιος","Μάιος","ΙοÏνιος","ΙοÏλιος","ΑÏγουστος","ΣεπτÎμβÏιος","ΟκτώβÏιος","ÎοÎμβÏιος","ΔεκÎμβÏιος",""], - namesAbbr: ["Ιαν","Φεβ","ΜαÏ","ΑπÏ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Îοε","Δεκ",""] - }, - monthsGenitive: { - names: ["ΙανουαÏίου","ΦεβÏουαÏίου","ΜαÏτίου","ΑπÏιλίου","ΜαÎου","Ιουνίου","Ιουλίου","ΑυγοÏστου","ΣεπτεμβÏίου","ΟκτωβÏίου","ÎοεμβÏίου","ΔεκεμβÏίου",""], - namesAbbr: ["Ιαν","Φεβ","ΜαÏ","ΑπÏ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Îοε","Δεκ",""] - }, - AM: ["πμ","πμ","ΠΜ"], - PM: ["μμ","μμ","ΜΜ"], - eras: [{"name":"μ.Χ.","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "dddd, d MMMM yyyy", - f: "dddd, d MMMM yyyy h:mm tt", - F: "dddd, d MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "en-US", "default", { - name: "en-US", - englishName: "English (United States)" -}); - -Globalize.addCultureInfo( "fi-FI", "default", { - name: "fi-FI", - englishName: "Finnish (Finland)", - nativeName: "suomi (Suomi)", - language: "fi", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"], - namesAbbr: ["su","ma","ti","ke","to","pe","la"], - namesShort: ["su","ma","ti","ke","to","pe","la"] - }, - months: { - names: ["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""], - namesAbbr: ["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM'ta 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM'ta 'yyyy H:mm", - F: "d. MMMM'ta 'yyyy H:mm:ss", - M: "d. MMMM'ta'", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fr-FR", "default", { - name: "fr-FR", - englishName: "French (France)", - nativeName: "français (France)", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "he-IL", "default", { - name: "he-IL", - englishName: "Hebrew (Israel)", - nativeName: "עברית (ישר×ל)", - language: "he", - isRTL: true, - numberFormat: { - "NaN": "×œ× ×ž×¡×¤×¨", - negativeInfinity: "××™× ×¡×•×£Â ×©×œ×™×œ×™", - positiveInfinity: "××™× ×¡×•×£Â ×—×™×•×‘×™", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "₪" - } - }, - calendars: { - standard: { - days: { - names: ["יו× ר×שון","יו×Â ×©× ×™","יו× שלישי","יו× רביעי","יו× חמישי","יו× שישי","שבת"], - namesAbbr: ["יו× ×","יו× ב","יו× ג","יו× ד","יו× ה","יו× ו","שבת"], - namesShort: ["×","ב","×’","ד","×”","ו","ש"] - }, - months: { - names: ["×™× ×•×ר","פברו×ר","מרץ","×פריל","מ××™","×™×•× ×™","יולי","×וגוסט","ספטמבר","×וקטובר","× ×•×‘×ž×‘×¨","דצמבר",""], - namesAbbr: ["×™× ×•","פבר","מרץ","×פר","מ××™","×™×•× ","יול","×וג","ספט","×וק","× ×•×‘","דצמ",""] - }, - eras: [{"name":"לספירה","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd dd MMMM yyyy HH:mm", - F: "dddd dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - }, - Hebrew: { - name: "Hebrew", - "/": " ", - days: { - names: ["יו× ר×שון","יו×Â ×©× ×™","יו× שלישי","יו× רביעי","יו× חמישי","יו× שישי","שבת"], - namesAbbr: ["×","ב","×’","ד","×”","ו","ש"], - namesShort: ["×","ב","×’","ד","×”","ו","ש"] - }, - months: { - names: ["תשרי","חשון","כסלו","טבת","שבט","×דר","×דר ב","× ×™×¡×Ÿ","×ייר","סיון","תמוז","×ב","×לול"], - namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","×דר","×דר ב","× ×™×¡×Ÿ","×ייר","סיון","תמוז","×ב","×לול"] - }, - eras: [{"name":"C.E.","start":null,"offset":0}], - twoDigitYearMax: 5790, - patterns: { - d: "dd MMMM yyyy", - D: "dddd dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd dd MMMM yyyy HH:mm", - F: "dddd dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hu-HU", "default", { - name: "hu-HU", - englishName: "Hungarian (Hungary)", - nativeName: "magyar (Magyarország)", - language: "hu", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "nem szám", - negativeInfinity: "negatÃv végtelen", - positiveInfinity: "végtelen", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ft" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["vasárnap","hétfÅ‘","kedd","szerda","csütörtök","péntek","szombat"], - namesAbbr: ["V","H","K","Sze","Cs","P","Szo"], - namesShort: ["V","H","K","Sze","Cs","P","Szo"] - }, - months: { - names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""], - namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""] - }, - AM: ["de.","de.","DE."], - PM: ["du.","du.","DU."], - eras: [{"name":"i.sz.","start":null,"offset":0}], - patterns: { - d: "yyyy.MM.dd.", - D: "yyyy. MMMM d.", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy. MMMM d. H:mm", - F: "yyyy. MMMM d. H:mm:ss", - M: "MMMM d.", - Y: "yyyy. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "is-IS", "default", { - name: "is-IS", - englishName: "Icelandic (Iceland)", - nativeName: "Ãslenska (Ãsland)", - language: "is", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"], - namesAbbr: ["sun.","mán.","þri.","mið.","fim.","fös.","lau."], - namesShort: ["su","má","þr","mi","fi","fö","la"] - }, - months: { - names: ["janúar","febrúar","mars","aprÃl","maÃ","júnÃ","júlÃ","ágúst","september","október","nóvember","desember",""], - namesAbbr: ["jan.","feb.","mar.","apr.","maÃ","jún.","júl.","ágú.","sep.","okt.","nóv.","des.",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "it-IT", "default", { - name: "it-IT", - englishName: "Italian (Italy)", - nativeName: "italiano (Italia)", - language: "it", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "Non un numero reale", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"], - namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"], - namesShort: ["do","lu","ma","me","gi","ve","sa"] - }, - months: { - names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""], - namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ja-JP", "default", { - name: "ja-JP", - englishName: "Japanese (Japan)", - nativeName: "日本語 (日本)", - language: "ja", - numberFormat: { - "NaN": "NaN (éžæ•°å€¤)", - negativeInfinity: "-∞", - positiveInfinity: "+∞", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["-$n","$n"], - decimals: 0, - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["日曜日","月曜日","ç«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"], - namesAbbr: ["æ—¥","月","ç«","æ°´","木","金","土"], - namesShort: ["æ—¥","月","ç«","æ°´","木","金","土"] - }, - months: { - names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["åˆå‰","åˆå‰","åˆå‰"], - PM: ["åˆå¾Œ","åˆå¾Œ","åˆå¾Œ"], - eras: [{"name":"西暦","start":null,"offset":0}], - patterns: { - d: "yyyy/MM/dd", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - }, - Japanese: { - name: "Japanese", - days: { - names: ["日曜日","月曜日","ç«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"], - namesAbbr: ["æ—¥","月","ç«","æ°´","木","金","土"], - namesShort: ["æ—¥","月","ç«","æ°´","木","金","土"] - }, - months: { - names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["åˆå‰","åˆå‰","åˆå‰"], - PM: ["åˆå¾Œ","åˆå¾Œ","åˆå¾Œ"], - eras: [{"name":"å¹³æˆ","start":null,"offset":1867},{"name":"æ˜å’Œ","start":-1812153600000,"offset":1911},{"name":"大æ£","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}], - twoDigitYearMax: 99, - patterns: { - d: "gg y/M/d", - D: "gg y'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "gg y'å¹´'M'月'd'æ—¥' H:mm", - F: "gg y'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "gg y'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "ko-KR", "default", { - name: "ko-KR", - englishName: "Korean (Korea)", - nativeName: "한êµì–´ (대한민êµ)", - language: "ko", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - decimals: 0, - symbol: "â‚©" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ì¼ìš”ì¼","월요ì¼","화요ì¼","수요ì¼","목요ì¼","금요ì¼","í† ìš”ì¼"], - namesAbbr: ["ì¼","ì›”","í™”","수","목","금","í† "], - namesShort: ["ì¼","ì›”","í™”","수","목","금","í† "] - }, - months: { - names: ["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["ì˜¤ì „","ì˜¤ì „","ì˜¤ì „"], - PM: ["오후","오후","오후"], - eras: [{"name":"서기","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy'ë…„' M'ì›”' d'ì¼' dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm", - F: "yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm:ss", - M: "M'ì›”' d'ì¼'", - Y: "yyyy'ë…„' M'ì›”'" - } - }, - Korean: { - name: "Korean", - "/": "-", - days: { - names: ["ì¼ìš”ì¼","월요ì¼","화요ì¼","수요ì¼","목요ì¼","금요ì¼","í† ìš”ì¼"], - namesAbbr: ["ì¼","ì›”","í™”","수","목","금","í† "], - namesShort: ["ì¼","ì›”","í™”","수","목","금","í† "] - }, - months: { - names: ["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: ["ì˜¤ì „","ì˜¤ì „","ì˜¤ì „"], - PM: ["오후","오후","오후"], - eras: [{"name":"단기","start":null,"offset":-2333}], - twoDigitYearMax: 4362, - patterns: { - d: "gg yyyy-MM-dd", - D: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm", - F: "gg yyyy'ë…„' M'ì›”' d'ì¼' dddd tt h:mm:ss", - M: "M'ì›”' d'ì¼'", - Y: "gg yyyy'ë…„' M'ì›”'" - } - } - } -}); - -Globalize.addCultureInfo( "nl-NL", "default", { - name: "nl-NL", - englishName: "Dutch (Netherlands)", - nativeName: "Nederlands (Nederland)", - language: "nl", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"], - namesAbbr: ["zo","ma","di","wo","do","vr","za"], - namesShort: ["zo","ma","di","wo","do","vr","za"] - }, - months: { - names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d-M-yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "nb-NO", "default", { - name: "nb-NO", - englishName: "Norwegian, BokmÃ¥l (Norway)", - nativeName: "norsk, bokmÃ¥l (Norge)", - language: "nb", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "pl-PL", "default", { - name: "pl-PL", - englishName: "Polish (Poland)", - nativeName: "polski (Polska)", - language: "pl", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "nie jest liczbÄ…", - negativeInfinity: "-nieskoÅ„czoność", - positiveInfinity: "+nieskoÅ„czoność", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "zÅ‚" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["niedziela","poniedziaÅ‚ek","wtorek","Å›roda","czwartek","piÄ…tek","sobota"], - namesAbbr: ["N","Pn","Wt","Åšr","Cz","Pt","So"], - namesShort: ["N","Pn","Wt","Åšr","Cz","Pt","So"] - }, - months: { - names: ["styczeÅ„","luty","marzec","kwiecieÅ„","maj","czerwiec","lipiec","sierpieÅ„","wrzesieÅ„","październik","listopad","grudzieÅ„",""], - namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""] - }, - monthsGenitive: { - names: ["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","wrzeÅ›nia","października","listopada","grudnia",""], - namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "pt-BR", "default", { - name: "pt-BR", - englishName: "Portuguese (Brazil)", - nativeName: "Português (Brasil)", - language: "pt", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NaN (Não é um número)", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "R$" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"], - namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"], - namesShort: ["D","S","T","Q","Q","S","S"] - }, - months: { - names: ["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""], - namesAbbr: ["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' de 'MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' de 'MMMM' de 'yyyy HH:mm", - F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss", - M: "dd' de 'MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "rm-CH", "default", { - name: "rm-CH", - englishName: "Romansh (Switzerland)", - nativeName: "Rumantsch (Svizra)", - language: "rm", - numberFormat: { - ",": "'", - "NaN": "betg def.", - negativeInfinity: "-infinit", - positiveInfinity: "+infinit", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "fr." - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dumengia","glindesdi","mardi","mesemna","gievgia","venderdi","sonda"], - namesAbbr: ["du","gli","ma","me","gie","ve","so"], - namesShort: ["du","gli","ma","me","gie","ve","so"] - }, - months: { - names: ["schaner","favrer","mars","avrigl","matg","zercladur","fanadur","avust","settember","october","november","december",""], - namesAbbr: ["schan","favr","mars","avr","matg","zercl","fan","avust","sett","oct","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"s. Cr.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d MMMM yyyy HH:mm", - F: "dddd, d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ro-RO", "default", { - name: "ro-RO", - englishName: "Romanian (Romania)", - nativeName: "română (România)", - language: "ro", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "lei" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["duminică","luni","marÅ£i","miercuri","joi","vineri","sâmbătă"], - namesAbbr: ["D","L","Ma","Mi","J","V","S"], - namesShort: ["D","L","Ma","Mi","J","V","S"] - }, - months: { - names: ["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""], - namesAbbr: ["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ru-RU", "default", { - name: "ru-RU", - englishName: "Russian (Russia)", - nativeName: "руÑÑкий (РоÑÑиÑ)", - language: "ru", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["воÑкреÑенье","понедельник","вторник","Ñреда","четверг","пÑтница","Ñуббота"], - namesAbbr: ["Ð’Ñ","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"], - namesShort: ["Ð’Ñ","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"] - }, - months: { - names: ["Январь","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Ñнв","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - monthsGenitive: { - names: ["ÑнварÑ","февралÑ","марта","апрелÑ","маÑ","июнÑ","июлÑ","авгуÑта","ÑентÑбрÑ","октÑбрÑ","ноÑбрÑ","декабрÑ",""], - namesAbbr: ["Ñнв","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy 'г.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'г.' H:mm", - F: "d MMMM yyyy 'г.' H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hr-HR", "default", { - name: "hr-HR", - englishName: "Croatian (Croatia)", - nativeName: "hrvatski (Hrvatska)", - language: "hr", - numberFormat: { - pattern: ["- n"], - ",": ".", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kn" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["sijeÄanj","veljaÄa","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - monthsGenitive: { - names: ["sijeÄnja","veljaÄe","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy.", - D: "d. MMMM yyyy.", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy. H:mm", - F: "d. MMMM yyyy. H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "sk-SK", "default", { - name: "sk-SK", - englishName: "Slovak (Slovakia)", - nativeName: "slovenÄina (Slovenská republika)", - language: "sk", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Nie je ÄÃslo", - negativeInfinity: "-nekoneÄno", - positiveInfinity: "+nekoneÄno", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["nedeľa","pondelok","utorok","streda","Å¡tvrtok","piatok","sobota"], - namesAbbr: ["ne","po","ut","st","Å¡t","pi","so"], - namesShort: ["ne","po","ut","st","Å¡t","pi","so"] - }, - months: { - names: ["január","február","marec","aprÃl","máj","jún","júl","august","september","október","november","december",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - monthsGenitive: { - names: ["januára","februára","marca","aprÃla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra",""], - namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. l.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sq-AL", "default", { - name: "sq-AL", - englishName: "Albanian (Albania)", - nativeName: "shqipe (Shqipëria)", - language: "sq", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-infinit", - positiveInfinity: "infinit", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": ".", - ".": ",", - symbol: "Lek" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"], - namesAbbr: ["Die","Hën","Mar","Mër","Enj","Pre","Sht"], - namesShort: ["Di","Hë","Ma","Më","En","Pr","Sh"] - }, - months: { - names: ["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor",""], - namesAbbr: ["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj",""] - }, - AM: ["PD","pd","PD"], - PM: ["MD","md","MD"], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy-MM-dd", - t: "h:mm.tt", - T: "h:mm:ss.tt", - f: "yyyy-MM-dd h:mm.tt", - F: "yyyy-MM-dd h:mm:ss.tt", - Y: "yyyy-MM" - } - } - } -}); - -Globalize.addCultureInfo( "sv-SE", "default", { - name: "sv-SE", - englishName: "Swedish (Sweden)", - nativeName: "svenska (Sverige)", - language: "sv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["söndag","mÃ¥ndag","tisdag","onsdag","torsdag","fredag","lördag"], - namesAbbr: ["sö","mÃ¥","ti","on","to","fr","lö"], - namesShort: ["sö","mÃ¥","ti","on","to","fr","lö"] - }, - months: { - names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "'den 'd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "'den 'd MMMM yyyy HH:mm", - F: "'den 'd MMMM yyyy HH:mm:ss", - M: "'den 'd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "th-TH", "default", { - name: "th-TH", - englishName: "Thai (Thailand)", - nativeName: "ไทย (ไทย)", - language: "th", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "฿" - } - }, - calendars: { - standard: { - name: "ThaiBuddhist", - firstDay: 1, - days: { - names: ["à¸à¸²à¸—ิตย์","จันทร์","à¸à¸±à¸‡à¸„าร","พุธ","พฤหัสบดี","ศุà¸à¸£à¹Œ","เสาร์"], - namesAbbr: ["à¸à¸².","จ.","à¸.","พ.","พฤ.","ศ.","ส."], - namesShort: ["à¸","จ","à¸","พ","พ","ศ","ส"] - }, - months: { - names: ["มà¸à¸£à¸²à¸„ม","à¸à¸¸à¸¡à¸ าพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","à¸à¸£à¸à¸Žà¸²à¸„ม","สิงหาคม","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","ตุลาคม","พฤศจิà¸à¸²à¸¢à¸™","ธันวาคม",""], - namesAbbr: ["ม.ค.","à¸.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","à¸.ค.","ส.ค.","à¸.ย.","ต.ค.","พ.ย.","ธ.ค.",""] - }, - eras: [{"name":"พ.ศ.","start":null,"offset":-543}], - twoDigitYearMax: 2572, - patterns: { - d: "d/M/yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - }, - Gregorian_Localized: { - firstDay: 1, - days: { - names: ["à¸à¸²à¸—ิตย์","จันทร์","à¸à¸±à¸‡à¸„าร","พุธ","พฤหัสบดี","ศุà¸à¸£à¹Œ","เสาร์"], - namesAbbr: ["à¸à¸².","จ.","à¸.","พ.","พฤ.","ศ.","ส."], - namesShort: ["à¸","จ","à¸","พ","พ","ศ","ส"] - }, - months: { - names: ["มà¸à¸£à¸²à¸„ม","à¸à¸¸à¸¡à¸ าพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","à¸à¸£à¸à¸Žà¸²à¸„ม","สิงหาคม","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","ตุลาคม","พฤศจิà¸à¸²à¸¢à¸™","ธันวาคม",""], - namesAbbr: ["ม.ค.","à¸.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","à¸.ค.","ส.ค.","à¸.ย.","ต.ค.","พ.ย.","ธ.ค.",""] - }, - patterns: { - d: "d/M/yyyy", - D: "'วัน'dddd'ที่' d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "'วัน'dddd'ที่' d MMMM yyyy H:mm", - F: "'วัน'dddd'ที่' d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "tr-TR", "default", { - name: "tr-TR", - englishName: "Turkish (Turkey)", - nativeName: "Türkçe (Türkiye)", - language: "tr", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "TL" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Pazar","Pazartesi","Salı","ÇarÅŸamba","PerÅŸembe","Cuma","Cumartesi"], - namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"], - namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"] - }, - months: { - names: ["Ocak","Åžubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄŸustos","Eylül","Ekim","Kasım","Aralık",""], - namesAbbr: ["Oca","Åžub","Mar","Nis","May","Haz","Tem","AÄŸu","Eyl","Eki","Kas","Ara",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "dd MMMM yyyy dddd", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy dddd HH:mm", - F: "dd MMMM yyyy dddd HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ur-PK", "default", { - name: "ur-PK", - englishName: "Urdu (Islamic Republic of Pakistan)", - nativeName: "Ø§ÙØ±Ø¯Ùˆ (پاکستان)", - language: "ur", - isRTL: true, - numberFormat: { - currency: { - pattern: ["$n-","$n"], - symbol: "Rs" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","Ù‡ÙØªÙ‡"], - namesAbbr: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","Ù‡ÙØªÙ‡"], - namesShort: ["ا","Ù¾","Ù…","ب","ج","ج","Ù‡"] - }, - months: { - names: ["جنوری","ÙØ±ÙˆØ±ÛŒ","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""], - namesAbbr: ["جنوری","ÙØ±ÙˆØ±ÛŒ","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""] - }, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - f: "dd MMMM, yyyy h:mm tt", - F: "dd MMMM, yyyy h:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - } - } -}); - -Globalize.addCultureInfo( "id-ID", "default", { - name: "id-ID", - englishName: "Indonesian (Indonesia)", - nativeName: "Bahasa Indonesia (Indonesia)", - language: "id", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - decimals: 0, - ",": ".", - ".": ",", - symbol: "Rp" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"], - namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"], - namesShort: ["M","S","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""], - namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "uk-UA", "default", { - name: "uk-UA", - englishName: "Ukrainian (Ukraine)", - nativeName: "українÑька (Україна)", - language: "uk", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-безмежніÑть", - positiveInfinity: "безмежніÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚´" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["неділÑ","понеділок","вівторок","Ñереда","четвер","п'ÑтницÑ","Ñубота"], - namesAbbr: ["Ðд","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"], - namesShort: ["Ðд","Пн","Ð’Ñ‚","Ср","Чт","Пт","Сб"] - }, - months: { - names: ["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","ВереÑень","Жовтень","ЛиÑтопад","Грудень",""], - namesAbbr: ["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","ЛиÑ","Гру",""] - }, - monthsGenitive: { - names: ["ÑічнÑ","лютого","березнÑ","квітнÑ","травнÑ","червнÑ","липнÑ","ÑерпнÑ","вереÑнÑ","жовтнÑ","лиÑтопада","груднÑ",""], - namesAbbr: ["Ñіч","лют","бер","кві","тра","чер","лип","Ñер","вер","жов","лиÑ","гру",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy' Ñ€.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy' Ñ€.' H:mm", - F: "d MMMM yyyy' Ñ€.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy' Ñ€.'" - } - } - } -}); - -Globalize.addCultureInfo( "be-BY", "default", { - name: "be-BY", - englishName: "Belarusian (Belarus)", - nativeName: "БеларуÑкі (БеларуÑÑŒ)", - language: "be", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["нÑдзелÑ","панÑдзелак","аўторак","Ñерада","чацвер","пÑтніца","Ñубота"], - namesAbbr: ["нд","пн","аў","ÑÑ€","чц","пт","Ñб"], - namesShort: ["нд","пн","аў","ÑÑ€","чц","пт","Ñб"] - }, - months: { - names: ["Студзень","Люты","Сакавік","КраÑавік","Май","ЧÑрвень","Ліпень","Жнівень","ВераÑень","КаÑтрычнік","ЛіÑтапад","Снежань",""], - namesAbbr: ["Сту","Лют","Сак","Кра","Май","ЧÑÑ€","Ліп","Жні","Вер","КаÑ","ЛіÑ","Сне",""] - }, - monthsGenitive: { - names: ["ÑтудзенÑ","лютага","Ñакавіка","краÑавіка","маÑ","чÑрвенÑ","ліпенÑ","жніўнÑ","вераÑнÑ","каÑтрычніка","ліÑтапада","ÑнежнÑ",""], - namesAbbr: ["Сту","Лют","Сак","Кра","Май","ЧÑÑ€","Ліп","Жні","Вер","КаÑ","ЛіÑ","Сне",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sl-SI", "default", { - name: "sl-SI", - englishName: "Slovenian (Slovenia)", - nativeName: "slovenski (Slovenija)", - language: "sl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-neskonÄnost", - positiveInfinity: "neskonÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljek","torek","sreda","Äetrtek","petek","sobota"], - namesAbbr: ["ned","pon","tor","sre","Äet","pet","sob"], - namesShort: ["ne","po","to","sr","Äe","pe","so"] - }, - months: { - names: ["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "et-EE", "default", { - name: "et-EE", - englishName: "Estonian (Estonia)", - nativeName: "eesti (Eesti)", - language: "et", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "avaldamatu", - negativeInfinity: "miinuslõpmatus", - positiveInfinity: "plusslõpmatus", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"], - namesAbbr: ["P","E","T","K","N","R","L"], - namesShort: ["P","E","T","K","N","R","L"] - }, - months: { - names: ["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember",""], - namesAbbr: ["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets",""] - }, - AM: ["EL","el","EL"], - PM: ["PL","pl","PL"], - patterns: { - d: "d.MM.yyyy", - D: "d. MMMM yyyy'. a.'", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy'. a.' H:mm", - F: "d. MMMM yyyy'. a.' H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy'. a.'" - } - } - } -}); - -Globalize.addCultureInfo( "lv-LV", "default", { - name: "lv-LV", - englishName: "Latvian (Latvia)", - nativeName: "latvieÅ¡u (Latvija)", - language: "lv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-bezgalÄ«ba", - positiveInfinity: "bezgalÄ«ba", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": " ", - ".": ",", - symbol: "Ls" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["svÄ“tdiena","pirmdiena","otrdiena","treÅ¡diena","ceturtdiena","piektdiena","sestdiena"], - namesAbbr: ["sv","pr","ot","tr","ce","pk","se"], - namesShort: ["sv","pr","ot","tr","ce","pk","se"] - }, - months: { - names: ["janvÄris","februÄris","marts","aprÄ«lis","maijs","jÅ«nijs","jÅ«lijs","augusts","septembris","oktobris","novembris","decembris",""], - namesAbbr: ["jan","feb","mar","apr","mai","jÅ«n","jÅ«l","aug","sep","okt","nov","dec",""] - }, - monthsGenitive: { - names: ["janvÄrÄ«","februÄrÄ«","martÄ","aprÄ«lÄ«","maijÄ","jÅ«nijÄ","jÅ«lijÄ","augustÄ","septembrÄ«","oktobrÄ«","novembrÄ«","decembrÄ«",""], - namesAbbr: ["jan","feb","mar","apr","mai","jÅ«n","jÅ«l","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy.MM.dd.", - D: "dddd, yyyy'. gada 'd. MMMM", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, yyyy'. gada 'd. MMMM H:mm", - F: "dddd, yyyy'. gada 'd. MMMM H:mm:ss", - M: "d. MMMM", - Y: "yyyy. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "lt-LT", "default", { - name: "lt-LT", - englishName: "Lithuanian (Lithuania)", - nativeName: "lietuvių (Lietuva)", - language: "lt", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-begalybÄ—", - positiveInfinity: "begalybÄ—", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Lt" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sekmadienis","pirmadienis","antradienis","treÄiadienis","ketvirtadienis","penktadienis","Å¡eÅ¡tadienis"], - namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Å t"], - namesShort: ["S","P","A","T","K","Pn","Å "] - }, - months: { - names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjÅ«tis","rugsÄ—jis","spalis","lapkritis","gruodis",""], - namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] - }, - monthsGenitive: { - names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjÅ«Äio","rugsÄ—jo","spalio","lapkriÄio","gruodžio",""], - namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy.MM.dd", - D: "yyyy 'm.' MMMM d 'd.'", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'm.' MMMM d 'd.' HH:mm", - F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss", - M: "MMMM d 'd.'", - Y: "yyyy 'm.' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "tg-Cyrl-TJ", "default", { - name: "tg-Cyrl-TJ", - englishName: "Tajik (Cyrillic, Tajikistan)", - nativeName: "Тоҷикӣ (ТоҷикиÑтон)", - language: "tg-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ";", - symbol: "Ñ‚.Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - days: { - names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"], - namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"], - namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвари","феврали","марти","апрели","маи","июни","июли","авгуÑти","ÑентÑбри","октÑбри","ноÑбри","декабри",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fa-IR", "default", { - name: "fa-IR", - englishName: "Persian", - nativeName: "ÙØ§Ø±Ø³Ù‰ (ایران)", - language: "fa", - isRTL: true, - numberFormat: { - pattern: ["n-"], - currency: { - pattern: ["$n-","$ n"], - ".": "/", - symbol: "ريال" - } - }, - calendars: { - standard: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["ژانويه","Ùوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اÙكتبر","نوامبر","دسامبر",""], - namesAbbr: ["ژانويه","Ùوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اÙكتبر","نوامبر","دسامبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - patterns: { - d: "yyyy/MM/dd", - D: "yyyy/MM/dd", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "yyyy/MM/dd hh:mm tt", - F: "yyyy/MM/dd hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["Ù‚.ظ","Ù‚.ظ","Ù‚.ظ"], - PM: ["ب.ظ","ب.ظ","ب.ظ"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "vi-VN", "default", { - name: "vi-VN", - englishName: "Vietnamese (Vietnam)", - nativeName: "TiêÌng Việt (Việt Nam)", - language: "vi", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "â‚«" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Chủ Nhật","ThÆ°Ì Hai","ThÆ°Ì Ba","ThÆ°Ì Tư","ThÆ°Ì Năm","ThÆ°Ì SaÌu","ThÆ°Ì Bảy"], - namesAbbr: ["CN","Hai","Ba","Tư","Năm","SaÌu","Bảy"], - namesShort: ["C","H","B","T","N","S","B"] - }, - months: { - names: ["ThaÌng Giêng","ThaÌng Hai","ThaÌng Ba","ThaÌng Tư","ThaÌng Năm","ThaÌng SaÌu","ThaÌng Bảy","ThaÌng TaÌm","ThaÌng ChiÌn","ThaÌng Mười","ThaÌng Mười Một","ThaÌng Mười Hai",""], - namesAbbr: ["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12",""] - }, - AM: ["SA","sa","SA"], - PM: ["CH","ch","CH"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - f: "dd MMMM yyyy h:mm tt", - F: "dd MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hy-AM", "default", { - name: "hy-AM", - englishName: "Armenian (Armenia)", - nativeName: "Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ€Õ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)", - language: "hy", - numberFormat: { - currency: { - pattern: ["-n $","n $"], - symbol: "Õ¤Ö€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Ô¿Õ«Ö€Õ¡Õ¯Õ«","ÔµÖ€Õ¯Õ¸Ö‚Õ·Õ¡Õ¢Õ©Õ«","ÔµÖ€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«","Õ‰Õ¸Ö€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«","Õ€Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«","ÕˆÕ’Ö€Õ¢Õ¡Õ©","Õ‡Õ¡Õ¢Õ¡Õ©"], - namesAbbr: ["Ô¿Õ«Ö€","ÔµÖ€Õ¯","ÔµÖ€Ö„","Õ‰Ö€Ö„","Õ€Õ¶Õ£","ÕˆÕ’Ö€","Õ‡Õ¢Õ©"], - namesShort: ["Ô¿","Ôµ","Ôµ","Õ‰","Õ€","Õˆ","Õ‡"] - }, - months: { - names: ["Õ€Õ¸Ö‚Õ¶Õ¾Õ¡Ö€","Õ“Õ¥Õ¿Ö€Õ¾Õ¡Ö€","Õ„Õ¡Ö€Õ¿","Ô±ÕºÖ€Õ«Õ¬","Õ„Õ¡ÕµÕ«Õ½","Õ€Õ¸Ö‚Õ¶Õ«Õ½","Õ€Õ¸Ö‚Õ¬Õ«Õ½","Õ•Õ£Õ¸Õ½Õ¿Õ¸Õ½","ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö€","Õ€Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€","Õ†Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö€","Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€",""], - namesAbbr: ["Õ€Õ†ÕŽ","Õ“ÕÕŽ","Õ„ÕÕ","Ô±ÕŠÕ","Õ„Õ…Õ","Õ€Õ†Õ","Õ€Ô¼Õ","Õ•Ô³Õ","ÕÔµÕŠ","Õ€ÕˆÔ¿","Õ†ÕˆÕ…","Ô´ÔµÔ¿",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM, yyyy H:mm", - F: "d MMMM, yyyy H:mm:ss", - M: "d MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "az-Latn-AZ", "default", { - name: "az-Latn-AZ", - englishName: "Azeri (Latin, Azerbaijan)", - nativeName: "AzÉ™rbaycan\xadılı (AzÉ™rbaycan)", - language: "az-Latn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "man." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Bazar","Bazar ertÉ™si","ÇərÅŸÉ™nbə axÅŸamı","ÇərÅŸÉ™nbÉ™","Cümə axÅŸamı","CümÉ™","ŞənbÉ™"], - namesAbbr: ["B","Be","Ça","Ç","Ca","C","Åž"], - namesShort: ["B","Be","Ça","Ç","Ca","C","Åž"] - }, - months: { - names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - monthsGenitive: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "eu-ES", "default", { - name: "eu-ES", - englishName: "Basque (Basque)", - nativeName: "euskara (euskara)", - language: "eu", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "EdZ", - negativeInfinity: "-Infinitu", - positiveInfinity: "Infinitu", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"], - namesAbbr: ["ig.","al.","as.","az.","og.","or.","lr."], - namesShort: ["ig","al","as","az","og","or","lr"] - }, - months: { - names: ["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""], - namesAbbr: ["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "yyyy/MM/dd", - D: "dddd, yyyy.'eko' MMMM'k 'd", - t: "HH:mm", - T: "H:mm:ss", - f: "dddd, yyyy.'eko' MMMM'k 'd HH:mm", - F: "dddd, yyyy.'eko' MMMM'k 'd H:mm:ss", - Y: "yyyy.'eko' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "hsb-DE", "default", { - name: "hsb-DE", - englishName: "Upper Sorbian (Germany)", - nativeName: "hornjoserbšćina (NÄ›mska)", - language: "hsb", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "njedefinowane", - negativeInfinity: "-njekónÄne", - positiveInfinity: "+njekónÄne", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["njedźela","póndźela","wutora","srjeda","Å¡twórtk","pjatk","sobota"], - namesAbbr: ["nje","pón","wut","srj","Å¡tw","pja","sob"], - namesShort: ["n","p","w","s","Å¡","p","s"] - }, - months: { - names: ["januar","februar","mÄ›rc","apryl","meja","junij","julij","awgust","september","oktober","nowember","december",""], - namesAbbr: ["jan","feb","mÄ›r","apr","mej","jun","jul","awg","sep","okt","now","dec",""] - }, - monthsGenitive: { - names: ["januara","februara","mÄ›rca","apryla","meje","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""], - namesAbbr: ["jan","feb","mÄ›r","apr","mej","jun","jul","awg","sep","okt","now","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"po Chr.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "dddd, 'dnja' d. MMMM yyyy", - t: "H.mm 'hodź.'", - T: "H:mm:ss", - f: "dddd, 'dnja' d. MMMM yyyy H.mm 'hodź.'", - F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "mk-MK", "default", { - name: "mk-MK", - englishName: "Macedonian (Former Yugoslav Republic of Macedonia)", - nativeName: "македонÑки јазик (Македонија)", - language: "mk", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "ден." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недела","понеделник","вторник","Ñреда","четврток","петок","Ñабота"], - namesAbbr: ["нед","пон","втр","Ñрд","чет","пет","Ñаб"], - namesShort: ["не","по","вт","ÑÑ€","че","пе","Ñа"] - }, - months: { - names: ["јануари","февруари","март","април","мај","јуни","јули","авгуÑÑ‚","Ñептември","октомври","ноември","декември",""], - namesAbbr: ["јан","фев","мар","апр","мај","јун","јул","авг","Ñеп","окт","ное","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "dddd, dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, dd MMMM yyyy HH:mm", - F: "dddd, dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "tn-ZA", "default", { - name: "tn-ZA", - englishName: "Setswana (South Africa)", - nativeName: "Setswana (Aforika Borwa)", - language: "tn", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"], - namesAbbr: ["Ltp.","Mos.","Lbd.","Lbr.","Lbn.","Lbt.","Lmt."], - namesShort: ["Lp","Ms","Lb","Lr","Ln","Lt","Lm"] - }, - months: { - names: ["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole",""], - namesAbbr: ["Fer.","Tlhak.","Mop.","Mor.","Motsh.","Seet.","Phukw.","Phatw.","Lwets.","Diph.","Ngwan.","Sed.",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "xh-ZA", "default", { - name: "xh-ZA", - englishName: "isiXhosa (South Africa)", - nativeName: "isiXhosa (uMzantsi Afrika)", - language: "xh", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"], - namesShort: ["Ca","Mv","Lb","Lt","Ln","Lh","Mg"] - }, - months: { - names: ["Mqungu","Mdumba","Kwindla","Tshazimpuzi","Canzibe","Silimela","Khala","Thupha","Msintsi","Dwarha","Nkanga","Mnga",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "zu-ZA", "default", { - name: "zu-ZA", - englishName: "isiZulu (South Africa)", - nativeName: "isiZulu (iNingizimu Afrika)", - language: "zu", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"], - namesAbbr: ["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."] - }, - months: { - names: ["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""], - namesAbbr: ["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "af-ZA", "default", { - name: "af-ZA", - englishName: "Afrikaans (South Africa)", - nativeName: "Afrikaans (Suid Afrika)", - language: "af", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"], - namesAbbr: ["Son","Maan","Dins","Woen","Dond","Vry","Sat"], - namesShort: ["So","Ma","Di","Wo","Do","Vr","Sa"] - }, - months: { - names: ["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember",""], - namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ka-GE", "default", { - name: "ka-GE", - englishName: "Georgian (Georgia)", - nativeName: "ქáƒáƒ თული (სáƒáƒ¥áƒáƒ თველáƒ)", - language: "ka", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Lari" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["კვირáƒ","áƒáƒ შáƒáƒ‘áƒáƒ—ი","სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი","áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი","ხუთშáƒáƒ‘áƒáƒ—ი","პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი","შáƒáƒ‘áƒáƒ—ი"], - namesAbbr: ["კვირáƒ","áƒáƒ შáƒáƒ‘áƒáƒ—ი","სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი","áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი","ხუთშáƒáƒ‘áƒáƒ—ი","პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი","შáƒáƒ‘áƒáƒ—ი"], - namesShort: ["კ","áƒ","ს","áƒ","ხ","პ","შ"] - }, - months: { - names: ["იáƒáƒœáƒ•áƒáƒ ი","თებერვáƒáƒšáƒ˜","მáƒáƒ ტი","áƒáƒžáƒ ილი","მáƒáƒ˜áƒ¡áƒ˜","ივნისი","ივლისი","áƒáƒ’ვისტáƒ","სექტემბერი","áƒáƒ¥áƒ¢áƒáƒ›áƒ‘ერი","ნáƒáƒ”მბერი","დეკემბერი",""], - namesAbbr: ["იáƒáƒœ","თებ","მáƒáƒ ","áƒáƒžáƒ ","მáƒáƒ˜áƒ¡","ივნ","ივლ","áƒáƒ’ვ","სექ","áƒáƒ¥áƒ¢","ნáƒáƒ”მ","დეკ",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "yyyy 'წლის' dd MM, dddd", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'წლის' dd MM, dddd H:mm", - F: "yyyy 'წლის' dd MM, dddd H:mm:ss", - M: "dd MM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fo-FO", "default", { - name: "fo-FO", - englishName: "Faroese (Faroe Islands)", - nativeName: "føroyskt (Føroyar)", - language: "fo", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","frÃggjadagur","leygardagur"], - namesAbbr: ["sun","mán","týs","mik","hós","frÃ","leyg"], - namesShort: ["su","má","tý","mi","hó","fr","ley"] - }, - months: { - names: ["januar","februar","mars","aprÃl","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hi-IN", "default", { - name: "hi-IN", - englishName: "Hindi (India)", - nativeName: "हिंदी (à¤à¤¾à¤°à¤¤)", - language: "hi", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["रविवार","सोमवार","मंगलवार","बà¥à¤§à¤µà¤¾à¤°","गà¥à¤°à¥à¤µà¤¾à¤°","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["रवि.","सोम.","मंगल.","बà¥à¤§.","गà¥à¤°à¥.","शà¥à¤•à¥à¤°.","शनि."], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""], - namesAbbr: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""] - }, - AM: ["पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨"], - PM: ["अपराहà¥à¤¨","अपराहà¥à¤¨","अपराहà¥à¤¨"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "mt-MT", "default", { - name: "mt-MT", - englishName: "Maltese (Malta)", - nativeName: "Malti (Malta)", - language: "mt", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ä imgħa","Is-Sibt"], - namesAbbr: ["Ħad","Tne","Tli","Erb","Ħam","Ä im","Sib"], - namesShort: ["I","I","I","L","I","I","I"] - }, - months: { - names: ["Jannar","Frar","Marzu","April","Mejju","Ä unju","Lulju","Awissu","Settembru","Ottubru","Novembru","DiÄ‹embru",""], - namesAbbr: ["Jan","Fra","Mar","Apr","Mej","Ä un","Lul","Awi","Set","Ott","Nov","DiÄ‹",""] - }, - patterns: { - d: "dd/MM/yyyy", - D: "dddd, d' ta\\' 'MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' ta\\' 'MMMM yyyy HH:mm", - F: "dddd, d' ta\\' 'MMMM yyyy HH:mm:ss", - M: "d' ta\\' 'MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "se-NO", "default", { - name: "se-NO", - englishName: "Sami, Northern (Norway)", - nativeName: "davvisámegiella (Norga)", - language: "se", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"], - namesAbbr: ["sotn","vuos","maÅ‹","gask","duor","bear","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["ođđajagemánnu","guovvamánnu","njukÄamánnu","cuoÅ‹ománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","ÄakÄamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - monthsGenitive: { - names: ["ođđajagimánu","guovvamánu","njukÄamánu","cuoÅ‹ománu","miessemánu","geassemánu","suoidnemánu","borgemánu","ÄakÄamánu","golggotmánu","skábmamánu","juovlamánu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ms-MY", "default", { - name: "ms-MY", - englishName: "Malay (Malaysia)", - nativeName: "Bahasa Melayu (Malaysia)", - language: "ms", - numberFormat: { - currency: { - decimals: 0, - symbol: "RM" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"], - namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"], - namesShort: ["A","I","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "kk-KZ", "default", { - name: "kk-KZ", - englishName: "Kazakh (Kazakhstan)", - nativeName: "Қазақ (ҚазақÑтан)", - language: "kk", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-$n","$n"], - ",": " ", - ".": "-", - symbol: "Т" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ЖекÑенбі","ДүйÑенбі","СейÑенбі","СәрÑенбі","БейÑенбі","Жұма","Сенбі"], - namesAbbr: ["Жк","ДÑ","СÑ","Ср","БÑ","Жм","Сн"], - namesShort: ["Жк","ДÑ","СÑ","Ср","БÑ","Жм","Сн"] - }, - months: { - names: ["қаңтар","ақпан","наурыз","Ñәуір","мамыр","мауÑым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқÑан",""], - namesAbbr: ["Қаң","Ðқп","Ðау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy 'ж.'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'ж.' H:mm", - F: "d MMMM yyyy 'ж.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ky-KG", "default", { - name: "ky-KG", - englishName: "Kyrgyz (Kyrgyzstan)", - nativeName: "Кыргыз (КыргызÑтан)", - language: "ky", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": "-", - symbol: "Ñом" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"], - namesAbbr: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"], - namesShort: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"] - }, - months: { - names: ["Январь","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d'-'MMMM yyyy'-ж.'", - t: "H:mm", - T: "H:mm:ss", - f: "d'-'MMMM yyyy'-ж.' H:mm", - F: "d'-'MMMM yyyy'-ж.' H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy'-ж.'" - } - } - } -}); - -Globalize.addCultureInfo( "sw-KE", "default", { - name: "sw-KE", - englishName: "Kiswahili (Kenya)", - nativeName: "Kiswahili (Kenya)", - language: "sw", - numberFormat: { - currency: { - symbol: "S" - } - }, - calendars: { - standard: { - days: { - names: ["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"], - namesAbbr: ["Jumap.","Jumat.","Juman.","Jumat.","Alh.","Iju.","Jumam."], - namesShort: ["P","T","N","T","A","I","M"] - }, - months: { - names: ["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Decemba",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Dec",""] - } - } - } -}); - -Globalize.addCultureInfo( "tk-TM", "default", { - name: "tk-TM", - englishName: "Turkmen (Turkmenistan)", - nativeName: "türkmençe (Türkmenistan)", - language: "tk", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-üznüksizlik", - positiveInfinity: "üznüksizlik", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "m." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["DuÅŸenbe","SiÅŸenbe","ÇarÅŸenbe","PenÅŸenbe","Anna","Åženbe","ÃekÅŸenbe"], - namesAbbr: ["Db","Sb","Çb","Pb","An","Åžb","Ãb"], - namesShort: ["D","S","Ç","P","A","Åž","Ã"] - }, - months: { - names: ["Ãanwar","Fewral","Mart","Aprel","Maý","lýun","lýul","Awgust","Sentýabr","Oktýabr","Noýabr","Dekabr",""], - namesAbbr: ["Ãan","Few","Mart","Apr","Maý","lýun","lýul","Awg","Sen","Okt","Not","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "yyyy 'ý.' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'ý.' MMMM d H:mm", - F: "yyyy 'ý.' MMMM d H:mm:ss", - Y: "yyyy 'ý.' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "uz-Latn-UZ", "default", { - name: "uz-Latn-UZ", - englishName: "Uzbek (Latin, Uzbekistan)", - nativeName: "U'zbek (U'zbekiston Respublikasi)", - language: "uz-Latn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": " ", - ".": ",", - symbol: "so'm" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"], - namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."], - namesShort: ["ya","d","s","ch","p","j","sh"] - }, - months: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM yyyy", - D: "yyyy 'yil' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'yil' d-MMMM HH:mm", - F: "yyyy 'yil' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "tt-RU", "default", { - name: "tt-RU", - englishName: "Tatar (Russia)", - nativeName: "Татар (РоÑÑиÑ)", - language: "tt", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"], - namesAbbr: ["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"], - namesShort: ["Я","Д","С","Ч","П","Ò–","Ш"] - }, - months: { - names: ["Гыйнвар","Февраль","Март","Ðпрель","Май","Июнь","Июль","ÐвгуÑÑ‚","СентÑбрь","ОктÑбрь","ÐоÑбрь","Декабрь",""], - namesAbbr: ["Гыйн.","Фев.","Мар.","Ðпр.","Май","Июнь","Июль","Ðвг.","Сен.","Окт.","ÐоÑб.","Дек.",""] - }, - monthsGenitive: { - names: ["Гыйнварның","Февральнең","Мартның","Ðпрельнең","Майның","Июньнең","Июльнең","ÐвгуÑтның","СентÑбрьның","ОктÑбрьның","ÐоÑбрьның","Декабрьның",""], - namesAbbr: ["Гыйн.-ның","Фев.-нең","Мар.-ның","Ðпр.-нең","Майның","Июньнең","Июльнең","Ðвг.-ның","Сен.-ның","Окт.-ның","ÐоÑб.-ның","Дек.-ның",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "bn-IN", "default", { - name: "bn-IN", - englishName: "Bengali (India)", - nativeName: "বাংলা (à¦à¦¾à¦°à¦¤)", - language: "bn", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "টা" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["রবিবার","সোমবার","মঙà§à¦—লবার","বà§à¦§à¦¬à¦¾à¦°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°","শà§à¦•à§à¦°à¦¬à¦¾à¦°","শনিবার"], - namesAbbr: ["রবি.","সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহসà§à¦ªà¦¤à¦¿.","শà§à¦•à§à¦°.","শনি."], - namesShort: ["র","স","ম","ব","ব","শ","শ"] - }, - months: { - names: ["জানà§à¦¯à¦¼à¦¾à¦°à§€","ফেবà§à¦°à§à¦¯à¦¼à¦¾à¦°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগসà§à¦Ÿ","সেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নà¦à§‡à¦®à§à¦¬à¦°","ডিসেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§.","ফেবà§à¦°à§.","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগ.","সেপà§à¦Ÿà§‡.","অকà§à¦Ÿà§‹.","নà¦à§‡.","ডিসে.",""] - }, - AM: ["পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨"], - PM: ["অপরাহà§à¦¨","অপরাহà§à¦¨","অপরাহà§à¦¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "pa-IN", "default", { - name: "pa-IN", - englishName: "Punjabi (India)", - nativeName: "ਪੰਜਾਬੀ (à¨à¨¾à¨°à¨¤)", - language: "pa", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ਰà©" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["à¨à¨¤à¨µà¨¾à¨°","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬà©à©±à¨§à¨µà¨¾à¨°","ਵੀਰਵਾਰ","ਸ਼à©à©±à¨•ਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"], - namesAbbr: ["à¨à¨¤.","ਸੋਮ.","ਮੰਗਲ.","ਬà©à©±à¨§.","ਵੀਰ.","ਸ਼à©à¨•ਰ.","ਸ਼ਨਿੱਚਰ."], - namesShort: ["à¨","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"] - }, - months: { - names: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪà©à¨°à©ˆà¨²","ਮਈ","ਜੂਨ","ਜà©à¨²à¨¾à¨ˆ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""], - namesAbbr: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪà©à¨°à©ˆà¨²","ਮਈ","ਜੂਨ","ਜà©à¨²à¨¾à¨ˆ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""] - }, - AM: ["ਸਵੇਰ","ਸਵੇਰ","ਸਵੇਰ"], - PM: ["ਸ਼ਾਮ","ਸ਼ਾਮ","ਸ਼ਾਮ"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy dddd", - t: "tt hh:mm", - T: "tt hh:mm:ss", - f: "dd MMMM yyyy dddd tt hh:mm", - F: "dd MMMM yyyy dddd tt hh:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "gu-IN", "default", { - name: "gu-IN", - englishName: "Gujarati (India)", - nativeName: "ગà«àªœàª°àª¾àª¤à«€ (àªàª¾àª°àª¤)", - language: "gu", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "રૂ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["રવિવાર","સોમવાર","મંગળવાર","બà«àª§àªµàª¾àª°","ગà«àª°à«àªµàª¾àª°","શà«àª•à«àª°àªµàª¾àª°","શનિવાર"], - namesAbbr: ["રવિ","સોમ","મંગળ","બà«àª§","ગà«àª°à«","શà«àª•à«àª°","શનિ"], - namesShort: ["ર","સ","મ","બ","ગ","શ","શ"] - }, - months: { - names: ["જાનà«àª¯à«àª†àª°à«€","ફેબà«àª°à«àª†àª°à«€","મારà«àªš","àªàªªà«àª°àª¿àª²","મે","જૂન","જà«àª²àª¾àªˆ","ઑગસà«àªŸ","સપà«àªŸà«‡àª®à«àª¬àª°","ઑકà«àªŸà«àª¬àª°","નવેમà«àª¬àª°","ડિસેમà«àª¬àª°",""], - namesAbbr: ["જાનà«àª¯à«","ફેબà«àª°à«","મારà«àªš","àªàªªà«àª°àª¿àª²","મે","જૂન","જà«àª²àª¾àªˆ","ઑગસà«àªŸ","સપà«àªŸà«‡","ઑકà«àªŸà«‹","નવે","ડિસે",""] - }, - AM: ["પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨","પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨","પૂરà«àªµÂ મધà«àª¯àª¾àª¹à«àª¨"], - PM: ["ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨","ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨","ઉતà«àª¤àª°Â મધà«àª¯àª¾àª¹à«àª¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "or-IN", "default", { - name: "or-IN", - englishName: "Oriya (India)", - nativeName: "ଓàœà¬¿à¬† (à¬à¬¾à¬°à¬¤)", - language: "or", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ଟ" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ରବିବାର","ସà‡à¬¾à¬®à¬¬à¬¾à¬°","ମଙàଗଳବାର","ବàଧବାର","ଗàରàବାର","ଶàକàରବାର","ଶନିବାର"], - namesAbbr: ["ରବି.","ସà‡à¬¾à¬®.","ମଙàଗଳ.","ବàଧ.","ଗàରà.","ଶàକàର.","ଶନି."], - namesShort: ["ର","ସà‡à¬¾","ମ","ବà","ଗà","ଶà","ଶ"] - }, - months: { - names: ["ଜାନààŸà¬¾à¬°à€","ଫàରà‡à¬¬àƒàŸà¬¾à¬°à€","ମାରàଚàଚ","à¬à¬ªàରିଲà\u200c","ମà‡","ଜàନà\u200c","ଜàଲାଇ","ଅଗଷàଟ","ସà‡à¬ªàଟà‡à¬®àବର","ଅକàଟà‹à¬¬à¬°","ନà¬à‡à¬®àବର","(ଡିସà‡à¬®àବର",""], - namesAbbr: ["ଜାନààŸà¬¾à¬°à€","ଫàରà‡à¬¬àƒàŸà¬¾à¬°à€","ମାରàଚàଚ","à¬à¬ªàରିଲà\u200c","ମà‡","ଜàନà\u200c","ଜàଲାଇ","ଅଗଷàଟ","ସà‡à¬ªàଟà‡à¬®àବର","ଅକàଟà‹à¬¬à¬°","ନà¬à‡à¬®àବର","(ଡିସà‡à¬®àବର",""] - }, - eras: [{"name":"ଖàରà€à¬·àଟାବàଦ","start":null,"offset":0}], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "ta-IN", "default", { - name: "ta-IN", - englishName: "Tamil (India)", - nativeName: "தமிழ௠(இநà¯à®¤à®¿à®¯à®¾)", - language: "ta", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ரூ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ஞாயிறà¯à®±à¯à®•à¯à®•ிழமை","திஙà¯à®•ளà¯à®•ிழமை","செவà¯à®µà®¾à®¯à¯à®•ிழமை","பà¯à®¤à®©à¯à®•ிழமை","வியாழகà¯à®•ிழமை","வெளà¯à®³à®¿à®•à¯à®•ிழமை","சனிகà¯à®•ிழமை"], - namesAbbr: ["ஞாயிறà¯","திஙà¯à®•ளà¯","செவà¯à®µà®¾à®¯à¯","பà¯à®¤à®©à¯","வியாழனà¯","வெளà¯à®³à®¿","சனி"], - namesShort: ["ஞா","தி","செ","பà¯","வி","வெ","ச"] - }, - months: { - names: ["ஜனவரி","பிபà¯à®°à®µà®°à®¿","மாரà¯à®šà¯","à®à®ªà¯à®°à®²à¯","மே","ஜூனà¯","ஜூலை","ஆகஸà¯à®Ÿà¯","செபà¯à®Ÿà®®à¯à®ªà®°à¯","அகà¯à®Ÿà¯‹à®ªà®°à¯","நவமà¯à®ªà®°à¯","டிசமà¯à®ªà®°à¯",""], - namesAbbr: ["ஜனவரி","பிபà¯à®°à®µà®°à®¿","மாரà¯à®šà¯","à®à®ªà¯à®°à®²à¯","மே","ஜூனà¯","ஜூலை","ஆகஸà¯à®Ÿà¯","செபà¯à®Ÿà®®à¯à®ªà®°à¯","அகà¯à®Ÿà¯‹à®ªà®°à¯","நவமà¯à®ªà®°à¯","டிசமà¯à®ªà®°à¯",""] - }, - AM: ["காலை","காலை","காலை"], - PM: ["மாலை","மாலை","மாலை"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "te-IN", "default", { - name: "te-IN", - englishName: "Telugu (India)", - nativeName: "తెలà±à°—à± (à°à°¾à°°à°¤Â దేశం)", - language: "te", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "రూ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ఆదివారం","సోమవారం","మంగళవారం","à°¬à±à°§à°µà°¾à°°à°‚","à°—à±à°°à±à°µà°¾à°°à°‚","à°¶à±à°•à±à°°à°µà°¾à°°à°‚","శనివారం"], - namesAbbr: ["ఆది.","సోమ.","మంగళ.","à°¬à±à°§.","à°—à±à°°à±.","à°¶à±à°•à±à°°.","శని."], - namesShort: ["à°†","సో","మం","à°¬à±","à°—à±","à°¶à±","à°¶"] - }, - months: { - names: ["జనవరి","à°«à°¿à°¬à±à°°à°µà°°à°¿","మారà±à°šà°¿","à°à°ªà±à°°à°¿à°²à±","మే","జూనà±","జూలై","ఆగసà±à°Ÿà±","సెపà±à°Ÿà±†à°‚బరà±","à°…à°•à±à°Ÿà±‹à°¬à°°à±","నవంబరà±","డిసెంబరà±",""], - namesAbbr: ["జనవరి","à°«à°¿à°¬à±à°°à°µà°°à°¿","మారà±à°šà°¿","à°à°ªà±à°°à°¿à°²à±","మే","జూనà±","జూలై","ఆగసà±à°Ÿà±","సెపà±à°Ÿà±†à°‚బరà±","à°…à°•à±à°Ÿà±‹à°¬à°°à±","నవంబరà±","డిసెంబరà±",""] - }, - AM: ["పూరà±à°µà°¾à°¹à±à°¨","పూరà±à°µà°¾à°¹à±à°¨","పూరà±à°µà°¾à°¹à±à°¨"], - PM: ["అపరాహà±à°¨","అపరాహà±à°¨","అపరాహà±à°¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "kn-IN", "default", { - name: "kn-IN", - englishName: "Kannada (India)", - nativeName: "ಕನà³à²¨à²¡ (à²à²¾à²°à²¤)", - language: "kn", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "ರೂ" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["à²à²¾à²¨à³à²µà²¾à²°","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬà³à²§à²µà²¾à²°","ಗà³à²°à³à²µà²¾à²°","ಶà³à²•à³à²°à²µà²¾à²°","ಶನಿವಾರ"], - namesAbbr: ["à²à²¾à²¨à³.","ಸೋಮ.","ಮಂಗಳ.","ಬà³à²§.","ಗà³à²°à³.","ಶà³à²•à³à²°.","ಶನಿ."], - namesShort: ["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"] - }, - months: { - names: ["ಜನವರಿ","ಫೆಬà³à²°à²µà²°à²¿","ಮಾರà³à²šà³","ಎಪà³à²°à²¿à²²à³","ಮೇ","ಜೂನà³","ಜà³à²²à³ˆ","ಆಗಸà³à²Ÿà³","ಸೆಪà³à²Ÿà²‚ಬರà³","ಅಕà³à²Ÿà³‹à²¬à²°à³","ನವೆಂಬರà³","ಡಿಸೆಂಬರà³",""], - namesAbbr: ["ಜನವರಿ","ಫೆಬà³à²°à²µà²°à²¿","ಮಾರà³à²šà³","ಎಪà³à²°à²¿à²²à³","ಮೇ","ಜೂನà³","ಜà³à²²à³ˆ","ಆಗಸà³à²Ÿà³","ಸೆಪà³à²Ÿà²‚ಬರà³","ಅಕà³à²Ÿà³‹à²¬à²°à³","ನವೆಂಬರà³","ಡಿಸೆಂಬರà³",""] - }, - AM: ["ಪೂರà³à²µà²¾à²¹à³à²¨","ಪೂರà³à²µà²¾à²¹à³à²¨","ಪೂರà³à²µà²¾à²¹à³à²¨"], - PM: ["ಅಪರಾಹà³à²¨","ಅಪರಾಹà³à²¨","ಅಪರಾಹà³à²¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "ml-IN", "default", { - name: "ml-IN", - englishName: "Malayalam (India)", - nativeName: "മലയാളം (à´à´¾à´°à´¤à´‚)", - language: "ml", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "à´•" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["ഞായറാഴàµà´š","തിങàµà´•ളാഴàµà´š","ചൊവàµà´µà´¾à´´àµà´š","à´¬àµà´§à´¨à´¾à´´àµà´š","à´µàµà´¯à´¾à´´à´¾à´´àµà´š","വെളàµà´³à´¿à´¯à´¾à´´àµà´š","ശനിയാഴàµà´š"], - namesAbbr: ["ഞായർ.","തിങàµà´•ൾ.","ചൊവàµà´µ.","à´¬àµà´§àµ».","à´µàµà´¯à´¾à´´à´‚.","വെളàµà´³à´¿.","ശനി."], - namesShort: ["à´ž","à´¤","à´š","à´¬","à´µ","വെ","à´¶"] - }, - months: { - names: ["ജനàµà´µà´°à´¿","ഫെബàµà´±àµà´µà´°à´¿","മാറàµà´šàµà´šàµ","à´à´ªàµà´±à´¿à´²àµ","മെയàµ","ജൂണàµ","ജൂലൈ","à´“à´—à´¸àµà´±à´±àµ","സെപàµà´±à´±à´‚ബറàµ","à´’à´•àµà´Ÿàµ‹à´¬à´±àµ","നവംബറàµ","ഡിസംബറàµ",""], - namesAbbr: ["ജനàµà´µà´°à´¿","ഫെബàµà´±àµà´µà´°à´¿","മാറàµà´šàµà´šàµ","à´à´ªàµà´±à´¿à´²àµ","മെയàµ","ജൂണàµ","ജൂലൈ","à´“à´—à´¸àµà´±à´±àµ","സെപàµà´±à´±à´‚ബറàµ","à´’à´•àµà´Ÿàµ‹à´¬à´±àµ","നവംബറàµ","ഡിസംബറàµ",""] - }, - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "as-IN", "default", { - name: "as-IN", - englishName: "Assamese (India)", - nativeName: "অসমীয়া (à¦à¦¾à§°à¦¤)", - language: "as", - numberFormat: { - groupSizes: [3,2], - "NaN": "nan", - negativeInfinity: "-infinity", - positiveInfinity: "infinity", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","n$"], - groupSizes: [3,2], - symbol: "ট" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["সোমবাৰ","মঙà§à¦—লবাৰ","বà§à¦§à¦¬à¦¾à§°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à§°","শà§à¦•à§à¦°à¦¬à¦¾à§°","শনিবাৰ","ৰবিবাৰ"], - namesAbbr: ["সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহ.","শà§à¦•à§à¦°.","শনি.","ৰবি."], - namesShort: ["সো","ম","বà§","বৃ","শà§","শ","র"] - }, - months: { - names: ["জানà§à§±à¦¾à§°à§€","ফেবà§à¦°à§à§±à¦¾à§°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগষà§à¦Ÿ","চেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নবেমà§à¦¬à¦°","ডিচেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§","ফেবà§à¦°à§","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগষà§à¦Ÿ","চেপà§à¦Ÿà§‡","অকà§à¦Ÿà§‹","নবে","ডিচে",""] - }, - AM: ["ৰাতিপà§","ৰাতিপà§","ৰাতিপà§"], - PM: ["আবেলি","আবেলি","আবেলি"], - eras: [{"name":"খà§à¦°à§€à¦·à§à¦Ÿà¦¾à¦¬à§à¦¦","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "yyyy,MMMM dd, dddd", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy,MMMM dd, dddd tt h:mm", - F: "yyyy,MMMM dd, dddd tt h:mm:ss", - M: "dd MMMM", - Y: "MMMM,yy" - } - } - } -}); - -Globalize.addCultureInfo( "mr-IN", "default", { - name: "mr-IN", - englishName: "Marathi (India)", - nativeName: "मराठी (à¤à¤¾à¤°à¤¤)", - language: "mr", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["रविवार","सोमवार","मंगळवार","बà¥à¤§à¤µà¤¾à¤°","गà¥à¤°à¥à¤µà¤¾à¤°","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["रवि.","सोम.","मंगळ.","बà¥à¤§.","गà¥à¤°à¥.","शà¥à¤•à¥à¤°.","शनि."], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवà¥à¤¹à¥‡à¤‚बर","डिसेंबर",""], - namesAbbr: ["जाने.","फेबà¥à¤°à¥.","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚.","ऑकà¥à¤Ÿà¥‹.","नोवà¥à¤¹à¥‡à¤‚.","डिसें.",""] - }, - AM: ["म.पू.","म.पू.","म.पू."], - PM: ["म.नं.","म.नं.","म.नं."], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "sa-IN", "default", { - name: "sa-IN", - englishName: "Sanskrit (India)", - nativeName: "संसà¥à¤•ृत (à¤à¤¾à¤°à¤¤à¤®à¥)", - language: "sa", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["रविवासरः","सोमवासरः","मङà¥à¤—लवासरः","बà¥à¤§à¤µà¤¾à¤¸à¤°à¤ƒ","गà¥à¤°à¥à¤µà¤¾à¤¸à¤°à¤ƒ","शà¥à¤•à¥à¤°à¤µà¤¾à¤¸à¤°à¤ƒ","शनिवासरः"], - namesAbbr: ["रविवासरः","सोमवासरः","मङà¥à¤—लवासरः","बà¥à¤§à¤µà¤¾à¤¸à¤°à¤ƒ","गà¥à¤°à¥à¤µà¤¾à¤¸à¤°à¤ƒ","शà¥à¤•à¥à¤°à¤µà¤¾à¤¸à¤°à¤ƒ","शनिवासरः"], - namesShort: ["र","स","म","ब","ग","श","श"] - }, - months: { - names: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""], - namesAbbr: ["जनवरी","फरवरी","मारà¥à¤š","अपà¥à¤°à¥ˆà¤²","मई","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सितमà¥à¤¬à¤°","अकà¥à¤¤à¥‚बर","नवमà¥à¤¬à¤°","दिसमà¥à¤¬à¤°",""] - }, - AM: ["पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨","पूरà¥à¤µà¤¾à¤¹à¥à¤¨"], - PM: ["अपराहà¥à¤¨","अपराहà¥à¤¨","अपराहà¥à¤¨"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy dddd", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy dddd HH:mm", - F: "dd MMMM yyyy dddd HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "mn-MN", "default", { - name: "mn-MN", - englishName: "Mongolian (Cyrillic, Mongolia)", - nativeName: "Монгол хÑл (Монгол улÑ)", - language: "mn-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚®" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ÐÑм","Даваа","МÑгмар","Лхагва","ПүрÑв","БааÑан","БÑмба"], - namesAbbr: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"], - namesShort: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"] - }, - months: { - names: ["1 дүгÑÑр Ñар","2 дугаар Ñар","3 дугаар Ñар","4 дүгÑÑр Ñар","5 дугаар Ñар","6 дугаар Ñар","7 дугаар Ñар","8 дугаар Ñар","9 дүгÑÑр Ñар","10 дугаар Ñар","11 дүгÑÑр Ñар","12 дугаар Ñар",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - monthsGenitive: { - names: ["1 дүгÑÑр Ñарын","2 дугаар Ñарын","3 дугаар Ñарын","4 дүгÑÑр Ñарын","5 дугаар Ñарын","6 дугаар Ñарын","7 дугаар Ñарын","8 дугаар Ñарын","9 дүгÑÑр Ñарын","10 дугаар Ñарын","11 дүгÑÑр Ñарын","12 дугаар Ñарын",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - AM: null, - PM: null, - patterns: { - d: "yy.MM.dd", - D: "yyyy 'оны' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'оны' MMMM d H:mm", - F: "yyyy 'оны' MMMM d H:mm:ss", - M: "d MMMM", - Y: "yyyy 'он' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "bo-CN", "default", { - name: "bo-CN", - englishName: "Tibetan (PRC)", - nativeName: "བོད་ཡིག (ཀྲུང་ཧà¾à¼‹à½˜à½²à¼‹à½‘མངས་སྤྱི་མà½à½´à½“་རྒྱལ་à½à½–à¼)", - language: "bo", - numberFormat: { - groupSizes: [3,0], - "NaN": "ཨང་ཀི་མིན་པà¼", - negativeInfinity: "མོ་གྲངས་ཚད་མེད་ཆུང་བà¼", - positiveInfinity: "ཕོ་གྲངས་ཚད་མེད་ཆེ་བà¼", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - groupSizes: [3,0], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["གཟའ་ཉི་མà¼","གཟའ་ཟླ་བà¼","གཟའ་མིག་དམརà¼","གཟའ་ལྷག་པà¼","གཟའ་ཕུར་བུà¼","གཟའ་པ་སངསà¼","གཟའ་སྤེན་པà¼"], - namesAbbr: ["ཉི་མà¼","ཟླ་བà¼","མིག་དམརà¼","ལྷག་པà¼","ཕུར་བུà¼","པ་སངསà¼","སྤེན་པà¼"], - namesShort: ["༧","༡","༢","༣","༤","༥","༦"] - }, - months: { - names: ["སྤྱི་ཟླ་དང་པོà¼","སྤྱི་ཟླ་གཉིས་པà¼","སྤྱི་ཟླ་གསུམ་པà¼","སྤྱི་ཟླ་བཞི་པà¼","སྤྱི་ཟླ་ལྔ་པà¼","སྤྱི་ཟླ་དྲུག་པà¼","སྤྱི་ཟླ་བདུན་པà¼","སྤྱི་ཟླ་བརྒྱད་པà¼","སྤྱི་ཟླ་དགུ་པà¼","སྤྱི་ཟླ་བཅུ་པོà¼","སྤྱི་ཟླ་བཅུ་གཅིག་པà¼","སྤྱི་ཟླ་བཅུ་གཉིས་པà¼",""], - namesAbbr: ["ཟླ་ ༡","ཟླ་ ༢","ཟླ་ ༣","ཟླ་ ༤","ཟླ་ ༥","ཟླ་ ༦","ཟླ་ ༧","ཟླ་ ༨","ཟླ་ ༩","ཟླ་ ༡༠","ཟླ་ ༡༡","ཟླ་ ༡༢",""] - }, - AM: ["སྔ་དྲོ","སྔ་དྲོ","སྔ་དྲོ"], - PM: ["ཕྱི་དྲོ","ཕྱི་དྲོ","ཕྱི་དྲོ"], - eras: [{"name":"སྤྱི་ལོ","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'ལོའི་ཟླ' M'ཚེས' d", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm", - F: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm:ss", - M: "'ཟླ་' M'ཚེས'd", - Y: "yyyy.M" - } - } - } -}); - -Globalize.addCultureInfo( "cy-GB", "default", { - name: "cy-GB", - englishName: "Welsh (United Kingdom)", - nativeName: "Cymraeg (y Deyrnas Unedig)", - language: "cy", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"], - namesAbbr: ["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"], - namesShort: ["Su","Ll","Ma","Me","Ia","Gw","Sa"] - }, - months: { - names: ["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr",""], - namesAbbr: ["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "km-KH", "default", { - name: "km-KH", - englishName: "Khmer (Cambodia)", - nativeName: "ážáŸ’មែរ (កម្ពុជា)", - language: "km", - numberFormat: { - pattern: ["- n"], - groupSizes: [3,0], - "NaN": "NAN", - negativeInfinity: "-- អនន្áž", - positiveInfinity: "អនន្áž", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["-n$","n$"], - symbol: "៛" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["ážáŸ’ងៃអាទិážáŸ’áž™","ážáŸ’ងៃចáŸáž“្ទ","ážáŸ’ងៃអង្គារ","ážáŸ’ងៃពុធ","ážáŸ’ងៃព្រហស្បážáž·áŸ","ážáŸ’ងៃសុក្រ","ážáŸ’ងៃសៅរáŸ"], - namesAbbr: ["អាទិ.","áž….","អ.","áž–áž»","ព្រហ.","សុ.","ស."], - namesShort: ["អា","áž…","អ","áž–áž»","ព្","សុ","ស"] - }, - months: { - names: ["មករា","កុម្ភៈ","មិនា","មáŸážŸáž¶","ឧសភា","មិážáž»áž“áž¶","កក្កដា","សីហា","កញ្ញា","ážáž»áž›áž¶","វិច្ឆិកា","ធ្នូ",""], - namesAbbr: ["១","២","៣","៤","៥","៦","៧","៨","៩","១០","១១","១២",""] - }, - AM: ["ព្រឹក","ព្រឹក","ព្រឹក"], - PM: ["ល្ងាច","ល្ងាច","ល្ងាច"], - eras: [{"name":"មុនគ.ស.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "d MMMM yyyy H:mm tt", - F: "d MMMM yyyy HH:mm:ss", - M: "'ážáŸ’ងៃទី' dd 'ážáŸ‚' MM", - Y: "'ážáŸ‚' MM 'ឆ្នាំ' yyyy" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ព្រឹក","ព្រឹក","ព្រឹក"], - PM: ["ល្ងាច","ល្ងាច","ល្ងាច"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm tt", - F: "dddd, MMMM dd, yyyy HH:mm:ss" - } - } - } -}); - -Globalize.addCultureInfo( "lo-LA", "default", { - name: "lo-LA", - englishName: "Lao (Lao P.D.R.)", - nativeName: "ລາວ (ສ.ປ.ປ. ລາວ)", - language: "lo", - numberFormat: { - pattern: ["(n)"], - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - }, - currency: { - pattern: ["(n$)","n$"], - groupSizes: [3,0], - symbol: "â‚" - } - }, - calendars: { - standard: { - days: { - names: ["ວັນàºàº²àº—ິດ","ວັນຈັນ","ວັນàºàº±àº‡àº„ານ","ວັນພຸດ","ວັນພະຫັດ","ວັນສຸàº","ວັນເສົາ"], - namesAbbr: ["àºàº²àº—ິດ","ຈັນ","àºàº±àº‡àº„ານ","ພຸດ","ພະຫັດ","ສຸàº","ເສົາ"], - namesShort: ["àº","ຈ","àº","ພ","ພ","ສ","ເ"] - }, - months: { - names: ["ມັງàºàºàº™","àºàº¸àº¡àºžàº²","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","àºà»àº¥àº°àºàº»àº”","ສິງຫາ","àºàº±àº™àºàº²","ຕຸລາ","ພະຈິàº","ທັນວາ",""], - namesAbbr: ["ມັງàºàºàº™","àºàº¸àº¡àºžàº²","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","àºà»àº¥àº°àºàº»àº”","ສິງຫາ","àºàº±àº™àºàº²","ຕຸລາ","ພະຈິàº","ທັນວາ",""] - }, - AM: ["ເຊົ້າ","ເຊົ້າ","ເຊົ້າ"], - PM: ["à»àº¥àº‡","à»àº¥àº‡","à»àº¥àº‡"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm tt", - T: "HH:mm:ss", - f: "dd MMMM yyyy H:mm tt", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "gl-ES", "default", { - name: "gl-ES", - englishName: "Galician (Galician)", - nativeName: "galego (galego)", - language: "gl", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","luns","martes","mércores","xoves","venres","sábado"], - namesAbbr: ["dom","luns","mar","mér","xov","ven","sáb"], - namesShort: ["do","lu","ma","mé","xo","ve","sá"] - }, - months: { - names: ["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""], - namesAbbr: ["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "kok-IN", "default", { - name: "kok-IN", - englishName: "Konkani (India)", - nativeName: "कोंकणी (à¤à¤¾à¤°à¤¤)", - language: "kok", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "रà¥" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["आयतार","सोमार","मंगळार","बà¥à¤§à¤µà¤¾à¤°","बिरेसà¥à¤¤à¤¾à¤°","सà¥à¤•à¥à¤°à¤¾à¤°","शेनवार"], - namesAbbr: ["आय.","सोम.","मंगळ.","बà¥à¤§.","बिरे.","सà¥à¤•à¥à¤°.","शेन."], - namesShort: ["आ","स","म","ब","ब","स","श"] - }, - months: { - names: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवेमà¥à¤¬à¤°","डिसेंबर",""], - namesAbbr: ["जानेवारी","फेबà¥à¤°à¥à¤µà¤¾à¤°à¥€","मारà¥à¤š","à¤à¤ªà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¥ˆ","ऑगसà¥à¤Ÿ","सपà¥à¤Ÿà¥‡à¤‚बर","ऑकà¥à¤Ÿà¥‹à¤¬à¤°","नोवेमà¥à¤¬à¤°","डिसेंबर",""] - }, - AM: ["म.पू.","म.पू.","म.पू."], - PM: ["म.नं.","म.नं.","म.नं."], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "syr-SY", "default", { - name: "syr-SY", - englishName: "Syriac (Syria)", - nativeName: "ܣܘܪÜÜÜ (سوريا)", - language: "syr", - isRTL: true, - numberFormat: { - currency: { - pattern: ["$n-","$ n"], - symbol: "Ù„.س.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["ܚܕ ܒܫܒÜ","ܬܪÜܢ ܒܫܒÜ","Ü¬Ü Ü¬Ü ܒܫܒÜ","ÜܪܒܥÜ ܒܫܒÜ","ܚܡܫÜ ܒܫܒÜ","ܥܪܘܒܬÜ","ܫܒܬÜ"], - namesAbbr: ["\u070fÜ \u070fÜ’Ü«","\u070fÜ’Â \u070fÜ’Ü«","\u070fܓ \u070fÜ’Ü«","\u070fܕ \u070fÜ’Ü«","\u070fÜ—Â \u070fÜ’Ü«","\u070fܥܪܘܒ","\u070fܫܒ"], - namesShort: ["Ü","Ü’","Ü“","Ü•","Ü—","Ü¥","Ü«"] - }, - months: { - names: ["ܟܢܘܢ ÜܚܪÜ","ܫܒܛ","Üܕܪ","Ü¢Üܣܢ","ÜÜܪ","ܚܙÜܪܢ","ܬܡܘܙ","ÜÜ’","ÜÜÜ Ü˜Ü ","ܬܫܪÜ ܩܕÜÜ¡","ܬܫܪÜ ÜܚܪÜ","ܟܢܘܢ ܩܕÜÜ¡",""], - namesAbbr: ["\u070fܟܢ \u070fÜ’","ܫܒܛ","Üܕܪ","Ü¢Üܣܢ","ÜÜܪ","ܚܙÜܪܢ","ܬܡܘܙ","ÜÜ’","ÜÜÜ Ü˜Ü ","\u070fܬܫ \u070fÜ","\u070fܬܫ \u070fÜ’","\u070fܟܢ \u070fÜ",""] - }, - AM: ["Ü©.Ü›","Ü©.Ü›","Ü©.Ü›"], - PM: ["Ü’.Ü›","Ü’.Ü›","Ü’.Ü›"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "si-LK", "default", { - name: "si-LK", - englishName: "Sinhala (Sri Lanka)", - nativeName: "සිංහල (à·à·Š\u200dරී ලංකà·)", - language: "si", - numberFormat: { - groupSizes: [3,2], - negativeInfinity: "-අනන්à¶à¶º", - positiveInfinity: "අනන්à¶à¶º", - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["($ n)","$ n"], - symbol: "රු." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ඉරිදà·","සඳුදà·","අඟහරුවà·à¶¯à·","බදà·à¶¯à·","à¶¶à·Š\u200dරහස්පà¶à·’න්දà·","සිකුරà·à¶¯à·","සෙනසුරà·à¶¯à·"], - namesAbbr: ["ඉරිදà·","සඳුදà·","කුජදà·","බුදදà·","ගුරුදà·","කිවිදà·","à·à¶±à·’දà·"], - namesShort: ["ඉ","à·ƒ","à¶…","à¶¶","à¶¶à·Š\u200dà¶»","සි","සෙ"] - }, - months: { - names: ["ජනවà·à¶»à·’","පෙබරවà·à¶»à·’","මà·à¶»à·Šà¶à·”","à¶…\u200cà¶´à·Š\u200dරේල්","මà·à¶ºà·’","ජූනි","ජූලි","à¶…\u200cà¶œà·à·ƒà·Šà¶à·”","à·ƒà·à¶´à·Šà¶à·à¶¸à·Šà¶¶à¶»à·Š","ඔක්à¶à·à¶¶à¶»à·Š","නොවà·à¶¸à·Šà¶¶à¶»à·Š","දෙසà·à¶¸à·Šà¶¶à¶»à·Š",""], - namesAbbr: ["ජන.","පෙබ.","මà·à¶»à·Šà¶à·”.","à¶…à¶´à·Š\u200dරේල්.","මà·à¶ºà·’.","ජූනි.","ජූලි.","à¶…à¶œà·.","à·ƒà·à¶´à·Š.","ඔක්.","නොවà·.","දෙසà·.",""] - }, - AM: ["à¶´à·™.à·€.","à¶´à·™.à·€.","à¶´à·™.à·€."], - PM: ["à¶´.à·€.","à¶´.à·€.","à¶´.à·€."], - eras: [{"name":"à¶šà·Š\u200dරි.à·€.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd", - f: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd h:mm tt", - F: "yyyy MMMM' මස 'dd' à·€à·à¶±à·’ද෠'dddd h:mm:ss tt", - Y: "yyyy MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "iu-Cans-CA", "default", { - name: "iu-Cans-CA", - englishName: "Inuktitut (Syllabics, Canada)", - nativeName: "áƒá“„ᒃᑎá‘ᑦ (ᑲᓇᑕᒥ)", - language: "iu-Cans", - numberFormat: { - groupSizes: [3,0], - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["ᓈᑦá‘á–‘á”","ᓇᒡá’ᔾá”á…","áŠáƒá‘‰á±á–…","á±á–“ᑦᓯᖅ","ᓯᑕᒻᒥᖅ","ᑕᓪᓕá•ᒥᖅ","ᓯᕙᑖá•á••á’ƒ"], - namesAbbr: ["ᓈᑦá‘","ᓇᒡá’","áŠáƒá‘‰á±","á±á–“ᑦᓯ","ᓯᑕ","ᑕᓪᓕ","ᓯᕙᑖá•á••á’ƒ"], - namesShort: ["ᓈ","ᓇ","áŠ","á±","ᓯ","á‘•","ᓯ"] - }, - months: { - names: ["á”®á“á“„áŠá•†","á•–á•á•—áŠá•†","ᒫᑦᓯ","á„á³á•†","á’ªáƒ","ᔫᓂ","ᔪᓚáƒ","á‹á’¡á’Œá“¯","ᓯᑎá±á•†","á…á‘á±á•†","á“„á••á±á•†","ᑎᓯá±á•†",""], - namesAbbr: ["á”®á“á“„","á•–á•á•—","ᒫᑦᓯ","á„á³á•†","á’ªáƒ","ᔫᓂ","ᔪᓚáƒ","á‹á’¡á’Œ","ᓯᑎá±","á…á‘á±","á“„á••á±","ᑎᓯá±",""] - }, - patterns: { - d: "d/M/yyyy", - D: "dddd,MMMM dd,yyyy", - f: "dddd,MMMM dd,yyyy h:mm tt", - F: "dddd,MMMM dd,yyyy h:mm:ss tt", - Y: "MMMM,yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "am-ET", "default", { - name: "am-ET", - englishName: "Amharic (Ethiopia)", - nativeName: "አማáˆáŠ› (ኢትዮጵያ)", - language: "am", - numberFormat: { - decimals: 1, - groupSizes: [3,0], - "NaN": "NAN", - percent: { - pattern: ["-n%","n%"], - decimals: 1, - groupSizes: [3,0] - }, - currency: { - pattern: ["-$n","$n"], - groupSizes: [3,0], - symbol: "ETB" - } - }, - calendars: { - standard: { - days: { - names: ["እሑድ","ሰኞ","ማáŠáˆ°áŠž","ረቡዕ","áˆáˆ™áˆµ","á‹“áˆá‰¥","ቅዳሜ"], - namesAbbr: ["እሑድ","ሰኞ","ማáŠáˆ°","ረቡዕ","áˆáˆ™áˆµ","á‹“áˆá‰¥","ቅዳሜ"], - namesShort: ["እ","ሰ","ማ","ረ","áˆ","á‹“","ቅ"] - }, - months: { - names: ["ጃንዩወሪ","áŒá‰¥áˆ©á‹ˆáˆª","ማáˆá‰½","ኤá•ረáˆ","ሜá‹","áŒáŠ•","áŒáˆ‹á‹","ኦገስት","ሴá•ቴáˆá‰ áˆ","ኦáŠá‰°á‹á‰ áˆ","ኖቬáˆá‰ áˆ","ዲሴáˆá‰ áˆ",""], - namesAbbr: ["ጃንዩ","áŒá‰¥áˆ©","ማáˆá‰½","ኤá•ረ","ሜá‹","áŒáŠ•","áŒáˆ‹á‹","ኦገስ","ሴá•ቴ","ኦáŠá‰°","ኖቬáˆ","ዲሴáˆ",""] - }, - AM: ["ጡዋት","ጡዋት","ጡዋት"], - PM: ["ከሰዓት","ከሰዓት","ከሰዓት"], - eras: [{"name":"ዓመተ áˆáˆ•ረት","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "dddd 'á£' MMMM d 'ቀን' yyyy", - f: "dddd 'á£' MMMM d 'ቀን' yyyy h:mm tt", - F: "dddd 'á£' MMMM d 'ቀን' yyyy h:mm:ss tt", - M: "MMMM d ቀን", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ne-NP", "default", { - name: "ne-NP", - englishName: "Nepali (Nepal)", - nativeName: "नेपाली (नेपाल)", - language: "ne", - numberFormat: { - groupSizes: [3,2], - "NaN": "nan", - negativeInfinity: "-infinity", - positiveInfinity: "infinity", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,2] - }, - currency: { - pattern: ["-$n","$n"], - symbol: "रà¥" - } - }, - calendars: { - standard: { - days: { - names: ["आइतवार","सोमवार","मङà¥à¤—लवार","बà¥à¤§à¤µà¤¾à¤°","बिहीवार","शà¥à¤•à¥à¤°à¤µà¤¾à¤°","शनिवार"], - namesAbbr: ["आइत","सोम","मङà¥à¤—ल","बà¥à¤§","बिही","शà¥à¤•à¥à¤°","शनि"], - namesShort: ["आ","सो","म","बà¥","बि","शà¥","श"] - }, - months: { - names: ["जनवरी","फेबà¥à¤°à¥à¤…री","मारà¥à¤š","अपà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¤¾à¤ˆ","अगसà¥à¤¤","सेपà¥à¤Ÿà¥‡à¤®à¥à¤¬à¤°","अकà¥à¤Ÿà¥‹à¤¬à¤°","नोà¤à¥‡à¤®à¥à¤¬à¤°","डिसेमà¥à¤¬à¤°",""], - namesAbbr: ["जन","फेब","मारà¥à¤š","अपà¥à¤°à¤¿à¤²","मे","जून","जà¥à¤²à¤¾à¤ˆ","अग","सेपà¥à¤Ÿ","अकà¥à¤Ÿ","नोà¤","डिस",""] - }, - AM: ["विहानी","विहानी","विहानी"], - PM: ["बेलà¥à¤•ी","बेलà¥à¤•ी","बेलà¥à¤•ी"], - eras: [{"name":"a.d.","start":null,"offset":0}], - patterns: { - Y: "MMMM,yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fy-NL", "default", { - name: "fy-NL", - englishName: "Frisian (Netherlands)", - nativeName: "Frysk (Nederlân)", - language: "fy", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["Snein","Moandei","Tiisdei","Woansdei","Tongersdei","Freed","Sneon"], - namesAbbr: ["Sn","Mo","Ti","Wo","To","Fr","Sn"], - namesShort: ["S","M","T","W","T","F","S"] - }, - months: { - names: ["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber",""], - namesAbbr: ["jann","febr","mrt","apr","maaie","jun","jul","aug","sept","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "d-M-yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ps-AF", "default", { - name: "ps-AF", - englishName: "Pashto (Afghanistan)", - nativeName: "پښتو (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", - language: "ps", - isRTL: true, - numberFormat: { - pattern: ["n-"], - ",": "ØŒ", - ".": ",", - "NaN": "غ ع", - negativeInfinity: "-∞", - positiveInfinity: "∞", - percent: { - pattern: ["%n-","%n"], - ",": "ØŒ", - ".": "," - }, - currency: { - pattern: ["$n-","$n"], - ",": "Ù¬", - ".": "Ù«", - symbol: "Ø‹" - } - }, - calendars: { - standard: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - firstDay: 6, - days: { - names: ["یکشنبه","دوشنبه","سه\u200cشنبه","چارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["یکشنبه","دوشنبه","سه\u200cشنبه","چارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښزمرى","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","لنڈ Û","مرغومى",""], - namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا Úš","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","لنڈ Û","مرغومى",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"Ù„.Ù‡","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy, dd, MMMM, dddd", - f: "yyyy, dd, MMMM, dddd h:mm tt", - F: "yyyy, dd, MMMM, dddd h:mm:ss tt", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fil-PH", "default", { - name: "fil-PH", - englishName: "Filipino (Philippines)", - nativeName: "Filipino (Pilipinas)", - language: "fil", - numberFormat: { - currency: { - symbol: "PhP" - } - }, - calendars: { - standard: { - days: { - names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"], - namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"], - namesShort: ["L","L","M","M","H","B","S"] - }, - months: { - names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""], - namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""] - }, - eras: [{"name":"Anno Domini","start":null,"offset":0}] - } - } -}); - -Globalize.addCultureInfo( "dv-MV", "default", { - name: "dv-MV", - englishName: "Divehi (Maldives)", - nativeName: "Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ° (Þ‹Þ¨ÞˆÞ¬Þ€Þ¨ ÞƒÞ§Þ‡Þ°Þ–Þ¬)", - language: "dv", - isRTL: true, - numberFormat: { - currency: { - pattern: ["n $-","n $"], - symbol: "Þƒ." - } - }, - calendars: { - standard: { - name: "Hijri", - days: { - names: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesAbbr: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesShort: ["Þ‡Þ§","Þ€Þ¯","Þ‡Þ¦","Þ„Þª","Þ„Þª","Þ€Þª","Þ€Þ®"] - }, - months: { - names: ["Þ‰ÞªÞ™Þ¦Þ‡Þ°ÞƒÞ¦Þ‰Þ°","ÞžÞ¦ÞŠÞ¦ÞƒÞª","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ¦Þ‡Þ°ÞˆÞ¦ÞÞ°","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞª","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ«ÞÞ§","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞ§","ÞƒÞ¦Þ–Þ¦Þ„Þ°","ÞÞ¦Þ¢Þ°Þ„Þ§Þ‚Þ°","ÞƒÞ¦Þ‰Þ¦ÞŸÞ§Þ‚Þ°","ÞÞ¦Þ‡Þ°ÞˆÞ§ÞÞ°","Þ›ÞªÞÞ°Þ¤Þ¦Þ¢Þ¨Þ‹Þ§","Þ›ÞªÞÞ°Þ™Þ¨Þ‡Þ°Þ–Þ§",""], - namesAbbr: ["Þ‰ÞªÞ™Þ¦Þ‡Þ°ÞƒÞ¦Þ‰Þ°","ÞžÞ¦ÞŠÞ¦ÞƒÞª","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ¦Þ‡Þ°ÞˆÞ¦ÞÞ°","ÞƒÞ¦Þ„Þ©Þ¢ÞªÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞª","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ«ÞÞ§","Þ–ÞªÞ‰Þ§Þ‹Þ¦ÞÞ°Þ‡Þ§ÞšÞ¨ÞƒÞ§","ÞƒÞ¦Þ–Þ¦Þ„Þ°","ÞÞ¦Þ¢Þ°Þ„Þ§Þ‚Þ°","ÞƒÞ¦Þ‰Þ¦ÞŸÞ§Þ‚Þ°","ÞÞ¦Þ‡Þ°ÞˆÞ§ÞÞ°","Þ›ÞªÞÞ°Þ¤Þ¦Þ¢Þ¨Þ‹Þ§","Þ›ÞªÞÞ°Þ™Þ¨Þ‡Þ°Þ–Þ§",""] - }, - AM: ["Þ‰Þ†","Þ‰Þ†","Þ‰Þ†"], - PM: ["Þ‰ÞŠ","Þ‰ÞŠ","Þ‰ÞŠ"], - eras: [{"name":"Þ€Þ¨Þ–Þ°ÞƒÞ©","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd/MM/yyyy HH:mm", - F: "dd/MM/yyyy HH:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - days: { - names: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesAbbr: ["އާދީއްތަ","Þ€Þ¯Þ‰Þ¦","Þ‡Þ¦Þ‚Þ°ÞŽÞ§ÞƒÞ¦","Þ„ÞªÞ‹Þ¦","Þ„ÞªÞƒÞ§Þްފަތި","Þ€ÞªÞ†ÞªÞƒÞª","Þ€Þ®Þ‚Þ¨Þ€Þ¨ÞƒÞª"], - namesShort: ["Þ‡Þ§","Þ€Þ¯","Þ‡Þ¦","Þ„Þª","Þ„Þª","Þ€Þª","Þ€Þ®"] - }, - months: { - names: ["Þ–Þ¦Þ‚Þ¦ÞˆÞ¦ÞƒÞ©","ÞŠÞ¬Þ„Þ°ÞƒÞªÞ‡Þ¦ÞƒÞ©","Þ‰Þ§Þ—Þ°","Þ‡ÞÞ•Þ°ÞƒÞ¨ÞÞ°","Þ‰Þ¬Þ‡Þ¨","Þ–Þ«Þ‚Þ°","Þ–ÞªÞÞ¦Þ‡Þ¨","Þ‡Þ¯ÞŽÞ¦ÞÞ°Þ“Þ°","ÞÞ¬Þ•Þ°Þ“Þ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‡Þ®Þ†Þ°Þ“Þ¯Þ„Þ¦Þƒ","Þ‚Þ®ÞˆÞ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‘Þ¨ÞÞ¬Þ‰Þ°Þ„Þ¦Þƒ",""], - namesAbbr: ["Þ–Þ¦Þ‚Þ¦ÞˆÞ¦ÞƒÞ©","ÞŠÞ¬Þ„Þ°ÞƒÞªÞ‡Þ¦ÞƒÞ©","Þ‰Þ§Þ—Þ°","Þ‡ÞÞ•Þ°ÞƒÞ¨ÞÞ°","Þ‰Þ¬Þ‡Þ¨","Þ–Þ«Þ‚Þ°","Þ–ÞªÞÞ¦Þ‡Þ¨","Þ‡Þ¯ÞŽÞ¦ÞÞ°Þ“Þ°","ÞÞ¬Þ•Þ°Þ“Þ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‡Þ®Þ†Þ°Þ“Þ¯Þ„Þ¦Þƒ","Þ‚Þ®ÞˆÞ¬Þ‰Þ°Þ„Þ¦Þƒ","Þ‘Þ¨ÞÞ¬Þ‰Þ°Þ„Þ¦Þƒ",""] - }, - AM: ["Þ‰Þ†","Þ‰Þ†","Þ‰Þ†"], - PM: ["Þ‰ÞŠ","Þ‰ÞŠ","Þ‰ÞŠ"], - eras: [{"name":"Þ‰Þ©ÞÞ§Þ‹Þ©","start":null,"offset":0}], - patterns: { - d: "dd/MM/yy", - D: "ddd, yyyy MMMM dd", - t: "HH:mm", - T: "HH:mm:ss", - f: "ddd, yyyy MMMM dd HH:mm", - F: "ddd, yyyy MMMM dd HH:mm:ss", - Y: "yyyy, MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "ha-Latn-NG", "default", { - name: "ha-Latn-NG", - englishName: "Hausa (Latin, Nigeria)", - nativeName: "Hausa (Nigeria)", - language: "ha-Latn", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"], - namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"], - namesShort: ["L","L","T","L","A","J","A"] - }, - months: { - names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""], - namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""] - }, - AM: ["Safe","safe","SAFE"], - PM: ["Yamma","yamma","YAMMA"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "yo-NG", "default", { - name: "yo-NG", - englishName: "Yoruba (Nigeria)", - nativeName: "Yoruba (Nigeria)", - language: "yo", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"], - namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"], - namesShort: ["A","A","I","O","O","E","A"] - }, - months: { - names: ["Osu kinni","Osu keji","Osu keta","Osu kerin","Osu karun","Osu kefa","Osu keje","Osu kejo","Osu kesan","Osu kewa","Osu kokanla","Osu keresi",""], - namesAbbr: ["kin.","kej.","ket.","ker.","kar.","kef.","kej.","kej.","kes.","kew.","kok.","ker.",""] - }, - AM: ["Owuro","owuro","OWURO"], - PM: ["Ale","ale","ALE"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "quz-BO", "default", { - name: "quz-BO", - englishName: "Quechua (Bolivia)", - nativeName: "runasimi (Qullasuyu)", - language: "quz", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "$b" - } - }, - calendars: { - standard: { - days: { - names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"], - namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"], - namesShort: ["d","k","a","m","h","b","k"] - }, - months: { - names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""], - namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "nso-ZA", "default", { - name: "nso-ZA", - englishName: "Sesotho sa Leboa (South Africa)", - nativeName: "Sesotho sa Leboa (Afrika Borwa)", - language: "nso", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$-n","$ n"], - symbol: "R" - } - }, - calendars: { - standard: { - days: { - names: ["Lamorena","MoÅ¡upologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"], - namesAbbr: ["Lam","MoÅ¡","Lbb","Lbr","Lbn","Lbh","Mok"], - namesShort: ["L","M","L","L","L","L","M"] - }, - months: { - names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","NgoatoboÅ¡ego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""], - namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""] - }, - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ba-RU", "default", { - name: "ba-RU", - englishName: "Bashkir (Russia)", - nativeName: "Башҡорт (РоÑÑиÑ)", - language: "ba", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ",", - symbol: "Ò»." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Йәкшәмбе","Дүшәмбе","Шишәмбе","Шаршамбы","КеÑаҙна","Йома","Шәмбе"], - namesAbbr: ["Йш","Дш","Шш","Шр","КÑ","Йм","Шб"], - namesShort: ["Йш","Дш","Шш","Шр","КÑ","Йм","Шб"] - }, - months: { - names: ["ғинуар","февраль","март","апрель","май","июнь","июль","авгуÑÑ‚","ÑентÑбрь","октÑбрь","ноÑбрь","декабрь",""], - namesAbbr: ["ғин","фев","мар","апр","май","июн","июл","авг","Ñен","окт","ноÑ","дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy 'й'", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy 'й' H:mm", - F: "d MMMM yyyy 'й' H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "lb-LU", "default", { - name: "lb-LU", - englishName: "Luxembourgish (Luxembourg)", - nativeName: "Lëtzebuergesch (Luxembourg)", - language: "lb", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "n. num.", - negativeInfinity: "-onendlech", - positiveInfinity: "+onendlech", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"], - namesAbbr: ["Son","Méi","Dën","Mët","Don","Fre","Sam"], - namesShort: ["So","Mé","Dë","Më","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "kl-GL", "default", { - name: "kl-GL", - englishName: "Greenlandic (Greenland)", - nativeName: "kalaallisut (Kalaallit Nunaat)", - language: "kl", - numberFormat: { - ",": ".", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - groupSizes: [3,0], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,0], - ",": ".", - ".": ",", - symbol: "kr." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"], - namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"], - namesShort: ["sa","at","ma","pi","si","ta","ar"] - }, - months: { - names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ig-NG", "default", { - name: "ig-NG", - englishName: "Igbo (Nigeria)", - nativeName: "Igbo (Nigeria)", - language: "ig", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"], - namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"], - namesShort: ["A","A","I","O","O","E","A"] - }, - months: { - names: ["Onwa mbu","Onwa ibua","Onwa ato","Onwa ano","Onwa ise","Onwa isi","Onwa asa","Onwa asato","Onwa itolu","Onwa iri","Onwa iri n'ofu","Onwa iri n'ibua",""], - namesAbbr: ["mbu.","ibu.","ato.","ano.","ise","isi","asa","asa.","ito.","iri.","n'of.","n'ib.",""] - }, - AM: ["Ututu","ututu","UTUTU"], - PM: ["Efifie","efifie","EFIFIE"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ii-CN", "default", { - name: "ii-CN", - englishName: "Yi (PRC)", - nativeName: "ê†ˆêŒ ê±ê‚· (êꉸê“ꂱê‡ê‰¼ê‡©)", - language: "ii", - numberFormat: { - groupSizes: [3,0], - "NaN": "ꌗꂷꀋꉬ", - negativeInfinity: "ꀄêŠêŒê€‹ê‰†", - positiveInfinity: "ꈤê‡ê‘–ꀋꉬ", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["ê‘ê†ê‘","ê†êŠ‚ê’”","ê†êŠ‚ê‘","ê†êŠ‚êŒ•","ê†êŠ‚ê‡–","ê†êŠ‚ê‰¬","ê†êŠ‚êƒ˜"], - namesAbbr: ["ê‘ê†","ê†ê’”","ê†ê‘","ê†êŒ•","ê†ê‡–","ê†ê‰¬","ê†êƒ˜"], - namesShort: ["ê†","ê’”","ê‘","ꌕ","ꇖ","ꉬ","ꃘ"] - }, - months: { - names: ["ê‹ê†ª","ê‘ꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","êƒê†ª","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""], - namesAbbr: ["ê‹ê†ª","ê‘ꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","êƒê†ª","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""] - }, - AM: ["ꂵꆪꈌêˆ","ꂵꆪꈌêˆ","ꂵꆪꈌêˆ"], - PM: ["ꂵꆪꈌꉈ","ꂵꆪꈌꉈ","ꂵꆪꈌꉈ"], - eras: [{"name":"ꇬꑼ","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'ꈎ' M'ꆪ' d'ê‘'", - t: "tt h:mm", - T: "H:mm:ss", - f: "yyyy'ꈎ' M'ꆪ' d'ê‘' tt h:mm", - F: "yyyy'ꈎ' M'ꆪ' d'ê‘' H:mm:ss", - M: "M'ꆪ' d'ê‘'", - Y: "yyyy'ꈎ' M'ꆪ'" - } - } - } -}); - -Globalize.addCultureInfo( "arn-CL", "default", { - name: "arn-CL", - englishName: "Mapudungun (Chile)", - nativeName: "Mapudungun (Chile)", - language: "arn", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "moh-CA", "default", { - name: "moh-CA", - englishName: "Mohawk (Mohawk)", - nativeName: "Kanien'kéha", - language: "moh", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Awentatokentì:ke","Awentataón'ke","Ratironhia'kehronòn:ke","Soséhne","Okaristiiáhne","Ronwaia'tanentaktonhne","Entákta"], - namesShort: ["S","M","T","W","T","F","S"] - }, - months: { - names: ["Tsothohrkó:Wa","Enniska","Enniskó:Wa","Onerahtókha","Onerahtohkó:Wa","Ohiari:Ha","Ohiarihkó:Wa","Seskéha","Seskehkó:Wa","Kenténha","Kentenhkó:Wa","Tsothóhrha",""] - } - } - } -}); - -Globalize.addCultureInfo( "br-FR", "default", { - name: "br-FR", - englishName: "Breton (France)", - nativeName: "brezhoneg (Frañs)", - language: "br", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "NkN", - negativeInfinity: "-Anfin", - positiveInfinity: "+Anfin", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sul","Lun","Meurzh","Merc'her","Yaou","Gwener","Sadorn"], - namesAbbr: ["Sul","Lun","Meu.","Mer.","Yaou","Gwe.","Sad."], - namesShort: ["Su","Lu","Mz","Mc","Ya","Gw","Sa"] - }, - months: { - names: ["Genver","C'hwevrer","Meurzh","Ebrel","Mae","Mezheven","Gouere","Eost","Gwengolo","Here","Du","Kerzu",""], - namesAbbr: ["Gen.","C'hwe.","Meur.","Ebr.","Mae","Mezh.","Goue.","Eost","Gwen.","Here","Du","Kzu",""] - }, - AM: null, - PM: null, - eras: [{"name":"g. J.-K.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ug-CN", "default", { - name: "ug-CN", - englishName: "Uyghur (PRC)", - nativeName: "ئۇيغۇرچە (Ø¬Û‡ÚØ®Û‡Ø§ خەلق جۇمھۇرىيىتى)", - language: "ug", - isRTL: true, - numberFormat: { - "NaN": "سان ئەمەس", - negativeInfinity: "مەنپىي چەكسىزلىك", - positiveInfinity: "مۇسبەت چەكسىزلىك", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"], - namesAbbr: ["ÙŠÛ•","دۈ","سە","چا","Ù¾Û•","جۈ","Ø´Û•"], - namesShort: ["ÙŠ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""], - namesAbbr: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""] - }, - AM: ["چۈشتىن بۇرۇن","چۈشتىن بۇرۇن","چۈشتىن بۇرۇن"], - PM: ["چۈشتىن ÙƒÛيىن","چۈشتىن ÙƒÛيىن","چۈشتىن ÙƒÛيىن"], - eras: [{"name":"مىلادى","start":null,"offset":0}], - patterns: { - d: "yyyy-M-d", - D: "yyyy-'يىلى' MMMM d-'كۈنى،'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm", - F: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm:ss", - M: "MMMM d'-كۈنى'", - Y: "yyyy-'يىلى' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "mi-NZ", "default", { - name: "mi-NZ", - englishName: "Maori (New Zealand)", - nativeName: "Reo MÄori (Aotearoa)", - language: "mi", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["RÄtapu","RÄhina","RÄtÅ«","RÄapa","RÄpare","RÄmere","RÄhoroi"], - namesAbbr: ["Ta","Hi","TÅ«","Apa","Pa","Me","Ho"], - namesShort: ["Ta","Hi","TÅ«","Aa","Pa","Me","Ho"] - }, - months: { - names: ["Kohi-tÄtea","Hui-tanguru","PoutÅ«-te-rangi","Paenga-whÄwhÄ","Haratua","Pipiri","HÅngongoi","Here-turi-kÅkÄ","Mahuru","Whiringa-Ä-nuku","Whiringa-Ä-rangi","Hakihea",""], - namesAbbr: ["Kohi","Hui","Pou","Pae","Hara","Pipi","HÅngo","Here","Mahu","Nuku","Rangi","Haki",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd MMMM, yyyy", - f: "dddd, dd MMMM, yyyy h:mm tt", - F: "dddd, dd MMMM, yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM, yy" - } - } - } -}); - -Globalize.addCultureInfo( "oc-FR", "default", { - name: "oc-FR", - englishName: "Occitan (France)", - nativeName: "Occitan (França)", - language: "oc", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numeric", - negativeInfinity: "-Infinit", - positiveInfinity: "+Infinit", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"], - namesAbbr: ["dim.","lun.","mar.","mèc.","jòu.","ven.","sab."], - namesShort: ["di","lu","ma","mè","jò","ve","sa"] - }, - months: { - names: ["genier","febrier","març","abril","mai","junh","julh","agost","setembre","octobre","novembre","desembre",""], - namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""] - }, - monthsGenitive: { - names: ["de genier","de febrier","de març","d'abril","de mai","de junh","de julh","d'agost","de setembre","d'octobre","de novembre","de desembre",""], - namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""] - }, - AM: null, - PM: null, - eras: [{"name":"après Jèsus-Crist","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd,' lo 'd MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd,' lo 'd MMMM' de 'yyyy HH:mm", - F: "dddd,' lo 'd MMMM' de 'yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "co-FR", "default", { - name: "co-FR", - englishName: "Corsican (France)", - nativeName: "Corsu (France)", - language: "co", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Mica numericu", - negativeInfinity: "-Infinitu", - positiveInfinity: "+Infinitu", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dumenica","luni","marti","mercuri","ghjovi","venderi","sabbatu"], - namesAbbr: ["dum.","lun.","mar.","mer.","ghj.","ven.","sab."], - namesShort: ["du","lu","ma","me","gh","ve","sa"] - }, - months: { - names: ["ghjennaghju","ferraghju","marzu","aprile","maghju","ghjunghju","lugliu","aostu","settembre","ottobre","nuvembre","dicembre",""], - namesAbbr: ["ghje","ferr","marz","apri","magh","ghju","lugl","aost","sett","otto","nuve","dice",""] - }, - AM: null, - PM: null, - eras: [{"name":"dopu J-C","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "gsw-FR", "default", { - name: "gsw-FR", - englishName: "Alsatian (France)", - nativeName: "Elsässisch (Frà nkrisch)", - language: "gsw", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Ohne Nummer", - negativeInfinity: "-Unendlich", - positiveInfinity: "+Unendlich", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Sundà à ","Mondà à ","Dienschdà à ","Mittwuch","Dunnerschdà à ","Fridà à ","Sà mschdà à "], - namesAbbr: ["Su.","Mo.","Di.","Mi.","Du.","Fr.","Sà ."], - namesShort: ["Su","Mo","Di","Mi","Du","Fr","Sà "] - }, - months: { - names: ["Jänner","Feverje","März","Àpril","Mai","Jüni","Jüli","Augscht","September","Oktower","Nowember","Dezember",""], - namesAbbr: ["Jän.","Fev.","März","Apr.","Mai","Jüni","Jüli","Aug.","Sept.","Okt.","Now.","Dez.",""] - }, - AM: null, - PM: null, - eras: [{"name":"Vor J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sah-RU", "default", { - name: "sah-RU", - englishName: "Yakut (Russia)", - nativeName: "Ñаха (РоÑÑиÑ)", - language: "sah", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "NAN", - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "Ñ." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["баÑкыһыанньа","бÑнидиÑнньик","оптуорунньук","ÑÑÑ€ÑдÑ","чÑппиÑÑ€","бÑÑтинÑÑ","Ñубуота"], - namesAbbr: ["БÑ","Бн","Оп","Ср","Чп","Бт","Сб"], - namesShort: ["БÑ","Бн","Оп","Ср","Чп","Бт","Сб"] - }, - months: { - names: ["ТохÑунньу","Олунньу","Кулун тутар","ÐœÑƒÑƒÑ ÑƒÑтар","Ыам ыйа","БÑÑ Ñ‹Ð¹Ð°","От ыйа","Ðтырдьах ыйа","Балаҕан ыйа","Ðлтынньы","СÑтинньи","ÐÑ…Ñынньы",""], - namesAbbr: ["тхÑ","олн","кул","мÑÑ‚","ыам","бÑÑ","отй","атр","блҕ","алт","Ñтн","ахÑ",""] - }, - monthsGenitive: { - names: ["тохÑунньу","олунньу","кулун тутар","Ð¼ÑƒÑƒÑ ÑƒÑтар","ыам ыйын","бÑÑ Ñ‹Ð¹Ñ‹Ð½","от ыйын","атырдьах ыйын","балаҕан ыйын","алтынньы","ÑÑтинньи","ахÑынньы",""], - namesAbbr: ["тхÑ","олн","кул","мÑÑ‚","ыам","бÑÑ","отй","атр","блҕ","алт","Ñтн","ахÑ",""] - }, - AM: null, - PM: null, - patterns: { - d: "MM.dd.yyyy", - D: "MMMM d yyyy 'Ñ.'", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d yyyy 'Ñ.' H:mm", - F: "MMMM d yyyy 'Ñ.' H:mm:ss", - Y: "MMMM yyyy 'Ñ.'" - } - } - } -}); - -Globalize.addCultureInfo( "qut-GT", "default", { - name: "qut-GT", - englishName: "K'iche (Guatemala)", - nativeName: "K'iche (Guatemala)", - language: "qut", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - symbol: "Q" - } - }, - calendars: { - standard: { - days: { - names: ["juq'ij","kaq'ij","oxq'ij","kajq'ij","joq'ij","waqq'ij","wuqq'ij"], - namesAbbr: ["juq","kaq","oxq","kajq","joq","waqq","wuqq"], - namesShort: ["ju","ka","ox","ka","jo","wa","wu"] - }, - months: { - names: ["nab'e ik'","ukab' ik'","rox ik'","ukaj ik'","uro' ik'","uwaq ik'","uwuq ik'","uwajxaq ik'","ub'elej ik'","ulaj ik'","ujulaj ik'","ukab'laj ik'",""], - namesAbbr: ["nab'e","ukab","rox","ukaj","uro","uwaq","uwuq","uwajxaq","ub'elej","ulaj","ujulaj","ukab'laj",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "rw-RW", "default", { - name: "rw-RW", - englishName: "Kinyarwanda (Rwanda)", - nativeName: "Kinyarwanda (Rwanda)", - language: "rw", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$-n","$ n"], - ",": " ", - ".": ",", - symbol: "RWF" - } - }, - calendars: { - standard: { - days: { - names: ["Ku wa mbere","Ku wa kabiri","Ku wa gatatu","Ku wa kane","Ku wa gatanu","Ku wa gatandatu","Ku cyumweru"], - namesAbbr: ["mbe.","kab.","gat.","kan.","gat.","gat.","cyu."], - namesShort: ["mb","ka","ga","ka","ga","ga","cy"] - }, - months: { - names: ["Mutarama","Gashyantare","Werurwe","Mata","Gicurasi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza",""], - namesAbbr: ["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukwa","Ugu","Uku",""] - }, - AM: ["saa moya z.m.","saa moya z.m.","SAA MOYA Z.M."], - PM: ["saa moya z.n.","saa moya z.n.","SAA MOYA Z.N."], - eras: [{"name":"AD","start":null,"offset":0}] - } - } -}); - -Globalize.addCultureInfo( "wo-SN", "default", { - name: "wo-SN", - englishName: "Wolof (Senegal)", - nativeName: "Wolof (Sénégal)", - language: "wo", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "XOF" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "prs-AF", "default", { - name: "prs-AF", - englishName: "Dari (Afghanistan)", - nativeName: "درى (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", - language: "prs", - isRTL: true, - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "غ ع", - negativeInfinity: "-∞", - positiveInfinity: "∞", - percent: { - pattern: ["%n-","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$n-","$n"], - symbol: "Ø‹" - } - }, - calendars: { - standard: { - name: "Hijri", - firstDay: 5, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - f: "dd/MM/yyyy h:mm tt", - F: "dd/MM/yyyy h:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_Localized: { - firstDay: 5, - days: { - names: ["یکشنبه","دوشنبه","سه\u200cشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesAbbr: ["یکشنبه","دوشنبه","سه\u200cشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"], - namesShort: ["ÛŒ","د","س","Ú†","Ù¾","ج","Ø´"] - }, - months: { - names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","ليندÛ","مرغومى",""], - namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","ÙˆÚ–Ù‰","تله","Ù„Ú“Ù…","ليندÛ","مرغومى",""] - }, - AM: ["غ.Ù…","غ.Ù…","غ.Ù…"], - PM: ["غ.Ùˆ","غ.Ùˆ","غ.Ùˆ"], - eras: [{"name":"Ù„.Ù‡","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy, dd, MMMM, dddd", - f: "yyyy, dd, MMMM, dddd h:mm tt", - F: "yyyy, dd, MMMM, dddd h:mm:ss tt", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "gd-GB", "default", { - name: "gd-GB", - englishName: "Scottish Gaelic (United Kingdom)", - nativeName: "Gà idhlig (An Rìoghachd Aonaichte)", - language: "gd", - numberFormat: { - negativeInfinity: "-Neo-chrìochnachd", - positiveInfinity: "Neo-chrìochnachd", - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Didòmhnaich","Diluain","Dimà irt","Diciadain","Diardaoin","Dihaoine","Disathairne"], - namesAbbr: ["Dòm","Lua","Mà i","Cia","Ard","Hao","Sat"], - namesShort: ["D","L","M","C","A","H","S"] - }, - months: { - names: ["Am Faoilleach","An Gearran","Am Mà rt","An Giblean","An Cèitean","An t-Ã’gmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dà mhair","An t-Samhain","An Dùbhlachd",""], - namesAbbr: ["Fao","Gea","Mà r","Gib","Cèi","Ã’gm","Iuc","Lùn","Sul","Dà m","Sam","Dùb",""] - }, - AM: ["m","m","M"], - PM: ["f","f","F"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-IQ", "default", { - name: "ar-IQ", - englishName: "Arabic (Iraq)", - nativeName: "العربية (العراق)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "د.ع.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "zh-CN", "default", { - name: "zh-CN", - englishName: "Chinese (Simplified, PRC)", - nativeName: "䏿–‡(ä¸åŽäººæ°‘共和国)", - language: "zh-CHS", - numberFormat: { - "NaN": "éžæ•°å—", - negativeInfinity: "è´Ÿæ— ç©·å¤§", - positiveInfinity: "æ£æ— 穷大", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "de-CH", "default", { - name: "de-CH", - englishName: "German (Switzerland)", - nativeName: "Deutsch (Schweiz)", - language: "de", - numberFormat: { - ",": "'", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "Fr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "en-GB", "default", { - name: "en-GB", - englishName: "English (United Kingdom)", - nativeName: "English (United Kingdom)", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "£" - } - }, - calendars: { - standard: { - firstDay: 1, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-MX", "default", { - name: "es-MX", - englishName: "Spanish (Mexico)", - nativeName: "Español (México)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fr-BE", "default", { - name: "fr-BE", - englishName: "French (Belgium)", - nativeName: "français (Belgique)", - language: "fr", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "d/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "it-CH", "default", { - name: "it-CH", - englishName: "Italian (Switzerland)", - nativeName: "italiano (Svizzera)", - language: "it", - numberFormat: { - ",": "'", - "NaN": "Non un numero reale", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "fr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"], - namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"], - namesShort: ["do","lu","ma","me","gi","ve","sa"] - }, - months: { - names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""], - namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "nl-BE", "default", { - name: "nl-BE", - englishName: "Dutch (Belgium)", - nativeName: "Nederlands (België)", - language: "nl", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NaN (Niet-een-getal)", - negativeInfinity: "-oneindig", - positiveInfinity: "oneindig", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"], - namesAbbr: ["zo","ma","di","wo","do","vr","za"], - namesShort: ["zo","ma","di","wo","do","vr","za"] - }, - months: { - names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd d MMMM yyyy H:mm", - F: "dddd d MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "nn-NO", "default", { - name: "nn-NO", - englishName: "Norwegian, Nynorsk (Norway)", - nativeName: "norsk, nynorsk (Noreg)", - language: "nn", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mÃ¥ndag","tysdag","onsdag","torsdag","fredag","laurdag"], - namesAbbr: ["sø","mÃ¥","ty","on","to","fr","la"], - namesShort: ["sø","mÃ¥","ty","on","to","fr","la"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "pt-PT", "default", { - name: "pt-PT", - englishName: "Portuguese (Portugal)", - nativeName: "português (Portugal)", - language: "pt", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NaN (Não é um número)", - negativeInfinity: "-Infinito", - positiveInfinity: "+Infinito", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"], - namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"], - namesShort: ["D","S","T","Q","Q","S","S"] - }, - months: { - names: ["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro",""], - namesAbbr: ["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "dddd, d' de 'MMMM' de 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d' de 'MMMM' de 'yyyy HH:mm", - F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss", - M: "d/M", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Latn-CS", "default", { - name: "sr-Latn-CS", - englishName: "Serbian (Latin, Serbia and Montenegro (Former))", - nativeName: "srpski (Srbija i Crna Gora (Prethodno))", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Din." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sv-FI", "default", { - name: "sv-FI", - englishName: "Swedish (Finland)", - nativeName: "svenska (Finland)", - language: "sv", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["söndag","mÃ¥ndag","tisdag","onsdag","torsdag","fredag","lördag"], - namesAbbr: ["sö","mÃ¥","ti","on","to","fr","lö"], - namesShort: ["sö","mÃ¥","ti","on","to","fr","lö"] - }, - months: { - names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "'den 'd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "'den 'd MMMM yyyy HH:mm", - F: "'den 'd MMMM yyyy HH:mm:ss", - M: "'den 'd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "az-Cyrl-AZ", "default", { - name: "az-Cyrl-AZ", - englishName: "Azeri (Cyrillic, Azerbaijan)", - nativeName: "Ðзәрбајҹан (Ðзәрбајҹан)", - language: "az-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "ман." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Базар","Базар ертәÑи","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"], - namesAbbr: ["Б","Бе","Ча","Ч","Ҹа","Ò¸","Ш"], - namesShort: ["Б","Бе","Ча","Ч","Ҹа","Ò¸","Ш"] - }, - months: { - names: ["Јанвар","Феврал","Март","Ðпрел","Мај","Ијун","Ијул","ÐвгуÑÑ‚","Сентјабр","Октјабр","Ðојабр","Декабр",""], - namesAbbr: ["Јан","Фев","Мар","Ðпр","Мај","Ијун","Ијул","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["јанвар","феврал","март","апрел","мај","ијун","ијул","авгуÑÑ‚","Ñентјабр","октјабр","нојабр","декабр",""], - namesAbbr: ["Јан","Фев","Мар","Ðпр","маÑ","ијун","ијул","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "dsb-DE", "default", { - name: "dsb-DE", - englishName: "Lower Sorbian (Germany)", - nativeName: "dolnoserbšćina (Nimska)", - language: "dsb", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "njedefinowane", - negativeInfinity: "-njekoÅ„cne", - positiveInfinity: "+njekoÅ„cne", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["njeźela","ponjeźele","waÅ‚tora","srjoda","stwortk","pÄ›tk","sobota"], - namesAbbr: ["nje","pon","waÅ‚","srj","stw","pÄ›t","sob"], - namesShort: ["n","p","w","s","s","p","s"] - }, - months: { - names: ["januar","februar","mÄ›rc","apryl","maj","junij","julij","awgust","september","oktober","nowember","december",""], - namesAbbr: ["jan","feb","mÄ›r","apr","maj","jun","jul","awg","sep","okt","now","dec",""] - }, - monthsGenitive: { - names: ["januara","februara","mÄ›rca","apryla","maja","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""], - namesAbbr: ["jan","feb","mÄ›r","apr","maj","jun","jul","awg","sep","okt","now","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"po Chr.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "dddd, 'dnja' d. MMMM yyyy", - t: "H.mm 'goź.'", - T: "H:mm:ss", - f: "dddd, 'dnja' d. MMMM yyyy H.mm 'goź.'", - F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "se-SE", "default", { - name: "se-SE", - englishName: "Sami, Northern (Sweden)", - nativeName: "davvisámegiella (Ruoŧŧa)", - language: "se", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["sotnabeaivi","mánnodat","disdat","gaskavahkku","duorastat","bearjadat","lávvardat"], - namesAbbr: ["sotn","mán","dis","gask","duor","bear","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["ođđajagemánnu","guovvamánnu","njukÄamánnu","cuoÅ‹ománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","ÄakÄamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - monthsGenitive: { - names: ["ođđajagimánu","guovvamánu","njukÄamánu","cuoÅ‹ománu","miessemánu","geassemánu","suoidnemánu","borgemánu","ÄakÄamánu","golggotmánu","skábmamánu","juovlamánu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ga-IE", "default", { - name: "ga-IE", - englishName: "Irish (Ireland)", - nativeName: "Gaeilge (Éire)", - language: "ga", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"], - namesAbbr: ["Domh","Luan","Máir","Céad","Déar","Aoi","Sath"], - namesShort: ["Do","Lu","Má","Cé","De","Ao","Sa"] - }, - months: { - names: ["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig",""], - namesAbbr: ["Ean","Feabh","Már","Aib","Bealt","Meith","Iúil","Lún","M.Fómh","D.Fómh","Samh","Noll",""] - }, - AM: ["r.n.","r.n.","R.N."], - PM: ["i.n.","i.n.","I.N."], - patterns: { - d: "dd/MM/yyyy", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ms-BN", "default", { - name: "ms-BN", - englishName: "Malay (Brunei Darussalam)", - nativeName: "Bahasa Melayu (Brunei Darussalam)", - language: "ms", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - decimals: 0, - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"], - namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"], - namesShort: ["A","I","S","R","K","J","S"] - }, - months: { - names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""], - namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM yyyy H:mm", - F: "dd MMMM yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "uz-Cyrl-UZ", "default", { - name: "uz-Cyrl-UZ", - englishName: "Uzbek (Cyrillic, Uzbekistan)", - nativeName: "Ўзбек (ЎзбекиÑтон)", - language: "uz-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñўм" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Ñкшанба","душанба","Ñешанба","чоршанба","пайшанба","жума","шанба"], - namesAbbr: ["Ñкш","дш","Ñш","чш","пш","ж","ш"], - namesShort: ["Ñ","д","Ñ","ч","п","ж","ш"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвар","феврал","март","апрел","май","июн","июл","авгуÑÑ‚","ÑентÑбр","октÑбр","ноÑбр","декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","маÑ","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "yyyy 'йил' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'йил' d-MMMM HH:mm", - F: "yyyy 'йил' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "bn-BD", "default", { - name: "bn-BD", - englishName: "Bengali (Bangladesh)", - nativeName: "বাংলা (বাংলাদেশ)", - language: "bn", - numberFormat: { - groupSizes: [3,2], - percent: { - pattern: ["-%n","%n"], - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "à§³" - } - }, - calendars: { - standard: { - "/": "-", - ":": ".", - firstDay: 1, - days: { - names: ["রবিবার","সোমবার","মঙà§à¦—লবার","বà§à¦§à¦¬à¦¾à¦°","বৃহসà§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°","শà§à¦•à§à¦°à¦¬à¦¾à¦°","শনিবার"], - namesAbbr: ["রবি.","সোম.","মঙà§à¦—ল.","বà§à¦§.","বৃহসà§à¦ªà¦¤à¦¿.","শà§à¦•à§à¦°.","শনি."], - namesShort: ["র","স","ম","ব","ব","শ","শ"] - }, - months: { - names: ["জানà§à¦¯à¦¼à¦¾à¦°à§€","ফেবà§à¦°à§à¦¯à¦¼à¦¾à¦°à§€","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগসà§à¦Ÿ","সেপà§à¦Ÿà§‡à¦®à§à¦¬à¦°","অকà§à¦Ÿà§‹à¦¬à¦°","নà¦à§‡à¦®à§à¦¬à¦°","ডিসেমà§à¦¬à¦°",""], - namesAbbr: ["জানà§.","ফেবà§à¦°à§.","মারà§à¦š","à¦à¦ªà§à¦°à¦¿à¦²","মে","জà§à¦¨","জà§à¦²à¦¾à¦‡","আগ.","সেপà§à¦Ÿà§‡.","অকà§à¦Ÿà§‹.","নà¦à§‡.","ডিসে.",""] - }, - AM: ["পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨","পà§à¦°à§à¦¬à¦¾à¦¹à§à¦¨"], - PM: ["অপরাহà§à¦¨","অপরাহà§à¦¨","অপরাহà§à¦¨"], - patterns: { - d: "dd-MM-yy", - D: "dd MMMM yyyy", - t: "HH.mm", - T: "HH.mm.ss", - f: "dd MMMM yyyy HH.mm", - F: "dd MMMM yyyy HH.mm.ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "mn-Mong-CN", "default", { - name: "mn-Mong-CN", - englishName: "Mongolian (Traditional Mongolian, PRC)", - nativeName: "á ®á ¤á ¨á á á ¤á ¯ á ¬á ¡á ¯á ¡ (á ªá ¦á á ¦á ³á ¡ á ¨á á ¢á ·á á ®á ³á á ¬á ¤ á ³á ¤á ®á ³á á ³á ¤ á á ·á á ³ á £á ¯á £á °)", - language: "mn-Mong", - numberFormat: { - groupSizes: [3,0], - "NaN": "á ²á ¤á á á á ªá ¤á °á ¤", - negativeInfinity: "á °á ¦á ¬á ¡á ·á ¬á ¦ á ¬á ¢á µá á á á ·á á ¦á ¢ á ¶á ¡á ¬á ¡", - positiveInfinity: "á ¡á ¶á ‹á ¡á ·á ¬á ¦ á ¬á ¢á µá á á á ·á á ¦á ¢ á ¶á á ¬á ¡", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - groupSizes: [3,0], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["á á á ·á á \u202fá ¤á ¨ á ¡á ³á ¦á ·","á á á ·á á \u202fá ¤á ¨ á ¨á ¢á á ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ¬á £á ¶á á ·","á á á ·á á \u202fá ¤á ¨ á á ¤á ·á ªá á ¨","á á á ·á á \u202fá ¤á ¨ á ³á ¥á ·á ªá ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ²á á ªá ¤á ¨","á á á ·á á \u202fá ¤á ¨ á µá ¢á ·á á ¤á á á ¨"], - namesAbbr: ["á á á ·á á \u202fá ¤á ¨ á ¡á ³á ¦á ·","á á á ·á á \u202fá ¤á ¨ á ¨á ¢á á ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ¬á £á ¶á á ·","á á á ·á á \u202fá ¤á ¨ á á ¤á ·á ªá á ¨","á á á ·á á \u202fá ¤á ¨ á ³á ¥á ·á ªá ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ²á á ªá ¤á ¨","á á á ·á á \u202fá ¤á ¨ á µá ¢á ·á á ¤á á á ¨"], - namesShort: ["á ¡\u200d","á ¨á ¢\u200d","á ¬á £\u200d","á á ¤\u200d","á ³á ¥\u200d","á ²á \u200d","á µá ¢\u200d"] - }, - months: { - names: ["á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ","á á ¤á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á ²á ¦á ·á ªá ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ²á á ªá ¤á ³á ¤á á á · á °á á ·á Žá ","á µá ¢á ·á á ¤á ³á ¤á á á · á °á á ·á Žá ","á ²á ¤á ¯á ¤á ³á ¤á á á · á °á á ·á Žá ","á ¨á á ¢á ®á á ³á ¤á á á · á °á á ·á Žá ","á ¶á ¢á °á ¦á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ",""], - namesAbbr: ["á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ","á á ¤á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á ²á ¦á ·á ªá ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ²á á ªá ¤á ³á ¤á á á · á °á á ·á Žá ","á µá ¢á ·á á ¤á ³á ¤á á á · á °á á ·á Žá ","á ²á ¤á ¯á ¤á ³á ¤á á á · á °á á ·á Žá ","á ¨á á ¢á ®á á ³á ¤á á á · á °á á ·á Žá ","á ¶á ¢á °á ¦á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ",""] - }, - AM: null, - PM: null, - eras: [{"name":"á £á ¨ á ²á £á á á ¯á á ¯ á ¤á ¨","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·' H:mm", - F: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·' H:mm:ss", - M: "M'á °á á ·á Žá ' d'á ¡á ³á ¦á ·'", - Y: "yyyy'á £á ¨' M'á °á á ·á Žá '" - } - } - } -}); - -Globalize.addCultureInfo( "iu-Latn-CA", "default", { - name: "iu-Latn-CA", - englishName: "Inuktitut (Latin, Canada)", - nativeName: "Inuktitut (Kanatami)", - language: "iu-Latn", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"], - namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"], - namesShort: ["N","N","A","P","S","T","S"] - }, - months: { - names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""], - namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""] - }, - patterns: { - d: "d/MM/yyyy", - D: "ddd, MMMM dd,yyyy", - f: "ddd, MMMM dd,yyyy h:mm tt", - F: "ddd, MMMM dd,yyyy h:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "tzm-Latn-DZ", "default", { - name: "tzm-Latn-DZ", - englishName: "Tamazight (Latin, Algeria)", - nativeName: "Tamazight (Djazaïr)", - language: "tzm-Latn", - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - symbol: "DZD" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 6, - days: { - names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"], - namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"], - namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"] - }, - months: { - names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""], - namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "quz-EC", "default", { - name: "quz-EC", - englishName: "Quechua (Ecuador)", - nativeName: "runasimi (Ecuador)", - language: "quz", - numberFormat: { - ",": ".", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - days: { - names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"], - namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"], - namesShort: ["d","k","a","m","h","b","k"] - }, - months: { - names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""], - namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-EG", "default", { - name: "ar-EG", - englishName: "Arabic (Egypt)", - nativeName: "العربية (مصر)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - symbol: "ج.Ù….\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "zh-HK", "default", { - name: "zh-HK", - englishName: "Chinese (Traditional, Hong Kong S.A.R.)", - nativeName: "䏿–‡(香港特別行政å€)", - language: "zh-CHT", - numberFormat: { - "NaN": "éžæ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "HK$" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "de-AT", "default", { - name: "de-AT", - englishName: "German (Austria)", - nativeName: "Deutsch (Österreich)", - language: "de", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, dd. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, dd. MMMM yyyy HH:mm", - F: "dddd, dd. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "en-AU", "default", { - name: "en-AU", - englishName: "English (Australia)", - nativeName: "English (Australia)", - numberFormat: { - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - patterns: { - d: "d/MM/yyyy", - D: "dddd, d MMMM yyyy", - f: "dddd, d MMMM yyyy h:mm tt", - F: "dddd, d MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-ES", "default", { - name: "es-ES", - englishName: "Spanish (Spain, International Sort)", - nativeName: "Español (España, alfabetización internacional)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fr-CA", "default", { - name: "fr-CA", - englishName: "French (Canada)", - nativeName: "français (Canada)", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["(n $)","n $"], - ",": " ", - ".": "," - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "yyyy-MM-dd", - D: "d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d MMMM yyyy HH:mm", - F: "d MMMM yyyy HH:mm:ss", - M: "d MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Cyrl-CS", "default", { - name: "sr-Cyrl-CS", - englishName: "Serbian (Cyrillic, Serbia and Montenegro (Former))", - nativeName: "ÑрпÑки (Србија и Црна Гора (Претходно))", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Дин." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["не","по","ут","ÑÑ€","че","пе","Ñу"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "se-FI", "default", { - name: "se-FI", - englishName: "Sami, Northern (Finland)", - nativeName: "davvisámegiella (Suopma)", - language: "se", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"], - namesAbbr: ["sotn","vuos","maÅ‹","gask","duor","bear","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["ođđajagemánnu","guovvamánnu","njukÄamánnu","cuoÅ‹ománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","ÄakÄamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - monthsGenitive: { - names: ["ođđajagimánu","guovvamánu","njukÄamánu","cuoÅ‹ománu","miessemánu","geassemánu","suoidnemánu","borgemánu","ÄakÄamánu","golggotmánu","skábmamánu","juovlamánu",""], - namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","ÄakÄ","golg","skáb","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. b. 'yyyy H:mm", - F: "MMMM d'. b. 'yyyy H:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "quz-PE", "default", { - name: "quz-PE", - englishName: "Quechua (Peru)", - nativeName: "runasimi (Piruw)", - language: "quz", - numberFormat: { - percent: { - pattern: ["-%n","%n"] - }, - currency: { - pattern: ["$ -n","$ n"], - symbol: "S/." - } - }, - calendars: { - standard: { - days: { - names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"], - namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"], - namesShort: ["d","k","a","m","h","b","k"] - }, - months: { - names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""], - namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-LY", "default", { - name: "ar-LY", - englishName: "Arabic (Libya)", - nativeName: "العربية (ليبيا)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$n"], - decimals: 3, - symbol: "د.Ù„.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "zh-SG", "default", { - name: "zh-SG", - englishName: "Chinese (Simplified, Singapore)", - nativeName: "䏿–‡(æ–°åŠ å¡)", - language: "zh-CHS", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "tt h:mm", - T: "tt h:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' tt h:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' tt h:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "de-LU", "default", { - name: "de-LU", - englishName: "German (Luxembourg)", - nativeName: "Deutsch (Luxemburg)", - language: "de", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "en-CA", "default", { - name: "en-CA", - englishName: "English (Canada)", - nativeName: "English (Canada)", - numberFormat: { - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - patterns: { - d: "dd/MM/yyyy", - D: "MMMM-dd-yy", - f: "MMMM-dd-yy h:mm tt", - F: "MMMM-dd-yy h:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "es-GT", "default", { - name: "es-GT", - englishName: "Spanish (Guatemala)", - nativeName: "Español (Guatemala)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - symbol: "Q" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fr-CH", "default", { - name: "fr-CH", - englishName: "French (Switzerland)", - nativeName: "français (Suisse)", - language: "fr", - numberFormat: { - ",": "'", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "fr." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "hr-BA", "default", { - name: "hr-BA", - englishName: "Croatian (Latin, Bosnia and Herzegovina)", - nativeName: "hrvatski (Bosna i Hercegovina)", - language: "hr", - numberFormat: { - pattern: ["- n"], - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["sijeÄanj","veljaÄa","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - monthsGenitive: { - names: ["sijeÄnja","veljaÄe","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""], - namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy.", - D: "d. MMMM yyyy.", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy. H:mm", - F: "d. MMMM yyyy. H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "smj-NO", "default", { - name: "smj-NO", - englishName: "Sami, Lule (Norway)", - nativeName: "julevusámegiella (Vuodna)", - language: "smj", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["sÃ¥dnÃ¥biejvve","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"], - namesAbbr: ["sÃ¥d","mán","dis","gas","duor","bier","láv"], - namesShort: ["s","m","d","g","d","b","l"] - }, - months: { - names: ["Ã¥dÃ¥jakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bÃ¥rggemánno","ragátmánno","gÃ¥lgÃ¥dismánno","basádismánno","javllamánno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - monthsGenitive: { - names: ["Ã¥dÃ¥jakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bÃ¥rggemáno","ragátmáno","gÃ¥lgÃ¥dismáno","basádismáno","javllamáno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-DZ", "default", { - name: "ar-DZ", - englishName: "Arabic (Algeria)", - nativeName: "العربية (الجزائر)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "د.ج.\u200f" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MM/yyyy H:mm", - F: "dd/MM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MMMM/yyyy H:mm", - F: "dd/MMMM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - } - } -}); - -Globalize.addCultureInfo( "zh-MO", "default", { - name: "zh-MO", - englishName: "Chinese (Traditional, Macao S.A.R.)", - nativeName: "䏿–‡(澳門特別行政å€)", - language: "zh-CHT", - numberFormat: { - "NaN": "éžæ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "MOP" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "de-LI", "default", { - name: "de-LI", - englishName: "German (Liechtenstein)", - nativeName: "Deutsch (Liechtenstein)", - language: "de", - numberFormat: { - ",": "'", - "NaN": "n. def.", - negativeInfinity: "-unendlich", - positiveInfinity: "+unendlich", - percent: { - pattern: ["-n%","n%"], - ",": "'" - }, - currency: { - pattern: ["$-n","$ n"], - ",": "'", - symbol: "CHF" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], - namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], - namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] - }, - months: { - names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], - namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] - }, - AM: null, - PM: null, - eras: [{"name":"n. Chr.","start":null,"offset":0}], - patterns: { - d: "dd.MM.yyyy", - D: "dddd, d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd, d. MMMM yyyy HH:mm", - F: "dddd, d. MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "en-NZ", "default", { - name: "en-NZ", - englishName: "English (New Zealand)", - nativeName: "English (New Zealand)", - numberFormat: { - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - patterns: { - d: "d/MM/yyyy", - D: "dddd, d MMMM yyyy", - f: "dddd, d MMMM yyyy h:mm tt", - F: "dddd, d MMMM yyyy h:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-CR", "default", { - name: "es-CR", - englishName: "Spanish (Costa Rica)", - nativeName: "Español (Costa Rica)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - ",": ".", - ".": ",", - symbol: "â‚¡" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fr-LU", "default", { - name: "fr-LU", - englishName: "French (Luxembourg)", - nativeName: "français (Luxembourg)", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "bs-Latn-BA", "default", { - name: "bs-Latn-BA", - englishName: "Bosnian (Latin, Bosnia and Herzegovina)", - nativeName: "bosanski (Bosna i Hercegovina)", - language: "bs-Latn", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "smj-SE", "default", { - name: "smj-SE", - englishName: "Sami, Lule (Sweden)", - nativeName: "julevusámegiella (Svierik)", - language: "smj", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"], - namesAbbr: ["ájl","mán","dis","gas","duor","bier","láv"], - namesShort: ["á","m","d","g","d","b","l"] - }, - months: { - names: ["Ã¥dÃ¥jakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bÃ¥rggemánno","ragátmánno","gÃ¥lgÃ¥dismánno","basádismánno","javllamánno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - monthsGenitive: { - names: ["Ã¥dÃ¥jakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bÃ¥rggemáno","ragátmáno","gÃ¥lgÃ¥dismáno","basádismáno","javllamáno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-MA", "default", { - name: "ar-MA", - englishName: "Arabic (Morocco)", - nativeName: "العربية (المملكة المغربية)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "د.Ù….\u200f" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MM/yyyy H:mm", - F: "dd/MM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MMMM/yyyy H:mm", - F: "dd/MMMM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - } - } -}); - -Globalize.addCultureInfo( "en-IE", "default", { - name: "en-IE", - englishName: "English (Ireland)", - nativeName: "English (Ireland)", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - AM: null, - PM: null, - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-PA", "default", { - name: "es-PA", - englishName: "Spanish (Panama)", - nativeName: "Español (Panamá)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["($ n)","$ n"], - symbol: "B/." - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "fr-MC", "default", { - name: "fr-MC", - englishName: "French (Monaco)", - nativeName: "français (Principauté de Monaco)", - language: "fr", - numberFormat: { - ",": " ", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: null, - PM: null, - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd d MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dddd d MMMM yyyy HH:mm", - F: "dddd d MMMM yyyy HH:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Latn-BA", "default", { - name: "sr-Latn-BA", - englishName: "Serbian (Latin, Bosnia and Herzegovina)", - nativeName: "srpski (Bosna i Hercegovina)", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sma-NO", "default", { - name: "sma-NO", - englishName: "Sami, Southern (Norway)", - nativeName: "Ã¥arjelsaemiengiele (Nöörje)", - language: "sma", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-%n","%n"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["aejlege","mÃ¥anta","dæjsta","gaskevÃ¥hkoe","duarsta","bearjadahke","laavvardahke"], - namesAbbr: ["aej","mÃ¥a","dæj","gask","duar","bearj","laav"], - namesShort: ["a","m","d","g","d","b","l"] - }, - months: { - names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - monthsGenitive: { - names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-TN", "default", { - name: "ar-TN", - englishName: "Arabic (Tunisia)", - nativeName: "العربية (تونس)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "د.ت.\u200f" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MM/yyyy H:mm", - F: "dd/MM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd/MMMM/yyyy H:mm", - F: "dd/MMMM/yyyy H:mm:ss", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, MMMM dd, yyyy H:mm", - F: "dddd, MMMM dd, yyyy H:mm:ss" - } - } - } -}); - -Globalize.addCultureInfo( "en-ZA", "default", { - name: "en-ZA", - englishName: "English (South Africa)", - nativeName: "English (South Africa)", - numberFormat: { - ",": " ", - percent: { - pattern: ["-n%","n%"], - ",": " " - }, - currency: { - pattern: ["$-n","$ n"], - ",": " ", - ".": ",", - symbol: "R" - } - }, - calendars: { - standard: { - patterns: { - d: "yyyy/MM/dd", - D: "dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM yyyy hh:mm tt", - F: "dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-DO", "default", { - name: "es-DO", - englishName: "Spanish (Dominican Republic)", - nativeName: "Español (República Dominicana)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - symbol: "RD$" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Cyrl-BA", "default", { - name: "sr-Cyrl-BA", - englishName: "Serbian (Cyrillic, Bosnia and Herzegovina)", - nativeName: "ÑрпÑки (БоÑна и Херцеговина)", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "КМ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["н","п","у","Ñ","ч","п","Ñ"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "sma-SE", "default", { - name: "sma-SE", - englishName: "Sami, Southern (Sweden)", - nativeName: "Ã¥arjelsaemiengiele (Sveerje)", - language: "sma", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["aejlege","mÃ¥anta","dæjsta","gaskevÃ¥hkoe","duarsta","bearjadahke","laavvardahke"], - namesAbbr: ["aej","mÃ¥a","dæj","gask","duar","bearj","laav"], - namesShort: ["a","m","d","g","d","b","l"] - }, - months: { - names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - monthsGenitive: { - names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-OM", "default", { - name: "ar-OM", - englishName: "Arabic (Oman)", - nativeName: "العربية (عمان)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "ر.ع.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "en-JM", "default", { - name: "en-JM", - englishName: "English (Jamaica)", - nativeName: "English (Jamaica)", - numberFormat: { - currency: { - pattern: ["-$n","$n"], - symbol: "J$" - } - }, - calendars: { - standard: { - patterns: { - d: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "es-VE", "default", { - name: "es-VE", - englishName: "Spanish (Bolivarian Republic of Venezuela)", - nativeName: "Español (Republica Bolivariana de Venezuela)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": ".", - ".": ",", - symbol: "Bs. F." - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "bs-Cyrl-BA", "default", { - name: "bs-Cyrl-BA", - englishName: "Bosnian (Cyrillic, Bosnia and Herzegovina)", - nativeName: "боÑанÑки (БоÑна и Херцеговина)", - language: "bs-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "КМ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недјеља","понедјељак","уторак","Ñриједа","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["н","п","у","Ñ","ч","п","Ñ"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "sms-FI", "default", { - name: "sms-FI", - englishName: "Sami, Skolt (Finland)", - nativeName: "sääm´ǩiõll (Lää´ddjânnam)", - language: "sms", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"], - namesAbbr: ["pâ","vu","mâ","se","ne","pi","su"], - namesShort: ["p","v","m","s","n","p","s"] - }, - months: { - names: ["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhÄÄmään","vue´ssmään","Ç©ie´ssmään","suei´nnmään","på´rǧǧmään","ÄõhÄÄmään","kÃ¥lggmään","skamm´mään","rosttovmään",""], - namesAbbr: ["oÄ‘jm","tä´lvv","pâzl","njuh","vue","Ç©ie","suei","på´r","Äõh","kÃ¥lg","ska","rost",""] - }, - monthsGenitive: { - names: ["ođđee´jjmannu","tä´lvvmannu","pâ´zzlâšttammannu","njuhÄÄmannu","vue´ssmannu","Ç©ie´ssmannu","suei´nnmannu","på´rǧǧmannu","ÄõhÄÄmannu","kÃ¥lggmannu","skamm´mannu","rosttovmannu",""], - namesAbbr: ["oÄ‘jm","tä´lvv","pâzl","njuh","vue","Ç©ie","suei","på´r","Äõh","kÃ¥lg","ska","rost",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. p. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. p. 'yyyy H:mm", - F: "MMMM d'. p. 'yyyy H:mm:ss", - M: "MMMM d'. p. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-YE", "default", { - name: "ar-YE", - englishName: "Arabic (Yemen)", - nativeName: "العربية (اليمن)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "ر.ÙŠ.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "en-029", "default", { - name: "en-029", - englishName: "English (Caribbean)", - nativeName: "English (Caribbean)", - numberFormat: { - currency: { - pattern: ["-$n","$n"] - } - }, - calendars: { - standard: { - firstDay: 1, - patterns: { - d: "MM/dd/yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-CO", "default", { - name: "es-CO", - englishName: "Spanish (Colombia)", - nativeName: "Español (Colombia)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Latn-RS", "default", { - name: "sr-Latn-RS", - englishName: "Serbian (Latin, Serbia)", - nativeName: "srpski (Srbija)", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Din." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "smn-FI", "default", { - name: "smn-FI", - englishName: "Sami, Inari (Finland)", - nativeName: "sämikielâ (Suomâ)", - language: "smn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"], - namesAbbr: ["pa","vu","ma","ko","tu","vá","lá"], - namesShort: ["p","v","m","k","t","v","l"] - }, - months: { - names: ["uđđâivemáánu","kuovâmáánu","njuhÄâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","ÄohÄâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu",""], - namesAbbr: ["uÄ‘iv","kuov","njuh","cuoÅ‹","vyes","kesi","syei","porg","Äoh","roov","ska","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. p. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. p. 'yyyy H:mm", - F: "MMMM d'. p. 'yyyy H:mm:ss", - M: "MMMM d'. p. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-SY", "default", { - name: "ar-SY", - englishName: "Arabic (Syria)", - nativeName: "العربية (سوريا)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "Ù„.س.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "en-BZ", "default", { - name: "en-BZ", - englishName: "English (Belize)", - nativeName: "English (Belize)", - numberFormat: { - currency: { - groupSizes: [3,0], - symbol: "BZ$" - } - }, - calendars: { - standard: { - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd MMMM yyyy hh:mm tt", - F: "dddd, dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-PE", "default", { - name: "es-PE", - englishName: "Spanish (Peru)", - nativeName: "Español (Perú)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["$ -n","$ n"], - symbol: "S/." - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Cyrl-RS", "default", { - name: "sr-Cyrl-RS", - englishName: "Serbian (Cyrillic, Serbia)", - nativeName: "ÑрпÑки (Србија)", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Дин." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["не","по","ут","ÑÑ€","че","пе","Ñу"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-JO", "default", { - name: "ar-JO", - englishName: "Arabic (Jordan)", - nativeName: "العربية (الأردن)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "د.ا.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "en-TT", "default", { - name: "en-TT", - englishName: "English (Trinidad and Tobago)", - nativeName: "English (Trinidad y Tobago)", - numberFormat: { - currency: { - groupSizes: [3,0], - symbol: "TT$" - } - }, - calendars: { - standard: { - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd MMMM yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd MMMM yyyy hh:mm tt", - F: "dddd, dd MMMM yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-AR", "default", { - name: "es-AR", - englishName: "Spanish (Argentina)", - nativeName: "Español (Argentina)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["$-n","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Latn-ME", "default", { - name: "sr-Latn-ME", - englishName: "Serbian (Latin, Montenegro)", - nativeName: "srpski (Crna Gora)", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-LB", "default", { - name: "ar-LB", - englishName: "Arabic (Lebanon)", - nativeName: "العربية (لبنان)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "Ù„.Ù„.\u200f" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 1, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_TransliteratedEnglish: { - name: "Gregorian_TransliteratedEnglish", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø£","ا","Ø«","Ø£","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 1, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "en-ZW", "default", { - name: "en-ZW", - englishName: "English (Zimbabwe)", - nativeName: "English (Zimbabwe)", - numberFormat: { - currency: { - symbol: "Z$" - } - } -}); - -Globalize.addCultureInfo( "es-EC", "default", { - name: "es-EC", - englishName: "Spanish (Ecuador)", - nativeName: "Español (Ecuador)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Cyrl-ME", "default", { - name: "sr-Cyrl-ME", - englishName: "Serbian (Cyrillic, Montenegro)", - nativeName: "ÑрпÑки (Црна Гора)", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["не","по","ут","ÑÑ€","че","пе","Ñу"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-KW", "default", { - name: "ar-KW", - englishName: "Arabic (Kuwait)", - nativeName: "العربية (الكويت)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "د.Ùƒ.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "en-PH", "default", { - name: "en-PH", - englishName: "English (Republic of the Philippines)", - nativeName: "English (Philippines)", - numberFormat: { - currency: { - symbol: "Php" - } - } -}); - -Globalize.addCultureInfo( "es-CL", "default", { - name: "es-CL", - englishName: "Spanish (Chile)", - nativeName: "Español (Chile)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-$ n","$ n"], - ",": ".", - ".": "," - } - }, - calendars: { - standard: { - "/": "-", - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: null, - PM: null, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd-MM-yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dddd, dd' de 'MMMM' de 'yyyy H:mm", - F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-AE", "default", { - name: "ar-AE", - englishName: "Arabic (U.A.E.)", - nativeName: "العربية (الإمارات العربية Ø§Ù„Ù…ØªØØ¯Ø©)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "د.Ø¥.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "es-UY", "default", { - name: "es-UY", - englishName: "Spanish (Uruguay)", - nativeName: "Español (Uruguay)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "$U" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-BH", "default", { - name: "ar-BH", - englishName: "Arabic (Bahrain)", - nativeName: "العربية (Ø§Ù„Ø¨ØØ±ÙŠÙ†)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - decimals: 3, - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - percent: { - decimals: 3 - }, - currency: { - pattern: ["$n-","$ n"], - decimals: 3, - symbol: "د.ب.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "es-PY", "default", { - name: "es-PY", - englishName: "Spanish (Paraguay)", - nativeName: "Español (Paraguay)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "Gs" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "ar-QA", "default", { - name: "ar-QA", - englishName: "Arabic (Qatar)", - nativeName: "العربية (قطر)", - language: "ar", - isRTL: true, - numberFormat: { - pattern: ["n-"], - "NaN": "ليس برقم", - negativeInfinity: "-لا نهاية", - positiveInfinity: "+لا نهاية", - currency: { - pattern: ["$n-","$ n"], - symbol: "ر.Ù‚.\u200f" - } - }, - calendars: { - standard: { - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - patterns: { - d: "dd/MM/yyyy", - D: "dd MMMM, yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd MMMM, yyyy hh:mm tt", - F: "dd MMMM, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - UmAlQura: { - name: "UmAlQura", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MMMM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MMMM/yyyy hh:mm tt", - F: "dd/MMMM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - _yearInfo: [ - // MonthLengthFlags, Gregorian Date - [746, -2198707200000], - [1769, -2168121600000], - [3794, -2137449600000], - [3748, -2106777600000], - [3402, -2076192000000], - [2710, -2045606400000], - [1334, -2015020800000], - [2741, -1984435200000], - [3498, -1953763200000], - [2980, -1923091200000], - [2889, -1892505600000], - [2707, -1861920000000], - [1323, -1831334400000], - [2647, -1800748800000], - [1206, -1770076800000], - [2741, -1739491200000], - [1450, -1708819200000], - [3413, -1678233600000], - [3370, -1647561600000], - [2646, -1616976000000], - [1198, -1586390400000], - [2397, -1555804800000], - [748, -1525132800000], - [1749, -1494547200000], - [1706, -1463875200000], - [1365, -1433289600000], - [1195, -1402704000000], - [2395, -1372118400000], - [698, -1341446400000], - [1397, -1310860800000], - [2994, -1280188800000], - [1892, -1249516800000], - [1865, -1218931200000], - [1621, -1188345600000], - [683, -1157760000000], - [1371, -1127174400000], - [2778, -1096502400000], - [1748, -1065830400000], - [3785, -1035244800000], - [3474, -1004572800000], - [3365, -973987200000], - [2637, -943401600000], - [685, -912816000000], - [1389, -882230400000], - [2922, -851558400000], - [2898, -820886400000], - [2725, -790300800000], - [2635, -759715200000], - [1175, -729129600000], - [2359, -698544000000], - [694, -667872000000], - [1397, -637286400000], - [3434, -606614400000], - [3410, -575942400000], - [2710, -545356800000], - [2349, -514771200000], - [605, -484185600000], - [1245, -453600000000], - [2778, -422928000000], - [1492, -392256000000], - [3497, -361670400000], - [3410, -330998400000], - [2730, -300412800000], - [1238, -269827200000], - [2486, -239241600000], - [884, -208569600000], - [1897, -177984000000], - [1874, -147312000000], - [1701, -116726400000], - [1355, -86140800000], - [2731, -55555200000], - [1370, -24883200000], - [2773, 5702400000], - [3538, 36374400000], - [3492, 67046400000], - [3401, 97632000000], - [2709, 128217600000], - [1325, 158803200000], - [2653, 189388800000], - [1370, 220060800000], - [2773, 250646400000], - [1706, 281318400000], - [1685, 311904000000], - [1323, 342489600000], - [2647, 373075200000], - [1198, 403747200000], - [2422, 434332800000], - [1388, 465004800000], - [2901, 495590400000], - [2730, 526262400000], - [2645, 556848000000], - [1197, 587433600000], - [2397, 618019200000], - [730, 648691200000], - [1497, 679276800000], - [3506, 709948800000], - [2980, 740620800000], - [2890, 771206400000], - [2645, 801792000000], - [693, 832377600000], - [1397, 862963200000], - [2922, 893635200000], - [3026, 924307200000], - [3012, 954979200000], - [2953, 985564800000], - [2709, 1016150400000], - [1325, 1046736000000], - [1453, 1077321600000], - [2922, 1107993600000], - [1748, 1138665600000], - [3529, 1169251200000], - [3474, 1199923200000], - [2726, 1230508800000], - [2390, 1261094400000], - [686, 1291680000000], - [1389, 1322265600000], - [874, 1352937600000], - [2901, 1383523200000], - [2730, 1414195200000], - [2381, 1444780800000], - [1181, 1475366400000], - [2397, 1505952000000], - [698, 1536624000000], - [1461, 1567209600000], - [1450, 1597881600000], - [3413, 1628467200000], - [2714, 1659139200000], - [2350, 1689724800000], - [622, 1720310400000], - [1373, 1750896000000], - [2778, 1781568000000], - [1748, 1812240000000], - [1701, 1842825600000], - [0, 1873411200000] - ], - minDate: -2198707200000, - maxDate: 1873411199999, - toGregorian: function(hyear, hmonth, hday) { - var days = hday - 1, - gyear = hyear - 1318; - if (gyear < 0 || gyear >= this._yearInfo.length) return null; - var info = this._yearInfo[gyear], - gdate = new Date(info[1]), - monthLength = info[0]; - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the gregorian date in the same timezone, - // not what the gregorian date was at GMT time, so we adjust for the offset. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - for (var i = 0; i < hmonth; i++) { - days += 29 + (monthLength & 1); - monthLength = monthLength >> 1; - } - gdate.setDate(gdate.getDate() + days); - return gdate; - }, - fromGregorian: function(gdate) { - // Date's ticks in javascript are always from the GMT time, - // but we are interested in the hijri date in the same timezone, - // not what the hijri date was at GMT time, so we adjust for the offset. - var ticks = gdate - gdate.getTimezoneOffset() * 60000; - if (ticks < this.minDate || ticks > this.maxDate) return null; - var hyear = 0, - hmonth = 1; - // find the earliest gregorian date in the array that is greater than or equal to the given date - while (ticks > this._yearInfo[++hyear][1]) { } - if (ticks !== this._yearInfo[hyear][1]) { - hyear--; - } - var info = this._yearInfo[hyear], - // how many days has it been since the date we found in the array? - // 86400000 = ticks per day - days = Math.floor((ticks - info[1]) / 86400000), - monthLength = info[0]; - hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N - // now increment day/month based on the total days, considering - // how many days are in each month. We cannot run past the year - // mark since we would have found a different array entry in that case. - var daysInMonth = 29 + (monthLength & 1); - while (days >= daysInMonth) { - days -= daysInMonth; - monthLength = monthLength >> 1; - daysInMonth = 29 + (monthLength & 1); - hmonth++; - } - // remaining days is less than is in one month, thus is the day of the month we landed on - // hmonth-1 because in javascript months are zero based, stay consistent with that. - return [hyear, hmonth - 1, days + 1]; - } - } - }, - Hijri: { - name: "Hijri", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""], - namesAbbr: ["Ù…ØØ±Ù…","ØµÙØ±","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","Ø°ÙˆÂ Ø§Ù„ØØ¬Ø©",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"بعد الهجرة","start":null,"offset":0}], - twoDigitYearMax: 1451, - patterns: { - d: "dd/MM/yy", - D: "dd/MM/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dd/MM/yyyy hh:mm tt", - F: "dd/MM/yyyy hh:mm:ss tt", - M: "dd MMMM" - }, - convert: { - // Adapted to Script from System.Globalization.HijriCalendar - ticks1970: 62135596800000, - // number of days leading up to each month - monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355], - minDate: -42521673600000, - maxDate: 253402300799999, - // The number of days to add or subtract from the calendar to accommodate the variances - // in the start and the end of Ramadan and to accommodate the date difference between - // countries/regions. May be dynamically adjusted based on user preference, but should - // remain in the range of -2 to 2, inclusive. - hijriAdjustment: 0, - toGregorian: function(hyear, hmonth, hday) { - var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment; - // 86400000 = ticks per day - var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970); - // adjust for timezone, because we are interested in the gregorian date for the same timezone - // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base - // date in the current timezone. - gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset()); - return gdate; - }, - fromGregorian: function(gdate) { - if ((gdate < this.minDate) || (gdate > this.maxDate)) return null; - var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000, - daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment; - // very particular formula determined by someone smart, adapted from the server-side implementation. - // it approximates the hijri year. - var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1, - absDays = this.daysToYear(hyear), - daysInYear = this.isLeapYear(hyear) ? 355 : 354; - // hyear is just approximate, it may need adjustment up or down by 1. - if (daysSinceJan0101 < absDays) { - hyear--; - absDays -= daysInYear; - } - else if (daysSinceJan0101 === absDays) { - hyear--; - absDays = this.daysToYear(hyear); - } - else { - if (daysSinceJan0101 > (absDays + daysInYear)) { - absDays += daysInYear; - hyear++; - } - } - // determine month by looking at how many days into the hyear we are - // monthDays contains the number of days up to each month. - hmonth = 0; - var daysIntoYear = daysSinceJan0101 - absDays; - while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) { - hmonth++; - } - hmonth--; - hday = daysIntoYear - this.monthDays[hmonth]; - return [hyear, hmonth, hday]; - }, - daysToYear: function(year) { - // calculates how many days since Jan 1, 0001 - var yearsToYear30 = Math.floor((year - 1) / 30) * 30, - yearsInto30 = year - yearsToYear30 - 1, - days = Math.floor((yearsToYear30 * 10631) / 30) + 227013; - while (yearsInto30 > 0) { - days += (this.isLeapYear(yearsInto30) ? 355 : 354); - yearsInto30--; - } - return days; - }, - isLeapYear: function(year) { - return ((((year * 11) + 14) % 30) < 11); - } - } - }, - Gregorian_MiddleEastFrench: { - name: "Gregorian_MiddleEastFrench", - firstDay: 6, - days: { - names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], - namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], - namesShort: ["di","lu","ma","me","je","ve","sa"] - }, - months: { - names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], - namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"ap. J.-C.","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt", - M: "dd MMMM" - } - }, - Gregorian_Arabic: { - name: "Gregorian_Arabic", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""], - namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","ØØ²ÙŠØ±Ø§Ù†","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - }, - Gregorian_TransliteratedFrench: { - name: "Gregorian_TransliteratedFrench", - firstDay: 6, - days: { - names: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesAbbr: ["Ø§Ù„Ø£ØØ¯","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"], - namesShort: ["Ø","Ù†","Ø«","ر","Ø®","ج","س"] - }, - months: { - names: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""], - namesAbbr: ["جانÙييه","ÙÙŠÙØ±ÙŠÙŠÙ‡","مارس","Ø£ÙØ±ÙŠÙ„","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوÙمبر","ديسمبر",""] - }, - AM: ["ص","ص","ص"], - PM: ["Ù…","Ù…","Ù…"], - eras: [{"name":"Ù…","start":null,"offset":0}], - patterns: { - d: "MM/dd/yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, MMMM dd, yyyy hh:mm tt", - F: "dddd, MMMM dd, yyyy hh:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "en-IN", "default", { - name: "en-IN", - englishName: "English (India)", - nativeName: "English (India)", - numberFormat: { - groupSizes: [3,2], - percent: { - groupSizes: [3,2] - }, - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,2], - symbol: "Rs." - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "dd MMMM yyyy HH:mm", - F: "dd MMMM yyyy HH:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "es-BO", "default", { - name: "es-BO", - englishName: "Spanish (Bolivia)", - nativeName: "Español (Bolivia)", - language: "es", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["($ n)","$ n"], - ",": ".", - ".": ",", - symbol: "$b" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "en-MY", "default", { - name: "en-MY", - englishName: "English (Malaysia)", - nativeName: "English (Malaysia)", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "RM" - } - }, - calendars: { - standard: { - days: { - namesShort: ["S","M","T","W","T","F","S"] - }, - patterns: { - d: "d/M/yyyy", - D: "dddd, d MMMM, yyyy", - f: "dddd, d MMMM, yyyy h:mm tt", - F: "dddd, d MMMM, yyyy h:mm:ss tt", - M: "d MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "es-SV", "default", { - name: "es-SV", - englishName: "Spanish (El Salvador)", - nativeName: "Español (El Salvador)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "en-SG", "default", { - name: "en-SG", - englishName: "English (Singapore)", - nativeName: "English (Singapore)", - numberFormat: { - percent: { - pattern: ["-n%","n%"] - } - }, - calendars: { - standard: { - days: { - namesShort: ["S","M","T","W","T","F","S"] - }, - patterns: { - d: "d/M/yyyy", - D: "dddd, d MMMM, yyyy", - f: "dddd, d MMMM, yyyy h:mm tt", - F: "dddd, d MMMM, yyyy h:mm:ss tt", - M: "d MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "es-HN", "default", { - name: "es-HN", - englishName: "Spanish (Honduras)", - nativeName: "Español (Honduras)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["$ -n","$ n"], - groupSizes: [3,0], - symbol: "L." - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-NI", "default", { - name: "es-NI", - englishName: "Spanish (Nicaragua)", - nativeName: "Español (Nicaragua)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["($ n)","$ n"], - groupSizes: [3,0], - symbol: "C$" - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-PR", "default", { - name: "es-PR", - englishName: "Spanish (Puerto Rico)", - nativeName: "Español (Puerto Rico)", - language: "es", - numberFormat: { - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - currency: { - pattern: ["($ n)","$ n"], - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sá"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - AM: ["a.m.","a.m.","A.M."], - PM: ["p.m.","p.m.","P.M."], - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - d: "dd/MM/yyyy", - D: "dddd, dd' de 'MMMM' de 'yyyy", - t: "hh:mm tt", - T: "hh:mm:ss tt", - f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt", - F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt", - M: "dd MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "es-US", "default", { - name: "es-US", - englishName: "Spanish (United States)", - nativeName: "Español (Estados Unidos)", - language: "es", - numberFormat: { - groupSizes: [3,0], - "NaN": "NeuN", - negativeInfinity: "-Infinito", - positiveInfinity: "Infinito", - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"], - namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"], - namesShort: ["do","lu","ma","mi","ju","vi","sa"] - }, - months: { - names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""], - namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""] - }, - eras: [{"name":"d.C.","start":null,"offset":0}], - patterns: { - M: "dd' de 'MMMM", - Y: "MMMM' de 'yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "bs-Cyrl", "default", { - name: "bs-Cyrl", - englishName: "Bosnian (Cyrillic)", - nativeName: "боÑанÑки", - language: "bs-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "КМ" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недјеља","понедјељак","уторак","Ñриједа","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["н","п","у","Ñ","ч","п","Ñ"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "bs-Latn", "default", { - name: "bs-Latn", - englishName: "Bosnian (Latin)", - nativeName: "bosanski", - language: "bs-Latn", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Cyrl", "default", { - name: "sr-Cyrl", - englishName: "Serbian (Cyrillic)", - nativeName: "ÑрпÑки", - language: "sr-Cyrl", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-беÑконачноÑÑ‚", - positiveInfinity: "+беÑконачноÑÑ‚", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Дин." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["недеља","понедељак","уторак","Ñреда","четвртак","петак","Ñубота"], - namesAbbr: ["нед","пон","уто","Ñре","чет","пет","Ñуб"], - namesShort: ["не","по","ут","ÑÑ€","че","пе","Ñу"] - }, - months: { - names: ["јануар","фебруар","март","април","мај","јун","јул","авгуÑÑ‚","Ñептембар","октобар","новембар","децембар",""], - namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","Ñеп","окт","нов","дец",""] - }, - AM: null, - PM: null, - eras: [{"name":"н.е.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr-Latn", "default", { - name: "sr-Latn", - englishName: "Serbian (Latin)", - nativeName: "srpski", - language: "sr-Latn", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Din." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "smn", "default", { - name: "smn", - englishName: "Sami (Inari)", - nativeName: "sämikielâ", - language: "smn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"], - namesAbbr: ["pa","vu","ma","ko","tu","vá","lá"], - namesShort: ["p","v","m","k","t","v","l"] - }, - months: { - names: ["uđđâivemáánu","kuovâmáánu","njuhÄâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","ÄohÄâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu",""], - namesAbbr: ["uÄ‘iv","kuov","njuh","cuoÅ‹","vyes","kesi","syei","porg","Äoh","roov","ska","juov",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. p. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. p. 'yyyy H:mm", - F: "MMMM d'. p. 'yyyy H:mm:ss", - M: "MMMM d'. p. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "az-Cyrl", "default", { - name: "az-Cyrl", - englishName: "Azeri (Cyrillic)", - nativeName: "Ðзәрбајҹан дили", - language: "az-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "ман." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Базар","Базар ертәÑи","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"], - namesAbbr: ["Б","Бе","Ча","Ч","Ҹа","Ò¸","Ш"], - namesShort: ["Б","Бе","Ча","Ч","Ҹа","Ò¸","Ш"] - }, - months: { - names: ["Јанвар","Феврал","Март","Ðпрел","Мај","Ијун","Ијул","ÐвгуÑÑ‚","Сентјабр","Октјабр","Ðојабр","Декабр",""], - namesAbbr: ["Јан","Фев","Мар","Ðпр","Мај","Ијун","Ијул","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["јанвар","феврал","март","апрел","мај","ијун","ијул","авгуÑÑ‚","Ñентјабр","октјабр","нојабр","декабр",""], - namesAbbr: ["Јан","Фев","Мар","Ðпр","маÑ","ијун","ијул","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sms", "default", { - name: "sms", - englishName: "Sami (Skolt)", - nativeName: "sääm´ǩiõll", - language: "sms", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"], - namesAbbr: ["pâ","vu","mâ","se","ne","pi","su"], - namesShort: ["p","v","m","s","n","p","s"] - }, - months: { - names: ["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhÄÄmään","vue´ssmään","Ç©ie´ssmään","suei´nnmään","på´rǧǧmään","ÄõhÄÄmään","kÃ¥lggmään","skamm´mään","rosttovmään",""], - namesAbbr: ["oÄ‘jm","tä´lvv","pâzl","njuh","vue","Ç©ie","suei","på´r","Äõh","kÃ¥lg","ska","rost",""] - }, - monthsGenitive: { - names: ["ođđee´jjmannu","tä´lvvmannu","pâ´zzlâšttammannu","njuhÄÄmannu","vue´ssmannu","Ç©ie´ssmannu","suei´nnmannu","på´rǧǧmannu","ÄõhÄÄmannu","kÃ¥lggmannu","skamm´mannu","rosttovmannu",""], - namesAbbr: ["oÄ‘jm","tä´lvv","pâzl","njuh","vue","Ç©ie","suei","på´r","Äõh","kÃ¥lg","ska","rost",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "MMMM d'. p. 'yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "MMMM d'. p. 'yyyy H:mm", - F: "MMMM d'. p. 'yyyy H:mm:ss", - M: "MMMM d'. p. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "zh", "default", { - name: "zh", - englishName: "Chinese", - nativeName: "䏿–‡", - language: "zh", - numberFormat: { - "NaN": "éžæ•°å—", - negativeInfinity: "è´Ÿæ— ç©·å¤§", - positiveInfinity: "æ£æ— 穷大", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "nn", "default", { - name: "nn", - englishName: "Norwegian (Nynorsk)", - nativeName: "norsk (nynorsk)", - language: "nn", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mÃ¥ndag","tysdag","onsdag","torsdag","fredag","laurdag"], - namesAbbr: ["sø","mÃ¥","ty","on","to","fr","la"], - namesShort: ["sø","mÃ¥","ty","on","to","fr","la"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "bs", "default", { - name: "bs", - englishName: "Bosnian", - nativeName: "bosanski", - language: "bs", - numberFormat: { - ",": ".", - ".": ",", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "KM" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sri","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "az-Latn", "default", { - name: "az-Latn", - englishName: "Azeri (Latin)", - nativeName: "AzÉ™rbaycan\xadılı", - language: "az-Latn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "man." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Bazar","Bazar ertÉ™si","ÇərÅŸÉ™nbə axÅŸamı","ÇərÅŸÉ™nbÉ™","Cümə axÅŸamı","CümÉ™","ŞənbÉ™"], - namesAbbr: ["B","Be","Ça","Ç","Ca","C","Åž"], - namesShort: ["B","Be","Ça","Ç","Ca","C","Åž"] - }, - months: { - names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - monthsGenitive: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - M: "d MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sma", "default", { - name: "sma", - englishName: "Sami (Southern)", - nativeName: "Ã¥arjelsaemiengiele", - language: "sma", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["aejlege","mÃ¥anta","dæjsta","gaskevÃ¥hkoe","duarsta","bearjadahke","laavvardahke"], - namesAbbr: ["aej","mÃ¥a","dæj","gask","duar","bearj","laav"], - namesShort: ["a","m","d","g","d","b","l"] - }, - months: { - names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - monthsGenitive: { - names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""], - namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "uz-Cyrl", "default", { - name: "uz-Cyrl", - englishName: "Uzbek (Cyrillic)", - nativeName: "Ўзбек", - language: "uz-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": " ", - ".": ",", - symbol: "Ñўм" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["Ñкшанба","душанба","Ñешанба","чоршанба","пайшанба","жума","шанба"], - namesAbbr: ["Ñкш","дш","Ñш","чш","пш","ж","ш"], - namesShort: ["Ñ","д","Ñ","ч","п","ж","ш"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвар","феврал","март","апрел","май","июн","июл","авгуÑÑ‚","ÑентÑбр","октÑбр","ноÑбр","декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","маÑ","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "yyyy 'йил' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'йил' d-MMMM HH:mm", - F: "yyyy 'йил' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "mn-Cyrl", "default", { - name: "mn-Cyrl", - englishName: "Mongolian (Cyrillic)", - nativeName: "Монгол хÑл", - language: "mn-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n$","n$"], - ",": " ", - ".": ",", - symbol: "â‚®" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["ÐÑм","Даваа","МÑгмар","Лхагва","ПүрÑв","БааÑан","БÑмба"], - namesAbbr: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"], - namesShort: ["ÐÑ","Да","МÑ","Лх","Пү","Ба","БÑ"] - }, - months: { - names: ["1 дүгÑÑр Ñар","2 дугаар Ñар","3 дугаар Ñар","4 дүгÑÑр Ñар","5 дугаар Ñар","6 дугаар Ñар","7 дугаар Ñар","8 дугаар Ñар","9 дүгÑÑр Ñар","10 дугаар Ñар","11 дүгÑÑр Ñар","12 дугаар Ñар",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - monthsGenitive: { - names: ["1 дүгÑÑр Ñарын","2 дугаар Ñарын","3 дугаар Ñарын","4 дүгÑÑр Ñарын","5 дугаар Ñарын","6 дугаар Ñарын","7 дугаар Ñарын","8 дугаар Ñарын","9 дүгÑÑр Ñарын","10 дугаар Ñарын","11 дүгÑÑр Ñарын","12 дугаар Ñарын",""], - namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""] - }, - AM: null, - PM: null, - patterns: { - d: "yy.MM.dd", - D: "yyyy 'оны' MMMM d", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy 'оны' MMMM d H:mm", - F: "yyyy 'оны' MMMM d H:mm:ss", - M: "d MMMM", - Y: "yyyy 'он' MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "iu-Cans", "default", { - name: "iu-Cans", - englishName: "Inuktitut (Syllabics)", - nativeName: "áƒá“„ᒃᑎá‘ᑦ", - language: "iu-Cans", - numberFormat: { - groupSizes: [3,0], - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["ᓈᑦá‘á–‘á”","ᓇᒡá’ᔾá”á…","áŠáƒá‘‰á±á–…","á±á–“ᑦᓯᖅ","ᓯᑕᒻᒥᖅ","ᑕᓪᓕá•ᒥᖅ","ᓯᕙᑖá•á••á’ƒ"], - namesAbbr: ["ᓈᑦá‘","ᓇᒡá’","áŠáƒá‘‰á±","á±á–“ᑦᓯ","ᓯᑕ","ᑕᓪᓕ","ᓯᕙᑖá•á••á’ƒ"], - namesShort: ["ᓈ","ᓇ","áŠ","á±","ᓯ","á‘•","ᓯ"] - }, - months: { - names: ["á”®á“á“„áŠá•†","á•–á•á•—áŠá•†","ᒫᑦᓯ","á„á³á•†","á’ªáƒ","ᔫᓂ","ᔪᓚáƒ","á‹á’¡á’Œá“¯","ᓯᑎá±á•†","á…á‘á±á•†","á“„á••á±á•†","ᑎᓯá±á•†",""], - namesAbbr: ["á”®á“á“„","á•–á•á•—","ᒫᑦᓯ","á„á³á•†","á’ªáƒ","ᔫᓂ","ᔪᓚáƒ","á‹á’¡á’Œ","ᓯᑎá±","á…á‘á±","á“„á••á±","ᑎᓯá±",""] - }, - patterns: { - d: "d/M/yyyy", - D: "dddd,MMMM dd,yyyy", - f: "dddd,MMMM dd,yyyy h:mm tt", - F: "dddd,MMMM dd,yyyy h:mm:ss tt", - Y: "MMMM,yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "zh-Hant", "default", { - name: "zh-Hant", - englishName: "Chinese (Traditional)", - nativeName: "䏿–‡(ç¹é«”)", - language: "zh-Hant", - numberFormat: { - "NaN": "éžæ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "HK$" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "nb", "default", { - name: "nb", - englishName: "Norwegian (BokmÃ¥l)", - nativeName: "norsk (bokmÃ¥l)", - language: "nb", - numberFormat: { - ",": " ", - ".": ",", - negativeInfinity: "-INF", - positiveInfinity: "INF", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["$ -n","$ n"], - ",": " ", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"], - namesAbbr: ["sø","ma","ti","on","to","fr","lø"], - namesShort: ["sø","ma","ti","on","to","fr","lø"] - }, - months: { - names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""], - namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yyyy", - D: "d. MMMM yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "d. MMMM yyyy HH:mm", - F: "d. MMMM yyyy HH:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "sr", "default", { - name: "sr", - englishName: "Serbian", - nativeName: "srpski", - language: "sr", - numberFormat: { - ",": ".", - ".": ",", - negativeInfinity: "-beskonaÄnost", - positiveInfinity: "+beskonaÄnost", - percent: { - pattern: ["-n%","n%"], - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "Din." - } - }, - calendars: { - standard: { - "/": ".", - firstDay: 1, - days: { - names: ["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","subota"], - namesAbbr: ["ned","pon","uto","sre","Äet","pet","sub"], - namesShort: ["ne","po","ut","sr","Äe","pe","su"] - }, - months: { - names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""], - namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"n.e.","start":null,"offset":0}], - patterns: { - d: "d.M.yyyy", - D: "d. MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d. MMMM yyyy H:mm", - F: "d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "tg-Cyrl", "default", { - name: "tg-Cyrl", - englishName: "Tajik (Cyrillic)", - nativeName: "Тоҷикӣ", - language: "tg-Cyrl", - numberFormat: { - ",": " ", - ".": ",", - groupSizes: [3,0], - negativeInfinity: "-беÑконечноÑть", - positiveInfinity: "беÑконечноÑть", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - groupSizes: [3,0], - ",": " ", - ".": ";", - symbol: "Ñ‚.Ñ€." - } - }, - calendars: { - standard: { - "/": ".", - days: { - names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"], - namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"], - namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"] - }, - months: { - names: ["Январ","Феврал","Март","Ðпрел","Май","Июн","Июл","ÐвгуÑÑ‚","СентÑбр","ОктÑбр","ÐоÑбр","Декабр",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - monthsGenitive: { - names: ["Ñнвари","феврали","марти","апрели","маи","июни","июли","авгуÑти","ÑентÑбри","октÑбри","ноÑбри","декабри",""], - namesAbbr: ["Янв","Фев","Мар","Ðпр","Май","Июн","Июл","Ðвг","Сен","Окт","ÐоÑ","Дек",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd.MM.yy", - D: "d MMMM yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "d MMMM yyyy H:mm", - F: "d MMMM yyyy H:mm:ss", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "dsb", "default", { - name: "dsb", - englishName: "Lower Sorbian", - nativeName: "dolnoserbšćina", - language: "dsb", - numberFormat: { - ",": ".", - ".": ",", - "NaN": "njedefinowane", - negativeInfinity: "-njekoÅ„cne", - positiveInfinity: "+njekoÅ„cne", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "€" - } - }, - calendars: { - standard: { - "/": ". ", - firstDay: 1, - days: { - names: ["njeźela","ponjeźele","waÅ‚tora","srjoda","stwortk","pÄ›tk","sobota"], - namesAbbr: ["nje","pon","waÅ‚","srj","stw","pÄ›t","sob"], - namesShort: ["n","p","w","s","s","p","s"] - }, - months: { - names: ["januar","februar","mÄ›rc","apryl","maj","junij","julij","awgust","september","oktober","nowember","december",""], - namesAbbr: ["jan","feb","mÄ›r","apr","maj","jun","jul","awg","sep","okt","now","dec",""] - }, - monthsGenitive: { - names: ["januara","februara","mÄ›rca","apryla","maja","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""], - namesAbbr: ["jan","feb","mÄ›r","apr","maj","jun","jul","awg","sep","okt","now","dec",""] - }, - AM: null, - PM: null, - eras: [{"name":"po Chr.","start":null,"offset":0}], - patterns: { - d: "d. M. yyyy", - D: "dddd, 'dnja' d. MMMM yyyy", - t: "H.mm 'goź.'", - T: "H:mm:ss", - f: "dddd, 'dnja' d. MMMM yyyy H.mm 'goź.'", - F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss", - M: "d. MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "smj", "default", { - name: "smj", - englishName: "Sami (Lule)", - nativeName: "julevusámegiella", - language: "smj", - numberFormat: { - ",": " ", - ".": ",", - percent: { - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - ",": ".", - ".": ",", - symbol: "kr" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 1, - days: { - names: ["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"], - namesAbbr: ["ájl","mán","dis","gas","duor","bier","láv"], - namesShort: ["á","m","d","g","d","b","l"] - }, - months: { - names: ["Ã¥dÃ¥jakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bÃ¥rggemánno","ragátmánno","gÃ¥lgÃ¥dismánno","basádismánno","javllamánno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - monthsGenitive: { - names: ["Ã¥dÃ¥jakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bÃ¥rggemáno","ragátmáno","gÃ¥lgÃ¥dismáno","basádismáno","javllamáno",""], - namesAbbr: ["Ã¥dÃ¥j","guov","snju","vuor","moar","bieh","snji","bÃ¥rg","ragá","gÃ¥lg","basá","javl",""] - }, - AM: null, - PM: null, - patterns: { - d: "yyyy-MM-dd", - D: "MMMM d'. b. 'yyyy", - t: "HH:mm", - T: "HH:mm:ss", - f: "MMMM d'. b. 'yyyy HH:mm", - F: "MMMM d'. b. 'yyyy HH:mm:ss", - M: "MMMM d'. b. '", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "uz-Latn", "default", { - name: "uz-Latn", - englishName: "Uzbek (Latin)", - nativeName: "U'zbek", - language: "uz-Latn", - numberFormat: { - ",": " ", - ".": ",", - percent: { - pattern: ["-n%","n%"], - ",": " ", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - decimals: 0, - ",": " ", - ".": ",", - symbol: "so'm" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"], - namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."], - namesShort: ["ya","d","s","ch","p","j","sh"] - }, - months: { - names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""], - namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd/MM yyyy", - D: "yyyy 'yil' d-MMMM", - t: "HH:mm", - T: "HH:mm:ss", - f: "yyyy 'yil' d-MMMM HH:mm", - F: "yyyy 'yil' d-MMMM HH:mm:ss", - M: "d-MMMM", - Y: "MMMM yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "mn-Mong", "default", { - name: "mn-Mong", - englishName: "Mongolian (Traditional Mongolian)", - nativeName: "á ®á ¤á ¨á á á ¤á ¯ á ¬á ¡á ¯á ¡", - language: "mn-Mong", - numberFormat: { - groupSizes: [3,0], - "NaN": "á ²á ¤á á á á ªá ¤á °á ¤", - negativeInfinity: "á °á ¦á ¬á ¡á ·á ¬á ¦ á ¬á ¢á µá á á á ·á á ¦á ¢ á ¶á ¡á ¬á ¡", - positiveInfinity: "á ¡á ¶á ‹á ¡á ·á ¬á ¦ á ¬á ¢á µá á á á ·á á ¦á ¢ á ¶á á ¬á ¡", - percent: { - pattern: ["-n%","n%"], - groupSizes: [3,0] - }, - currency: { - pattern: ["$-n","$n"], - groupSizes: [3,0], - symbol: "Â¥" - } - }, - calendars: { - standard: { - firstDay: 1, - days: { - names: ["á á á ·á á \u202fá ¤á ¨ á ¡á ³á ¦á ·","á á á ·á á \u202fá ¤á ¨ á ¨á ¢á á ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ¬á £á ¶á á ·","á á á ·á á \u202fá ¤á ¨ á á ¤á ·á ªá á ¨","á á á ·á á \u202fá ¤á ¨ á ³á ¥á ·á ªá ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ²á á ªá ¤á ¨","á á á ·á á \u202fá ¤á ¨ á µá ¢á ·á á ¤á á á ¨"], - namesAbbr: ["á á á ·á á \u202fá ¤á ¨ á ¡á ³á ¦á ·","á á á ·á á \u202fá ¤á ¨ á ¨á ¢á á ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ¬á £á ¶á á ·","á á á ·á á \u202fá ¤á ¨ á á ¤á ·á ªá á ¨","á á á ·á á \u202fá ¤á ¨ á ³á ¥á ·á ªá ¡á ¨","á á á ·á á \u202fá ¤á ¨ á ²á á ªá ¤á ¨","á á á ·á á \u202fá ¤á ¨ á µá ¢á ·á á ¤á á á ¨"], - namesShort: ["á ¡\u200d","á ¨á ¢\u200d","á ¬á £\u200d","á á ¤\u200d","á ³á ¥\u200d","á ²á \u200d","á µá ¢\u200d"] - }, - months: { - names: ["á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ","á á ¤á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á ²á ¦á ·á ªá ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ²á á ªá ¤á ³á ¤á á á · á °á á ·á Žá ","á µá ¢á ·á á ¤á ³á ¤á á á · á °á á ·á Žá ","á ²á ¤á ¯á ¤á ³á ¤á á á · á °á á ·á Žá ","á ¨á á ¢á ®á á ³á ¤á á á · á °á á ·á Žá ","á ¶á ¢á °á ¦á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ",""], - namesAbbr: ["á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ","á á ¤á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á ²á ¦á ·á ªá ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á ²á á ªá ¤á ³á ¤á á á · á °á á ·á Žá ","á µá ¢á ·á á ¤á ³á ¤á á á · á °á á ·á Žá ","á ²á ¤á ¯á ¤á ³á ¤á á á · á °á á ·á Žá ","á ¨á á ¢á ®á á ³á ¤á á á · á °á á ·á Žá ","á ¶á ¢á °á ¦á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ³á ¤á á á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¨á ¢á á ¡á ³á ¦á á ¡á · á °á á ·á Žá ","á á ·á ªá á ¨ á ¬á ¤á ¶á ‹á á ³á ¤á á á · á °á á ·á Žá ",""] - }, - AM: null, - PM: null, - eras: [{"name":"á £á ¨ á ²á £á á á ¯á á ¯ á ¤á ¨","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·' H:mm", - F: "yyyy'á £á ¨ á ¤á ‹' M'á °á á ·á Žá \u202fá ¢á ¢á ¨ 'd' á ¤á ‹ á ¡á ³á ¦á ·' H:mm:ss", - M: "M'á °á á ·á Žá ' d'á ¡á ³á ¦á ·'", - Y: "yyyy'á £á ¨' M'á °á á ·á Žá '" - } - } - } -}); - -Globalize.addCultureInfo( "iu-Latn", "default", { - name: "iu-Latn", - englishName: "Inuktitut (Latin)", - nativeName: "Inuktitut", - language: "iu-Latn", - numberFormat: { - groupSizes: [3,0], - percent: { - groupSizes: [3,0] - } - }, - calendars: { - standard: { - days: { - names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"], - namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"], - namesShort: ["N","N","A","P","S","T","S"] - }, - months: { - names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""], - namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""] - }, - patterns: { - d: "d/MM/yyyy", - D: "ddd, MMMM dd,yyyy", - f: "ddd, MMMM dd,yyyy h:mm tt", - F: "ddd, MMMM dd,yyyy h:mm:ss tt" - } - } - } -}); - -Globalize.addCultureInfo( "tzm-Latn", "default", { - name: "tzm-Latn", - englishName: "Tamazight (Latin)", - nativeName: "Tamazight", - language: "tzm-Latn", - numberFormat: { - pattern: ["n-"], - ",": ".", - ".": ",", - "NaN": "Non Numérique", - negativeInfinity: "-Infini", - positiveInfinity: "+Infini", - percent: { - ",": ".", - ".": "," - }, - currency: { - pattern: ["-n $","n $"], - symbol: "DZD" - } - }, - calendars: { - standard: { - "/": "-", - firstDay: 6, - days: { - names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"], - namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"], - namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"] - }, - months: { - names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""], - namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""] - }, - AM: null, - PM: null, - patterns: { - d: "dd-MM-yyyy", - D: "dd MMMM, yyyy", - t: "H:mm", - T: "H:mm:ss", - f: "dd MMMM, yyyy H:mm", - F: "dd MMMM, yyyy H:mm:ss", - M: "dd MMMM" - } - } - } -}); - -Globalize.addCultureInfo( "ha-Latn", "default", { - name: "ha-Latn", - englishName: "Hausa (Latin)", - nativeName: "Hausa", - language: "ha-Latn", - numberFormat: { - currency: { - pattern: ["$-n","$ n"], - symbol: "N" - } - }, - calendars: { - standard: { - days: { - names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"], - namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"], - namesShort: ["L","L","T","L","A","J","A"] - }, - months: { - names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""], - namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""] - }, - AM: ["Safe","safe","SAFE"], - PM: ["Yamma","yamma","YAMMA"], - eras: [{"name":"AD","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy" - } - } - } -}); - -Globalize.addCultureInfo( "zh-CHS", "default", { - name: "zh-CHS", - englishName: "Chinese (Simplified) Legacy", - nativeName: "䏿–‡(简体) 旧版", - language: "zh-CHS", - numberFormat: { - "NaN": "éžæ•°å—", - negativeInfinity: "è´Ÿæ— ç©·å¤§", - positiveInfinity: "æ£æ— 穷大", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - pattern: ["$-n","$n"], - symbol: "Â¥" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["周日","周一","周二","周三","周四","周五","周å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "yyyy/M/d", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -Globalize.addCultureInfo( "zh-CHT", "default", { - name: "zh-CHT", - englishName: "Chinese (Traditional) Legacy", - nativeName: "䏿–‡(ç¹é«”) 舊版", - language: "zh-CHT", - numberFormat: { - "NaN": "éžæ•¸å—", - negativeInfinity: "è² ç„¡çª®å¤§", - positiveInfinity: "æ£ç„¡çª®å¤§", - percent: { - pattern: ["-n%","n%"] - }, - currency: { - symbol: "HK$" - } - }, - calendars: { - standard: { - days: { - names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期å…"], - namesAbbr: ["週日","週一","週二","週三","週四","週五","週å…"], - namesShort: ["æ—¥","一","二","三","å››","五","å…"] - }, - months: { - names: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""], - namesAbbr: ["一月","二月","三月","四月","五月","å…æœˆ","七月","八月","乿œˆ","åæœˆ","å一月","å二月",""] - }, - AM: ["上åˆ","上åˆ","上åˆ"], - PM: ["下åˆ","下åˆ","下åˆ"], - eras: [{"name":"公元","start":null,"offset":0}], - patterns: { - d: "d/M/yyyy", - D: "yyyy'å¹´'M'月'd'æ—¥'", - t: "H:mm", - T: "H:mm:ss", - f: "yyyy'å¹´'M'月'd'æ—¥' H:mm", - F: "yyyy'å¹´'M'月'd'æ—¥' H:mm:ss", - M: "M'月'd'æ—¥'", - Y: "yyyy'å¹´'M'月'" - } - } - } -}); - -}( this )); diff --git a/pub/lib/globalize/globalize.js b/pub/lib/globalize/globalize.js deleted file mode 100644 index 62c93cd4e4cadebc0e43bc3181660d8f94c377c7..0000000000000000000000000000000000000000 --- a/pub/lib/globalize/globalize.js +++ /dev/null @@ -1,1581 +0,0 @@ -/** - * Globalize - * - * http://github.com/jquery/globalize - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - */ - -(function( window, undefined ) { - -var Globalize, - // private variables - regexHex, - regexInfinity, - regexParseFloat, - regexTrim, - // private JavaScript utility functions - arrayIndexOf, - endsWith, - extend, - isArray, - isFunction, - isObject, - startsWith, - trim, - truncate, - zeroPad, - // private Globalization utility functions - appendPreOrPostMatch, - expandFormat, - formatDate, - formatNumber, - getTokenRegExp, - getEra, - getEraYear, - parseExact, - parseNegativePattern; - -// Global variable (Globalize) or CommonJS module (globalize) -Globalize = function( cultureSelector ) { - return new Globalize.prototype.init( cultureSelector ); -}; - -if ( typeof require !== "undefined" && - typeof exports !== "undefined" && - typeof module !== "undefined" ) { - // Assume CommonJS - module.exports = Globalize; -} else { - // Export as global variable - window.Globalize = Globalize; -} - -Globalize.cultures = {}; - -Globalize.prototype = { - constructor: Globalize, - init: function( cultureSelector ) { - this.cultures = Globalize.cultures; - this.cultureSelector = cultureSelector; - - return this; - } -}; -Globalize.prototype.init.prototype = Globalize.prototype; - -// 1. When defining a culture, all fields are required except the ones stated as optional. -// 2. Each culture should have a ".calendars" object with at least one calendar named "standard" -// which serves as the default calendar in use by that culture. -// 3. Each culture should have a ".calendar" object which is the current calendar being used, -// it may be dynamically changed at any time to one of the calendars in ".calendars". -Globalize.cultures[ "default" ] = { - // A unique name for the culture in the form <language code>-<country/region code> - name: "en", - // the name of the culture in the english language - englishName: "English", - // the name of the culture in its own language - nativeName: "English", - // whether the culture uses right-to-left text - isRTL: false, - // "language" is used for so-called "specific" cultures. - // For example, the culture "es-CL" means "Spanish, in Chili". - // It represents the Spanish-speaking culture as it is in Chili, - // which might have different formatting rules or even translations - // than Spanish in Spain. A "neutral" culture is one that is not - // specific to a region. For example, the culture "es" is the generic - // Spanish culture, which may be a more generalized version of the language - // that may or may not be what a specific culture expects. - // For a specific culture like "es-CL", the "language" field refers to the - // neutral, generic culture information for the language it is using. - // This is not always a simple matter of the string before the dash. - // For example, the "zh-Hans" culture is netural (Simplified Chinese). - // And the "zh-SG" culture is Simplified Chinese in Singapore, whose lanugage - // field is "zh-CHS", not "zh". - // This field should be used to navigate from a specific culture to it's - // more general, neutral culture. If a culture is already as general as it - // can get, the language may refer to itself. - language: "en", - // numberFormat defines general number formatting rules, like the digits in - // each grouping, the group separator, and how negative numbers are displayed. - numberFormat: { - // [negativePattern] - // Note, numberFormat.pattern has no "positivePattern" unlike percent and currency, - // but is still defined as an array for consistency with them. - // negativePattern: one of "(n)|-n|- n|n-|n -" - pattern: [ "-n" ], - // number of decimal places normally shown - decimals: 2, - // string that separates number groups, as in 1,000,000 - ",": ",", - // string that separates a number from the fractional portion, as in 1.99 - ".": ".", - // array of numbers indicating the size of each number group. - // TODO: more detailed description and example - groupSizes: [ 3 ], - // symbol used for positive numbers - "+": "+", - // symbol used for negative numbers - "-": "-", - // symbol used for NaN (Not-A-Number) - "NaN": "NaN", - // symbol used for Negative Infinity - negativeInfinity: "-Infinity", - // symbol used for Positive Infinity - positiveInfinity: "Infinity", - percent: { - // [negativePattern, positivePattern] - // negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %" - // positivePattern: one of "n %|n%|%n|% n" - pattern: [ "-n %", "n %" ], - // number of decimal places normally shown - decimals: 2, - // array of numbers indicating the size of each number group. - // TODO: more detailed description and example - groupSizes: [ 3 ], - // string that separates number groups, as in 1,000,000 - ",": ",", - // string that separates a number from the fractional portion, as in 1.99 - ".": ".", - // symbol used to represent a percentage - symbol: "%" - }, - currency: { - // [negativePattern, positivePattern] - // negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)" - // positivePattern: one of "$n|n$|$ n|n $" - pattern: [ "($n)", "$n" ], - // number of decimal places normally shown - decimals: 2, - // array of numbers indicating the size of each number group. - // TODO: more detailed description and example - groupSizes: [ 3 ], - // string that separates number groups, as in 1,000,000 - ",": ",", - // string that separates a number from the fractional portion, as in 1.99 - ".": ".", - // symbol used to represent currency - symbol: "$" - } - }, - // calendars defines all the possible calendars used by this culture. - // There should be at least one defined with name "standard", and is the default - // calendar used by the culture. - // A calendar contains information about how dates are formatted, information about - // the calendar's eras, a standard set of the date formats, - // translations for day and month names, and if the calendar is not based on the Gregorian - // calendar, conversion functions to and from the Gregorian calendar. - calendars: { - standard: { - // name that identifies the type of calendar this is - name: "Gregorian_USEnglish", - // separator of parts of a date (e.g. "/" in 11/05/1955) - "/": "/", - // separator of parts of a time (e.g. ":" in 05:44 PM) - ":": ":", - // the first day of the week (0 = Sunday, 1 = Monday, etc) - firstDay: 0, - days: { - // full day names - names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], - // abbreviated day names - namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], - // shortest day names - namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ] - }, - months: { - // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar) - names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "" ], - // abbreviated month names - namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" ] - }, - // AM and PM designators in one of these forms: - // The usual view, and the upper and lower case versions - // [ standard, lowercase, uppercase ] - // The culture does not use AM or PM (likely all standard date formats use 24 hour time) - // null - AM: [ "AM", "am", "AM" ], - PM: [ "PM", "pm", "PM" ], - eras: [ - // eras in reverse chronological order. - // name: the name of the era in this culture (e.g. A.D., C.E.) - // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era. - // offset: offset in years from gregorian calendar - { - "name": "A.D.", - "start": null, - "offset": 0 - } - ], - // when a two digit year is given, it will never be parsed as a four digit - // year greater than this year (in the appropriate era for the culture) - // Set it as a full year (e.g. 2029) or use an offset format starting from - // the current year: "+19" would correspond to 2029 if the current year 2010. - twoDigitYearMax: 2029, - // set of predefined date and time patterns used by the culture - // these represent the format someone in this culture would expect - // to see given the portions of the date that are shown. - patterns: { - // short date pattern - d: "M/d/yyyy", - // long date pattern - D: "dddd, MMMM dd, yyyy", - // short time pattern - t: "h:mm tt", - // long time pattern - T: "h:mm:ss tt", - // long date, short time pattern - f: "dddd, MMMM dd, yyyy h:mm tt", - // long date, long time pattern - F: "dddd, MMMM dd, yyyy h:mm:ss tt", - // month/day pattern - M: "MMMM dd", - // month/year pattern - Y: "yyyy MMMM", - // S is a sortable format that does not vary by culture - S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss" - } - // optional fields for each calendar: - /* - monthsGenitive: - Same as months but used when the day preceeds the month. - Omit if the culture has no genitive distinction in month names. - For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx - convert: - Allows for the support of non-gregorian based calendars. This convert object is used to - to convert a date to and from a gregorian calendar date to handle parsing and formatting. - The two functions: - fromGregorian( date ) - Given the date as a parameter, return an array with parts [ year, month, day ] - corresponding to the non-gregorian based year, month, and day for the calendar. - toGregorian( year, month, day ) - Given the non-gregorian year, month, and day, return a new Date() object - set to the corresponding date in the gregorian calendar. - */ - } - }, - // For localized strings - messages: {} -}; - -Globalize.cultures[ "default" ].calendar = Globalize.cultures[ "default" ].calendars.standard; - -Globalize.cultures.en = Globalize.cultures[ "default" ]; - -Globalize.cultureSelector = "en"; - -// -// private variables -// - -regexHex = /^0x[a-f0-9]+$/i; -regexInfinity = /^[+\-]?infinity$/i; -regexParseFloat = /^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/; -regexTrim = /^\s+|\s+$/g; - -// -// private JavaScript utility functions -// - -arrayIndexOf = function( array, item ) { - if ( array.indexOf ) { - return array.indexOf( item ); - } - for ( var i = 0, length = array.length; i < length; i++ ) { - if ( array[i] === item ) { - return i; - } - } - return -1; -}; - -endsWith = function( value, pattern ) { - return value.substr( value.length - pattern.length ) === pattern; -}; - -extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction(target) ) { - target = {}; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( isObject(copy) || (copyIsArray = isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && isArray(src) ? src : []; - - } else { - clone = src && isObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -isArray = Array.isArray || function( obj ) { - return Object.prototype.toString.call( obj ) === "[object Array]"; -}; - -isFunction = function( obj ) { - return Object.prototype.toString.call( obj ) === "[object Function]"; -}; - -isObject = function( obj ) { - return Object.prototype.toString.call( obj ) === "[object Object]"; -}; - -startsWith = function( value, pattern ) { - return value.indexOf( pattern ) === 0; -}; - -trim = function( value ) { - return ( value + "" ).replace( regexTrim, "" ); -}; - -truncate = function( value ) { - if ( isNaN( value ) ) { - return NaN; - } - return Math[ value < 0 ? "ceil" : "floor" ]( value ); -}; - -zeroPad = function( str, count, left ) { - var l; - for ( l = str.length; l < count; l += 1 ) { - str = ( left ? ("0" + str) : (str + "0") ); - } - return str; -}; - -// -// private Globalization utility functions -// - -appendPreOrPostMatch = function( preMatch, strings ) { - // appends pre- and post- token match strings while removing escaped characters. - // Returns a single quote count which is used to determine if the token occurs - // in a string literal. - var quoteCount = 0, - escaped = false; - for ( var i = 0, il = preMatch.length; i < il; i++ ) { - var c = preMatch.charAt( i ); - switch ( c ) { - case "\'": - if ( escaped ) { - strings.push( "\'" ); - } - else { - quoteCount++; - } - escaped = false; - break; - case "\\": - if ( escaped ) { - strings.push( "\\" ); - } - escaped = !escaped; - break; - default: - strings.push( c ); - escaped = false; - break; - } - } - return quoteCount; -}; - -expandFormat = function( cal, format ) { - // expands unspecified or single character date formats into the full pattern. - format = format || "F"; - var pattern, - patterns = cal.patterns, - len = format.length; - if ( len === 1 ) { - pattern = patterns[ format ]; - if ( !pattern ) { - throw "Invalid date format string \'" + format + "\'."; - } - format = pattern; - } - else if ( len === 2 && format.charAt(0) === "%" ) { - // %X escape format -- intended as a custom format string that is only one character, not a built-in format. - format = format.charAt( 1 ); - } - return format; -}; - -formatDate = function( value, format, culture ) { - var cal = culture.calendar, - convert = cal.convert, - ret; - - if ( !format || !format.length || format === "i" ) { - if ( culture && culture.name.length ) { - if ( convert ) { - // non-gregorian calendar, so we cannot use built-in toLocaleString() - ret = formatDate( value, cal.patterns.F, culture ); - } - else { - var eraDate = new Date( value.getTime() ), - era = getEra( value, cal.eras ); - eraDate.setFullYear( getEraYear(value, cal, era) ); - ret = eraDate.toLocaleString(); - } - } - else { - ret = value.toString(); - } - return ret; - } - - var eras = cal.eras, - sortable = format === "s"; - format = expandFormat( cal, format ); - - // Start with an empty string - ret = []; - var hour, - zeros = [ "0", "00", "000" ], - foundDay, - checkedDay, - dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g, - quoteCount = 0, - tokenRegExp = getTokenRegExp(), - converted; - - function padZeros( num, c ) { - var r, s = num + ""; - if ( c > 1 && s.length < c ) { - r = ( zeros[c - 2] + s); - return r.substr( r.length - c, c ); - } - else { - r = s; - } - return r; - } - - function hasDay() { - if ( foundDay || checkedDay ) { - return foundDay; - } - foundDay = dayPartRegExp.test( format ); - checkedDay = true; - return foundDay; - } - - function getPart( date, part ) { - if ( converted ) { - return converted[ part ]; - } - switch ( part ) { - case 0: - return date.getFullYear(); - case 1: - return date.getMonth(); - case 2: - return date.getDate(); - default: - throw "Invalid part value " + part; - } - } - - if ( !sortable && convert ) { - converted = convert.fromGregorian( value ); - } - - for ( ; ; ) { - // Save the current index - var index = tokenRegExp.lastIndex, - // Look for the next pattern - ar = tokenRegExp.exec( format ); - - // Append the text before the pattern (or the end of the string if not found) - var preMatch = format.slice( index, ar ? ar.index : format.length ); - quoteCount += appendPreOrPostMatch( preMatch, ret ); - - if ( !ar ) { - break; - } - - // do not replace any matches that occur inside a string literal. - if ( quoteCount % 2 ) { - ret.push( ar[0] ); - continue; - } - - var current = ar[ 0 ], - clength = current.length; - - switch ( current ) { - case "ddd": - //Day of the week, as a three-letter abbreviation - case "dddd": - // Day of the week, using the full name - var names = ( clength === 3 ) ? cal.days.namesAbbr : cal.days.names; - ret.push( names[value.getDay()] ); - break; - case "d": - // Day of month, without leading zero for single-digit days - case "dd": - // Day of month, with leading zero for single-digit days - foundDay = true; - ret.push( - padZeros( getPart(value, 2), clength ) - ); - break; - case "MMM": - // Month, as a three-letter abbreviation - case "MMMM": - // Month, using the full name - var part = getPart( value, 1 ); - ret.push( - ( cal.monthsGenitive && hasDay() ) ? - ( cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ] ) : - ( cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ] ) - ); - break; - case "M": - // Month, as digits, with no leading zero for single-digit months - case "MM": - // Month, as digits, with leading zero for single-digit months - ret.push( - padZeros( getPart(value, 1) + 1, clength ) - ); - break; - case "y": - // Year, as two digits, but with no leading zero for years less than 10 - case "yy": - // Year, as two digits, with leading zero for years less than 10 - case "yyyy": - // Year represented by four full digits - part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra(value, eras), sortable ); - if ( clength < 4 ) { - part = part % 100; - } - ret.push( - padZeros( part, clength ) - ); - break; - case "h": - // Hours with no leading zero for single-digit hours, using 12-hour clock - case "hh": - // Hours with leading zero for single-digit hours, using 12-hour clock - hour = value.getHours() % 12; - if ( hour === 0 ) hour = 12; - ret.push( - padZeros( hour, clength ) - ); - break; - case "H": - // Hours with no leading zero for single-digit hours, using 24-hour clock - case "HH": - // Hours with leading zero for single-digit hours, using 24-hour clock - ret.push( - padZeros( value.getHours(), clength ) - ); - break; - case "m": - // Minutes with no leading zero for single-digit minutes - case "mm": - // Minutes with leading zero for single-digit minutes - ret.push( - padZeros( value.getMinutes(), clength ) - ); - break; - case "s": - // Seconds with no leading zero for single-digit seconds - case "ss": - // Seconds with leading zero for single-digit seconds - ret.push( - padZeros( value.getSeconds(), clength ) - ); - break; - case "t": - // One character am/pm indicator ("a" or "p") - case "tt": - // Multicharacter am/pm indicator - part = value.getHours() < 12 ? ( cal.AM ? cal.AM[0] : " " ) : ( cal.PM ? cal.PM[0] : " " ); - ret.push( clength === 1 ? part.charAt(0) : part ); - break; - case "f": - // Deciseconds - case "ff": - // Centiseconds - case "fff": - // Milliseconds - ret.push( - padZeros( value.getMilliseconds(), 3 ).substr( 0, clength ) - ); - break; - case "z": - // Time zone offset, no leading zero - case "zz": - // Time zone offset with leading zero - hour = value.getTimezoneOffset() / 60; - ret.push( - ( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), clength ) - ); - break; - case "zzz": - // Time zone offset with leading zero - hour = value.getTimezoneOffset() / 60; - ret.push( - ( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), 2 ) + - // Hard coded ":" separator, rather than using cal.TimeSeparator - // Repeated here for consistency, plus ":" was already assumed in date parsing. - ":" + padZeros( Math.abs(value.getTimezoneOffset() % 60), 2 ) - ); - break; - case "g": - case "gg": - if ( cal.eras ) { - ret.push( - cal.eras[ getEra(value, eras) ].name - ); - } - break; - case "/": - ret.push( cal["/"] ); - break; - default: - throw "Invalid date format pattern \'" + current + "\'."; - } - } - return ret.join( "" ); -}; - -// formatNumber -(function() { - var expandNumber; - - expandNumber = function( number, precision, formatInfo ) { - var groupSizes = formatInfo.groupSizes, - curSize = groupSizes[ 0 ], - curGroupIndex = 1, - factor = Math.pow( 10, precision ), - rounded = Math.round( number * factor ) / factor; - - if ( !isFinite(rounded) ) { - rounded = number; - } - number = rounded; - - var numberString = number+"", - right = "", - split = numberString.split( /e/i ), - exponent = split.length > 1 ? parseInt( split[1], 10 ) : 0; - numberString = split[ 0 ]; - split = numberString.split( "." ); - numberString = split[ 0 ]; - right = split.length > 1 ? split[ 1 ] : ""; - - var l; - if ( exponent > 0 ) { - right = zeroPad( right, exponent, false ); - numberString += right.slice( 0, exponent ); - right = right.substr( exponent ); - } - else if ( exponent < 0 ) { - exponent = -exponent; - numberString = zeroPad( numberString, exponent + 1, true ); - right = numberString.slice( -exponent, numberString.length ) + right; - numberString = numberString.slice( 0, -exponent ); - } - - if ( precision > 0 ) { - right = formatInfo[ "." ] + - ( (right.length > precision) ? right.slice(0, precision) : zeroPad(right, precision) ); - } - else { - right = ""; - } - - var stringIndex = numberString.length - 1, - sep = formatInfo[ "," ], - ret = ""; - - while ( stringIndex >= 0 ) { - if ( curSize === 0 || curSize > stringIndex ) { - return numberString.slice( 0, stringIndex + 1 ) + ( ret.length ? (sep + ret + right) : right ); - } - ret = numberString.slice( stringIndex - curSize + 1, stringIndex + 1 ) + ( ret.length ? (sep + ret) : "" ); - - stringIndex -= curSize; - - if ( curGroupIndex < groupSizes.length ) { - curSize = groupSizes[ curGroupIndex ]; - curGroupIndex++; - } - } - - return numberString.slice( 0, stringIndex + 1 ) + sep + ret + right; - }; - - formatNumber = function( value, format, culture ) { - if ( !isFinite(value) ) { - if ( value === Infinity ) { - return culture.numberFormat.positiveInfinity; - } - if ( value === -Infinity ) { - return culture.numberFormat.negativeInfinity; - } - return culture.numberFormat[ "NaN" ]; - } - if ( !format || format === "i" ) { - return culture.name.length ? value.toLocaleString() : value.toString(); - } - format = format || "D"; - - var nf = culture.numberFormat, - number = Math.abs( value ), - precision = -1, - pattern; - if ( format.length > 1 ) precision = parseInt( format.slice(1), 10 ); - - var current = format.charAt( 0 ).toUpperCase(), - formatInfo; - - switch ( current ) { - case "D": - pattern = "n"; - number = truncate( number ); - if ( precision !== -1 ) { - number = zeroPad( "" + number, precision, true ); - } - if ( value < 0 ) number = "-" + number; - break; - case "N": - formatInfo = nf; - /* falls through */ - case "C": - formatInfo = formatInfo || nf.currency; - /* falls through */ - case "P": - formatInfo = formatInfo || nf.percent; - pattern = value < 0 ? formatInfo.pattern[ 0 ] : ( formatInfo.pattern[1] || "n" ); - if ( precision === -1 ) precision = formatInfo.decimals; - number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo ); - break; - default: - throw "Bad number format specifier: " + current; - } - - var patternParts = /n|\$|-|%/g, - ret = ""; - for ( ; ; ) { - var index = patternParts.lastIndex, - ar = patternParts.exec( pattern ); - - ret += pattern.slice( index, ar ? ar.index : pattern.length ); - - if ( !ar ) { - break; - } - - switch ( ar[0] ) { - case "n": - ret += number; - break; - case "$": - ret += nf.currency.symbol; - break; - case "-": - // don't make 0 negative - if ( /[1-9]/.test(number) ) { - ret += nf[ "-" ]; - } - break; - case "%": - ret += nf.percent.symbol; - break; - } - } - - return ret; - }; - -}()); - -getTokenRegExp = function() { - // regular expression for matching date and time tokens in format strings. - return (/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g); -}; - -getEra = function( date, eras ) { - if ( !eras ) return 0; - var start, ticks = date.getTime(); - for ( var i = 0, l = eras.length; i < l; i++ ) { - start = eras[ i ].start; - if ( start === null || ticks >= start ) { - return i; - } - } - return 0; -}; - -getEraYear = function( date, cal, era, sortable ) { - var year = date.getFullYear(); - if ( !sortable && cal.eras ) { - // convert normal gregorian year to era-shifted gregorian - // year by subtracting the era offset - year -= cal.eras[ era ].offset; - } - return year; -}; - -// parseExact -(function() { - var expandYear, - getDayIndex, - getMonthIndex, - getParseRegExp, - outOfRange, - toUpper, - toUpperArray; - - expandYear = function( cal, year ) { - // expands 2-digit year into 4 digits. - if ( year < 100 ) { - var now = new Date(), - era = getEra( now ), - curr = getEraYear( now, cal, era ), - twoDigitYearMax = cal.twoDigitYearMax; - twoDigitYearMax = typeof twoDigitYearMax === "string" ? new Date().getFullYear() % 100 + parseInt( twoDigitYearMax, 10 ) : twoDigitYearMax; - year += curr - ( curr % 100 ); - if ( year > twoDigitYearMax ) { - year -= 100; - } - } - return year; - }; - - getDayIndex = function ( cal, value, abbr ) { - var ret, - days = cal.days, - upperDays = cal._upperDays; - if ( !upperDays ) { - cal._upperDays = upperDays = [ - toUpperArray( days.names ), - toUpperArray( days.namesAbbr ), - toUpperArray( days.namesShort ) - ]; - } - value = toUpper( value ); - if ( abbr ) { - ret = arrayIndexOf( upperDays[1], value ); - if ( ret === -1 ) { - ret = arrayIndexOf( upperDays[2], value ); - } - } - else { - ret = arrayIndexOf( upperDays[0], value ); - } - return ret; - }; - - getMonthIndex = function( cal, value, abbr ) { - var months = cal.months, - monthsGen = cal.monthsGenitive || cal.months, - upperMonths = cal._upperMonths, - upperMonthsGen = cal._upperMonthsGen; - if ( !upperMonths ) { - cal._upperMonths = upperMonths = [ - toUpperArray( months.names ), - toUpperArray( months.namesAbbr ) - ]; - cal._upperMonthsGen = upperMonthsGen = [ - toUpperArray( monthsGen.names ), - toUpperArray( monthsGen.namesAbbr ) - ]; - } - value = toUpper( value ); - var i = arrayIndexOf( abbr ? upperMonths[1] : upperMonths[0], value ); - if ( i < 0 ) { - i = arrayIndexOf( abbr ? upperMonthsGen[1] : upperMonthsGen[0], value ); - } - return i; - }; - - getParseRegExp = function( cal, format ) { - // converts a format string into a regular expression with groups that - // can be used to extract date fields from a date string. - // check for a cached parse regex. - var re = cal._parseRegExp; - if ( !re ) { - cal._parseRegExp = re = {}; - } - else { - var reFormat = re[ format ]; - if ( reFormat ) { - return reFormat; - } - } - - // expand single digit formats, then escape regular expression characters. - var expFormat = expandFormat( cal, format ).replace( /([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1" ), - regexp = [ "^" ], - groups = [], - index = 0, - quoteCount = 0, - tokenRegExp = getTokenRegExp(), - match; - - // iterate through each date token found. - while ( (match = tokenRegExp.exec(expFormat)) !== null ) { - var preMatch = expFormat.slice( index, match.index ); - index = tokenRegExp.lastIndex; - - // don't replace any matches that occur inside a string literal. - quoteCount += appendPreOrPostMatch( preMatch, regexp ); - if ( quoteCount % 2 ) { - regexp.push( match[0] ); - continue; - } - - // add a regex group for the token. - var m = match[ 0 ], - len = m.length, - add; - switch ( m ) { - case "dddd": case "ddd": - case "MMMM": case "MMM": - case "gg": case "g": - add = "(\\D+)"; - break; - case "tt": case "t": - add = "(\\D*)"; - break; - case "yyyy": - case "fff": - case "ff": - case "f": - add = "(\\d{" + len + "})"; - break; - case "dd": case "d": - case "MM": case "M": - case "yy": case "y": - case "HH": case "H": - case "hh": case "h": - case "mm": case "m": - case "ss": case "s": - add = "(\\d\\d?)"; - break; - case "zzz": - add = "([+-]?\\d\\d?:\\d{2})"; - break; - case "zz": case "z": - add = "([+-]?\\d\\d?)"; - break; - case "/": - add = "(\\/)"; - break; - default: - throw "Invalid date format pattern \'" + m + "\'."; - } - if ( add ) { - regexp.push( add ); - } - groups.push( match[0] ); - } - appendPreOrPostMatch( expFormat.slice(index), regexp ); - regexp.push( "$" ); - - // allow whitespace to differ when matching formats. - var regexpStr = regexp.join( "" ).replace( /\s+/g, "\\s+" ), - parseRegExp = { "regExp": regexpStr, "groups": groups }; - - // cache the regex for this format. - return re[ format ] = parseRegExp; - }; - - outOfRange = function( value, low, high ) { - return value < low || value > high; - }; - - toUpper = function( value ) { - // "he-IL" has non-breaking space in weekday names. - return value.split( "\u00A0" ).join( " " ).toUpperCase(); - }; - - toUpperArray = function( arr ) { - var results = []; - for ( var i = 0, l = arr.length; i < l; i++ ) { - results[ i ] = toUpper( arr[i] ); - } - return results; - }; - - parseExact = function( value, format, culture ) { - // try to parse the date string by matching against the format string - // while using the specified culture for date field names. - value = trim( value ); - var cal = culture.calendar, - // convert date formats into regular expressions with groupings. - // use the regexp to determine the input format and extract the date fields. - parseInfo = getParseRegExp( cal, format ), - match = new RegExp( parseInfo.regExp ).exec( value ); - if ( match === null ) { - return null; - } - // found a date format that matches the input. - var groups = parseInfo.groups, - era = null, year = null, month = null, date = null, weekDay = null, - hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null, - pmHour = false; - // iterate the format groups to extract and set the date fields. - for ( var j = 0, jl = groups.length; j < jl; j++ ) { - var matchGroup = match[ j + 1 ]; - if ( matchGroup ) { - var current = groups[ j ], - clength = current.length, - matchInt = parseInt( matchGroup, 10 ); - switch ( current ) { - case "dd": case "d": - // Day of month. - date = matchInt; - // check that date is generally in valid range, also checking overflow below. - if ( outOfRange(date, 1, 31) ) return null; - break; - case "MMM": case "MMMM": - month = getMonthIndex( cal, matchGroup, clength === 3 ); - if ( outOfRange(month, 0, 11) ) return null; - break; - case "M": case "MM": - // Month. - month = matchInt - 1; - if ( outOfRange(month, 0, 11) ) return null; - break; - case "y": case "yy": - case "yyyy": - year = clength < 4 ? expandYear( cal, matchInt ) : matchInt; - if ( outOfRange(year, 0, 9999) ) return null; - break; - case "h": case "hh": - // Hours (12-hour clock). - hour = matchInt; - if ( hour === 12 ) hour = 0; - if ( outOfRange(hour, 0, 11) ) return null; - break; - case "H": case "HH": - // Hours (24-hour clock). - hour = matchInt; - if ( outOfRange(hour, 0, 23) ) return null; - break; - case "m": case "mm": - // Minutes. - min = matchInt; - if ( outOfRange(min, 0, 59) ) return null; - break; - case "s": case "ss": - // Seconds. - sec = matchInt; - if ( outOfRange(sec, 0, 59) ) return null; - break; - case "tt": case "t": - // AM/PM designator. - // see if it is standard, upper, or lower case PM. If not, ensure it is at least one of - // the AM tokens. If not, fail the parse for this format. - pmHour = cal.PM && ( matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2] ); - if ( - !pmHour && ( - !cal.AM || ( matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2] ) - ) - ) return null; - break; - case "f": - // Deciseconds. - case "ff": - // Centiseconds. - case "fff": - // Milliseconds. - msec = matchInt * Math.pow( 10, 3 - clength ); - if ( outOfRange(msec, 0, 999) ) return null; - break; - case "ddd": - // Day of week. - case "dddd": - // Day of week. - weekDay = getDayIndex( cal, matchGroup, clength === 3 ); - if ( outOfRange(weekDay, 0, 6) ) return null; - break; - case "zzz": - // Time zone offset in +/- hours:min. - var offsets = matchGroup.split( /:/ ); - if ( offsets.length !== 2 ) return null; - hourOffset = parseInt( offsets[0], 10 ); - if ( outOfRange(hourOffset, -12, 13) ) return null; - var minOffset = parseInt( offsets[1], 10 ); - if ( outOfRange(minOffset, 0, 59) ) return null; - tzMinOffset = ( hourOffset * 60 ) + ( startsWith(matchGroup, "-") ? -minOffset : minOffset ); - break; - case "z": case "zz": - // Time zone offset in +/- hours. - hourOffset = matchInt; - if ( outOfRange(hourOffset, -12, 13) ) return null; - tzMinOffset = hourOffset * 60; - break; - case "g": case "gg": - var eraName = matchGroup; - if ( !eraName || !cal.eras ) return null; - eraName = trim( eraName.toLowerCase() ); - for ( var i = 0, l = cal.eras.length; i < l; i++ ) { - if ( eraName === cal.eras[i].name.toLowerCase() ) { - era = i; - break; - } - } - // could not find an era with that name - if ( era === null ) return null; - break; - } - } - } - var result = new Date(), defaultYear, convert = cal.convert; - defaultYear = convert ? convert.fromGregorian( result )[ 0 ] : result.getFullYear(); - if ( year === null ) { - year = defaultYear; - } - else if ( cal.eras ) { - // year must be shifted to normal gregorian year - // but not if year was not specified, its already normal gregorian - // per the main if clause above. - year += cal.eras[( era || 0 )].offset; - } - // set default day and month to 1 and January, so if unspecified, these are the defaults - // instead of the current day/month. - if ( month === null ) { - month = 0; - } - if ( date === null ) { - date = 1; - } - // now have year, month, and date, but in the culture's calendar. - // convert to gregorian if necessary - if ( convert ) { - result = convert.toGregorian( year, month, date ); - // conversion failed, must be an invalid match - if ( result === null ) return null; - } - else { - // have to set year, month and date together to avoid overflow based on current date. - result.setFullYear( year, month, date ); - // check to see if date overflowed for specified month (only checked 1-31 above). - if ( result.getDate() !== date ) return null; - // invalid day of week. - if ( weekDay !== null && result.getDay() !== weekDay ) { - return null; - } - } - // if pm designator token was found make sure the hours fit the 24-hour clock. - if ( pmHour && hour < 12 ) { - hour += 12; - } - result.setHours( hour, min, sec, msec ); - if ( tzMinOffset !== null ) { - // adjust timezone to utc before applying local offset. - var adjustedMin = result.getMinutes() - ( tzMinOffset + result.getTimezoneOffset() ); - // Safari limits hours and minutes to the range of -127 to 127. We need to use setHours - // to ensure both these fields will not exceed this range. adjustedMin will range - // somewhere between -1440 and 1500, so we only need to split this into hours. - result.setHours( result.getHours() + parseInt(adjustedMin / 60, 10), adjustedMin % 60 ); - } - return result; - }; -}()); - -parseNegativePattern = function( value, nf, negativePattern ) { - var neg = nf[ "-" ], - pos = nf[ "+" ], - ret; - switch ( negativePattern ) { - case "n -": - neg = " " + neg; - pos = " " + pos; - /* falls through */ - case "n-": - if ( endsWith(value, neg) ) { - ret = [ "-", value.substr(0, value.length - neg.length) ]; - } - else if ( endsWith(value, pos) ) { - ret = [ "+", value.substr(0, value.length - pos.length) ]; - } - break; - case "- n": - neg += " "; - pos += " "; - /* falls through */ - case "-n": - if ( startsWith(value, neg) ) { - ret = [ "-", value.substr(neg.length) ]; - } - else if ( startsWith(value, pos) ) { - ret = [ "+", value.substr(pos.length) ]; - } - break; - case "(n)": - if ( startsWith(value, "(") && endsWith(value, ")") ) { - ret = [ "-", value.substr(1, value.length - 2) ]; - } - break; - } - return ret || [ "", value ]; -}; - -// -// public instance functions -// - -Globalize.prototype.findClosestCulture = function( cultureSelector ) { - return Globalize.findClosestCulture.call( this, cultureSelector ); -}; - -Globalize.prototype.format = function( value, format, cultureSelector ) { - return Globalize.format.call( this, value, format, cultureSelector ); -}; - -Globalize.prototype.localize = function( key, cultureSelector ) { - return Globalize.localize.call( this, key, cultureSelector ); -}; - -Globalize.prototype.parseInt = function( value, radix, cultureSelector ) { - return Globalize.parseInt.call( this, value, radix, cultureSelector ); -}; - -Globalize.prototype.parseFloat = function( value, radix, cultureSelector ) { - return Globalize.parseFloat.call( this, value, radix, cultureSelector ); -}; - -Globalize.prototype.culture = function( cultureSelector ) { - return Globalize.culture.call( this, cultureSelector ); -}; - -// -// public singleton functions -// - -Globalize.addCultureInfo = function( cultureName, baseCultureName, info ) { - - var base = {}, - isNew = false; - - if ( typeof cultureName !== "string" ) { - // cultureName argument is optional string. If not specified, assume info is first - // and only argument. Specified info deep-extends current culture. - info = cultureName; - cultureName = this.culture().name; - base = this.cultures[ cultureName ]; - } else if ( typeof baseCultureName !== "string" ) { - // baseCultureName argument is optional string. If not specified, assume info is second - // argument. Specified info deep-extends specified culture. - // If specified culture does not exist, create by deep-extending default - info = baseCultureName; - isNew = ( this.cultures[ cultureName ] == null ); - base = this.cultures[ cultureName ] || this.cultures[ "default" ]; - } else { - // cultureName and baseCultureName specified. Assume a new culture is being created - // by deep-extending an specified base culture - isNew = true; - base = this.cultures[ baseCultureName ]; - } - - this.cultures[ cultureName ] = extend(true, {}, - base, - info - ); - // Make the standard calendar the current culture if it's a new culture - if ( isNew ) { - this.cultures[ cultureName ].calendar = this.cultures[ cultureName ].calendars.standard; - } -}; - -Globalize.findClosestCulture = function( name ) { - var match; - if ( !name ) { - return this.findClosestCulture( this.cultureSelector ) || this.cultures[ "default" ]; - } - if ( typeof name === "string" ) { - name = name.split( "," ); - } - if ( isArray(name) ) { - var lang, - cultures = this.cultures, - list = name, - i, l = list.length, - prioritized = []; - for ( i = 0; i < l; i++ ) { - name = trim( list[i] ); - var pri, parts = name.split( ";" ); - lang = trim( parts[0] ); - if ( parts.length === 1 ) { - pri = 1; - } - else { - name = trim( parts[1] ); - if ( name.indexOf("q=") === 0 ) { - name = name.substr( 2 ); - pri = parseFloat( name ); - pri = isNaN( pri ) ? 0 : pri; - } - else { - pri = 1; - } - } - prioritized.push({ lang: lang, pri: pri }); - } - prioritized.sort(function( a, b ) { - if ( a.pri < b.pri ) { - return 1; - } else if ( a.pri > b.pri ) { - return -1; - } - return 0; - }); - // exact match - for ( i = 0; i < l; i++ ) { - lang = prioritized[ i ].lang; - match = cultures[ lang ]; - if ( match ) { - return match; - } - } - - // neutral language match - for ( i = 0; i < l; i++ ) { - lang = prioritized[ i ].lang; - do { - var index = lang.lastIndexOf( "-" ); - if ( index === -1 ) { - break; - } - // strip off the last part. e.g. en-US => en - lang = lang.substr( 0, index ); - match = cultures[ lang ]; - if ( match ) { - return match; - } - } - while ( 1 ); - } - - // last resort: match first culture using that language - for ( i = 0; i < l; i++ ) { - lang = prioritized[ i ].lang; - for ( var cultureKey in cultures ) { - var culture = cultures[ cultureKey ]; - if ( culture.language == lang ) { - return culture; - } - } - } - } - else if ( typeof name === "object" ) { - return name; - } - return match || null; -}; - -Globalize.format = function( value, format, cultureSelector ) { - var culture = this.findClosestCulture( cultureSelector ); - if ( value instanceof Date ) { - value = formatDate( value, format, culture ); - } - else if ( typeof value === "number" ) { - value = formatNumber( value, format, culture ); - } - return value; -}; - -Globalize.localize = function( key, cultureSelector ) { - return this.findClosestCulture( cultureSelector ).messages[ key ] || - this.cultures[ "default" ].messages[ key ]; -}; - -Globalize.parseDate = function( value, formats, culture ) { - culture = this.findClosestCulture( culture ); - - var date, prop, patterns; - if ( formats ) { - if ( typeof formats === "string" ) { - formats = [ formats ]; - } - if ( formats.length ) { - for ( var i = 0, l = formats.length; i < l; i++ ) { - var format = formats[ i ]; - if ( format ) { - date = parseExact( value, format, culture ); - if ( date ) { - break; - } - } - } - } - } else { - patterns = culture.calendar.patterns; - for ( prop in patterns ) { - date = parseExact( value, patterns[prop], culture ); - if ( date ) { - break; - } - } - } - - return date || null; -}; - -Globalize.parseInt = function( value, radix, cultureSelector ) { - return truncate( Globalize.parseFloat(value, radix, cultureSelector) ); -}; - -Globalize.parseFloat = function( value, radix, cultureSelector ) { - // radix argument is optional - if ( typeof radix !== "number" ) { - cultureSelector = radix; - radix = 10; - } - - var culture = this.findClosestCulture( cultureSelector ); - var ret = NaN, - nf = culture.numberFormat; - - if ( value.indexOf(culture.numberFormat.currency.symbol) > -1 ) { - // remove currency symbol - value = value.replace( culture.numberFormat.currency.symbol, "" ); - // replace decimal seperator - value = value.replace( culture.numberFormat.currency["."], culture.numberFormat["."] ); - } - - // trim leading and trailing whitespace - value = trim( value ); - - // allow infinity or hexidecimal - if ( regexInfinity.test(value) ) { - ret = parseFloat( value ); - } - else if ( !radix && regexHex.test(value) ) { - ret = parseInt( value, 16 ); - } - else { - - // determine sign and number - var signInfo = parseNegativePattern( value, nf, nf.pattern[0] ), - sign = signInfo[ 0 ], - num = signInfo[ 1 ]; - - // #44 - try parsing as "(n)" - if ( sign === "" && nf.pattern[0] !== "(n)" ) { - signInfo = parseNegativePattern( value, nf, "(n)" ); - sign = signInfo[ 0 ]; - num = signInfo[ 1 ]; - } - - // try parsing as "-n" - if ( sign === "" && nf.pattern[0] !== "-n" ) { - signInfo = parseNegativePattern( value, nf, "-n" ); - sign = signInfo[ 0 ]; - num = signInfo[ 1 ]; - } - - sign = sign || "+"; - - // determine exponent and number - var exponent, - intAndFraction, - exponentPos = num.indexOf( "e" ); - if ( exponentPos < 0 ) exponentPos = num.indexOf( "E" ); - if ( exponentPos < 0 ) { - intAndFraction = num; - exponent = null; - } - else { - intAndFraction = num.substr( 0, exponentPos ); - exponent = num.substr( exponentPos + 1 ); - } - // determine decimal position - var integer, - fraction, - decSep = nf[ "." ], - decimalPos = intAndFraction.indexOf( decSep ); - if ( decimalPos < 0 ) { - integer = intAndFraction; - fraction = null; - } - else { - integer = intAndFraction.substr( 0, decimalPos ); - fraction = intAndFraction.substr( decimalPos + decSep.length ); - } - // handle groups (e.g. 1,000,000) - var groupSep = nf[ "," ]; - integer = integer.split( groupSep ).join( "" ); - var altGroupSep = groupSep.replace( /\u00A0/g, " " ); - if ( groupSep !== altGroupSep ) { - integer = integer.split( altGroupSep ).join( "" ); - } - // build a natively parsable number string - var p = sign + integer; - if ( fraction !== null ) { - p += "." + fraction; - } - if ( exponent !== null ) { - // exponent itself may have a number patternd - var expSignInfo = parseNegativePattern( exponent, nf, "-n" ); - p += "e" + ( expSignInfo[0] || "+" ) + expSignInfo[ 1 ]; - } - if ( regexParseFloat.test(p) ) { - ret = parseFloat( p ); - } - } - return ret; -}; - -Globalize.culture = function( cultureSelector ) { - // setter - if ( typeof cultureSelector !== "undefined" ) { - this.cultureSelector = cultureSelector; - } - // getter - return this.findClosestCulture( cultureSelector ) || this.cultures[ "default" ]; -}; - -}( this )); diff --git a/pub/lib/head.load.min.js b/pub/lib/head.load.min.js new file mode 100644 index 0000000000000000000000000000000000000000..1d0be6f673dee560892f23173adf09080a7ffff1 --- /dev/null +++ b/pub/lib/head.load.min.js @@ -0,0 +1 @@ +(function(e,t){"use strict";function y(e){if(e._done)return;e(),e._done=1}function b(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return r!=-1?n.substring(0,r):n}function w(e){var t;if(typeof e=="object")for(var n in e)e[n]&&(t={name:n,url:e[n]});else t={name:b(e),url:e};var r=l[t.name];return r&&r.url===t.url?r:(l[t.name]=t,t)}function E(e,t){if(!e)return;typeof e=="object"&&(e=[].slice.call(e));for(var n=0;n<e.length;n++)t.call(e,e[n],n)}function S(e){return Object.prototype.toString.call(e)=="[object Function]"}function x(e){e=e||l;var t;for(var n in e){if(e.hasOwnProperty(n)&&e[n].state!=g)return!1;t=!0}return t}function T(e){e.state=d,E(e.onpreload,function(e){e.call()})}function N(e,n){e.state===t&&(e.state=v,e.onpreload=[],k({src:e.url,type:"cache"},function(){T(e)}))}function C(e,t){if(e.state==g)return t&&t();if(e.state==m)return p.ready(e.name,t);if(e.state==v)return e.onpreload.push(function(){C(e,t)});e.state=m,k(e.url,function(){e.state=g,t&&t(),E(f[e.name],function(e){y(e)}),x()&&o&&E(f.ALL,function(e){y(e)})})}function k(e,t){var r=n.createElement("script");r.type="text/"+(e.type||"javascript"),r.src=e.src||e,r.async=!1,r.onreadystatechange=r.onload=function(){var e=r.readyState;!t.done&&(!e||/loaded|complete/.test(e))&&(t.done=!0,t())},(n.body||i).appendChild(r)}function L(){o||(o=!0,E(u,function(e){y(e)}))}var n=e.document,r=e.navigator,i=n.documentElement,s,o,u=[],a=[],f={},l={},c=n.createElement("script").async===!0||"MozAppearance"in n.documentElement.style||e.opera,h=e.head_conf&&e.head_conf.head||"head",p=e[h]=e[h]||function(){p.ready.apply(null,arguments)},d=1,v=2,m=3,g=4;c?p.js=function(){var e=arguments,t=e[e.length-1],n={};return S(t)||(t=null),E(e,function(r,i){r!=t&&(r=w(r),n[r.name]=r,C(r,t&&i==e.length-2?function(){x(n)&&y(t)}:null))}),p}:p.js=function(){var e=arguments,t=[].slice.call(e,1),n=t[0];return s?(n?(E(t,function(e){S(e)||N(w(e))}),C(w(e[0]),S(n)?n:function(){p.js.apply(null,t)})):C(w(e[0])),p):(a.push(function(){p.js.apply(null,e)}),p)},p.ready=function(e,t){if(e==n)return o?y(t):u.push(t),p;S(e)&&(t=e,e="ALL");if(typeof e!="string"||!S(t))return p;var r=l[e];if(r&&r.state==g||e=="ALL"&&x()&&o)return y(t),p;var i=f[e];return i?i.push(t):i=f[e]=[t],p},p.ready(n,function(){x()&&E(f.ALL,function(e){y(e)}),p.feature&&p.feature("domloaded",!0)});if(e.addEventListener)n.addEventListener("DOMContentLoaded",L,!1),e.addEventListener("load",L,!1);else if(e.attachEvent){n.attachEvent("onreadystatechange",function(){n.readyState==="complete"&&L()});var A=1;try{A=e.frameElement}catch(O){}!A&&i.doScroll&&function(){try{i.doScroll("left"),L()}catch(e){setTimeout(arguments.callee,1);return}}(),e.attachEvent("onload",L)}!n.readyState&&n.addEventListener&&(n.readyState="loading",n.addEventListener("DOMContentLoaded",handler=function(){n.removeEventListener("DOMContentLoaded",handler,!1),n.readyState="complete"},!1)),setTimeout(function(){s=!0,E(a,function(e){e()})},300)})(window) \ No newline at end of file diff --git a/pub/lib/jquery/additional-methods.js b/pub/lib/jquery/additional-methods.js deleted file mode 100644 index 3876595d36af493aa088b5852ad2e619ea4d4516..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/additional-methods.js +++ /dev/null @@ -1,299 +0,0 @@ -/** - * jQuery Validation Plugin 1.9.0 - * - * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ - * http://docs.jquery.com/Plugins/Validation - * - * Copyright (c) 2006 - 2011 Jörn Zaefferer - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -(function() { - - function stripHtml(value) { - // remove html tags and space chars - return value.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' ') - // remove numbers and punctuation - .replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,''); - } - jQuery.validator.addMethod("maxWords", function(value, element, params) { - return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params; - }, jQuery.validator.format("Please enter {0} words or less.")); - - jQuery.validator.addMethod("minWords", function(value, element, params) { - return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params; - }, jQuery.validator.format("Please enter at least {0} words.")); - - jQuery.validator.addMethod("rangeWords", function(value, element, params) { - return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1]; - }, jQuery.validator.format("Please enter between {0} and {1} words.")); - -})(); - -jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) { - return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value); -}, "Letters or punctuation only please"); - -jQuery.validator.addMethod("alphanumeric", function(value, element) { - return this.optional(element) || /^\w+$/i.test(value); -}, "Letters, numbers, spaces or underscores only please"); - -jQuery.validator.addMethod("lettersonly", function(value, element) { - return this.optional(element) || /^[a-z]+$/i.test(value); -}, "Letters only please"); - -jQuery.validator.addMethod("nowhitespace", function(value, element) { - return this.optional(element) || /^\S+$/i.test(value); -}, "No white space please"); - -jQuery.validator.addMethod("ziprange", function(value, element) { - return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value); -}, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx"); - -jQuery.validator.addMethod("integer", function(value, element) { - return this.optional(element) || /^-?\d+$/.test(value); -}, "A positive or negative non-decimal number please"); - -/** -* Return true, if the value is a valid vehicle identification number (VIN). -* -* Works with all kind of text inputs. -* -* @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" /> -* @desc Declares a required input element whose value must be a valid vehicle identification number. -* -* @name jQuery.validator.methods.vinUS -* @type Boolean -* @cat Plugins/Validate/Methods -*/ -jQuery.validator.addMethod( - "vinUS", - function(v){ - if (v.length != 17) - return false; - var i, n, d, f, cd, cdv; - var LL = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"]; - var VL = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9]; - var FL = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2]; - var rs = 0; - for(i = 0; i < 17; i++){ - f = FL[i]; - d = v.slice(i,i+1); - if(i == 8){ - cdv = d; - } - if(!isNaN(d)){ - d *= f; - } - else{ - for(n = 0; n < LL.length; n++){ - if(d.toUpperCase() === LL[n]){ - d = VL[n]; - d *= f; - if(isNaN(cdv) && n == 8){ - cdv = LL[n]; - } - break; - } - } - } - rs += d; - } - cd = rs % 11; - if(cd == 10){cd = "X";} - if(cd == cdv){return true;} - return false; - }, - "The specified vehicle identification number (VIN) is invalid." -); - -/** - * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy. - * - * @example jQuery.validator.methods.date("01/01/1900") - * @result true - * - * @example jQuery.validator.methods.date("01/13/1990") - * @result false - * - * @example jQuery.validator.methods.date("01.01.1900") - * @result false - * - * @example <input name="pippo" class="{dateITA:true}" /> - * @desc Declares an optional input element whose value must be a valid date. - * - * @name jQuery.validator.methods.dateITA - * @type Boolean - * @cat Plugins/Validate/Methods - */ -jQuery.validator.addMethod( - "dateITA", - function(value, element) { - var check = false; - var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/; - if( re.test(value)){ - var adata = value.split('/'); - var gg = parseInt(adata[0],10); - var mm = parseInt(adata[1],10); - var aaaa = parseInt(adata[2],10); - var xdata = new Date(aaaa,mm-1,gg); - if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) ) - check = true; - else - check = false; - } else - check = false; - return this.optional(element) || check; - }, - "Please enter a correct date" -); - -jQuery.validator.addMethod("dateNL", function(value, element) { - return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value); - }, "Vul hier een geldige datum in." -); - -jQuery.validator.addMethod("time", function(value, element) { - return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(value); -}, "Please enter a valid time, between 00:00 and 23:59"); -jQuery.validator.addMethod("time12h", function(value, element) { - return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(value); -}, "Please enter a valid time, between 00:00 am and 12:00 pm"); - -/** - * matches US phone number format - * - * where the area code may not start with 1 and the prefix may not start with 1 - * allows '-' or ' ' as a separator and allows parens around area code - * some people may want to put a '1' in front of their number - * - * 1(212)-999-2345 - * or - * 212 999 2344 - * or - * 212-999-0983 - * - * but not - * 111-123-5434 - * and not - * 212 123 4567 - */ -jQuery.validator.addMethod("phoneUS", function(phone_number, element) { - phone_number = phone_number.replace(/\s+/g, ""); - return this.optional(element) || phone_number.length > 9 && - phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/); -}, "Please specify a valid phone number"); - -jQuery.validator.addMethod('phoneUK', function(phone_number, element) { -return this.optional(element) || phone_number.length > 9 && -phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/); -}, 'Please specify a valid phone number'); - -jQuery.validator.addMethod('mobileUK', function(phone_number, element) { -return this.optional(element) || phone_number.length > 9 && -phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/); -}, 'Please specify a valid mobile number'); - -// TODO check if value starts with <, otherwise don't try stripping anything -jQuery.validator.addMethod("strippedminlength", function(value, element, param) { - return jQuery(value).text().length >= param; -}, jQuery.validator.format("Please enter at least {0} characters")); - -// same as email, but TLD is optional -jQuery.validator.addMethod("email2", function(value, element, param) { - return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); -}, jQuery.validator.messages.email); - -// same as url, but TLD is optional -jQuery.validator.addMethod("url2", function(value, element, param) { - return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); -}, jQuery.validator.messages.url); - -// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator -// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0 -// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings) -jQuery.validator.addMethod("creditcardtypes", function(value, element, param) { - - if (/[^0-9-]+/.test(value)) - return false; - - value = value.replace(/\D/g, ""); - - var validTypes = 0x0000; - - if (param.mastercard) - validTypes |= 0x0001; - if (param.visa) - validTypes |= 0x0002; - if (param.amex) - validTypes |= 0x0004; - if (param.dinersclub) - validTypes |= 0x0008; - if (param.enroute) - validTypes |= 0x0010; - if (param.discover) - validTypes |= 0x0020; - if (param.jcb) - validTypes |= 0x0040; - if (param.unknown) - validTypes |= 0x0080; - if (param.all) - validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080; - - if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard - return value.length == 16; - } - if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa - return value.length == 16; - } - if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex - return value.length == 15; - } - if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub - return value.length == 14; - } - if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute - return value.length == 15; - } - if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover - return value.length == 16; - } - if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb - return value.length == 16; - } - if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb - return value.length == 15; - } - if (validTypes & 0x0080) { //unknown - return true; - } - return false; -}, "Please enter a valid credit card number."); - -jQuery.validator.addMethod("ipv4", function(value, element, param) { - return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value); -}, "Please enter a valid IP v4 address."); - -jQuery.validator.addMethod("ipv6", function(value, element, param) { - return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value); -}, "Please enter a valid IP v6 address."); - -/** - * Return true if the field value matches the given format RegExp - * - * @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/) - * @result true - * - * @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/) - * @result false - * - * @name jQuery.validator.methods.pattern - * @type Boolean - * @cat Plugins/Validate/Methods - */ -jQuery.validator.addMethod("pattern", function(value, element, param) { - return this.optional(element) || param.test(value); -}, "Invalid format."); \ No newline at end of file diff --git a/pub/lib/jquery/head.js b/pub/lib/jquery/head.js deleted file mode 100644 index 97568e3c86da4c08caf2857cd8787d1c2df162e1..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/head.js +++ /dev/null @@ -1,681 +0,0 @@ -/** - Head JS The only script in your <HEAD> - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/ -(function(doc) { - - var html = doc.documentElement, - conf = { - screens: [320, 480, 640, 768, 1024, 1280, 1440, 1680, 1920], - section: "-section", - page: "-page", - head: "head" - }, - klass = []; - - - if (window.head_conf) { - for (var key in head_conf) { - if (head_conf[key] !== undefined) { - conf[key] = head_conf[key]; - } - } - } - - function pushClass(name) { - klass[klass.length] = name; - } - - function removeClass(name) { - var re = new RegExp("\\b" + name + "\\b"); - html.className = html.className.replace(re, ''); - } - - function each(arr, fn) { - for (var i = 0, arr_length = arr.length; i < arr_length; i++) { - fn.call(arr, arr[i], i); - } - } - - // API - var api = window[conf.head] = function() { - api.ready.apply(null, arguments); - }; - - api.feature = function(key, enabled, queue) { - - // internal: apply all classes - if (!key) { - html.className += ' ' + klass.join( ' ' ); - klass = []; - return; - } - - if (Object.prototype.toString.call(enabled) == '[object Function]') { - enabled = enabled.call(); - } - - pushClass((enabled ? '' : 'no-') + key); - api[key] = !!enabled; - - // apply class to HTML element - if (!queue) { - removeClass('no-' + key); - removeClass(key); - api.feature(); - } - - return api; - }; - - // browser type & version - var ua = navigator.userAgent.toLowerCase(); - - ua = /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) || []; - - - if (ua[1] == 'msie') { - ua[1] = 'ie'; - ua[2] = document.documentMode || ua[2]; - } - - pushClass(ua[1]); - - api.browser = { version: ua[2] }; - api.browser[ua[1]] = true; - - // IE specific - if (api.browser.ie) { - - pushClass("ie" + parseFloat(ua[2])); - - // IE versions - for (var ver = 3; ver < 11; ver++) { - if (parseFloat(ua[2]) < ver) { pushClass("lt-ie" + ver); } - } - - // HTML5 support - each("abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"), function(el) { - doc.createElement(el); - }); - - } - - - // CSS "router" - each(location.pathname.split("/"), function(el, i) { - - if (this.length > 2 && this[i + 1] !== undefined) { - if (i) { pushClass(this.slice(1, i+1).join("-") + conf.section); } - - } else { - - // pageId - var id = el || "index", index = id.indexOf("."); - if (index > 0) { id = id.substring(0, index); } - html.id = id + conf.page; - - // on root? - if (!i) { pushClass("root" + conf.section); } - } - }); - - - // screen resolution: w-100, lt-480, lt-1024 ... - function screenSize() { - var w = window.outerWidth || html.clientWidth; - - // remove earlier widths - html.className = html.className.replace(/ (w|lt)-\d+/g, ""); - - // add new ones - pushClass("w-" + Math.round(w / 100) * 100); - - each(conf.screens, function(width) { - if (w <= width) { pushClass("lt-" + width); } - }); - - api.feature(); - } - - screenSize(); - window.onresize = screenSize; - - api.feature("js", true).feature(); - -})(document); - - -/** - Head JS The only script in your <HEAD> - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/ -(function() { - /* - To add a new test: - - head.feature("video", function() { - var tag = document.createElement('video'); - return !!tag.canPlayType; - }); - - Good place to grab more tests - - https://github.com/Modernizr/Modernizr/blob/master/modernizr.js - */ - - - /* CSS modernizer */ - var el = document.createElement("i"), - style = el.style, - prefs = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '), - domPrefs = 'Webkit Moz O ms Khtml'.split(' '), - - head_var = window.head_conf && head_conf.head || "head", - api = window[head_var]; - - - // Thanks Paul Irish! - function testProps(props) { - for (var i in props) { - if (style[props[i]] !== undefined) { - return true; - } - } - } - - - function testAll(prop) { - var camel = prop.charAt(0).toUpperCase() + prop.substr(1), - props = (prop + ' ' + domPrefs.join(camel + ' ') + camel).split(' '); - - return !!testProps(props); - } - - var tests = { - - gradient: function() { - var s1 = 'background-image:', - s2 = 'gradient(linear,left top,right bottom,from(#9f9),to(#fff));', - s3 = 'linear-gradient(left top,#eee,#fff);'; - - style.cssText = (s1 + prefs.join(s2 + s1) + prefs.join(s3 + s1)).slice(0,-s1.length); - return !!style.backgroundImage; - }, - - rgba: function() { - style.cssText = "background-color:rgba(0,0,0,0.5)"; - return !!style.backgroundColor; - }, - - opacity: function() { - return el.style.opacity === ""; - }, - - textshadow: function() { - return style.textShadow === ''; - }, - - multiplebgs: function() { - style.cssText = "background:url(//:),url(//:),red url(//:)"; - return new RegExp("(url\\s*\\(.*?){3}").test(style.background); - }, - - boxshadow: function() { - return testAll("boxShadow"); - }, - - borderimage: function() { - return testAll("borderImage"); - }, - - borderradius: function() { - return testAll("borderRadius"); - }, - - cssreflections: function() { - return testAll("boxReflect"); - }, - - csstransforms: function() { - return testAll("transform"); - }, - - csstransitions: function() { - return testAll("transition"); - }, - - /* - font-face support. Uses browser sniffing but is synchronous. - - http://paulirish.com/2009/font-face-feature-detection/ - */ - fontface: function() { - var ua = navigator.userAgent, parsed; - - if (/*@cc_on@if(@_jscript_version>=5)!@end@*/0) - return true; - - if (parsed = ua.match(/Chrome\/(\d+\.\d+\.\d+\.\d+)/)) - return parsed[1] >= '4.0.249.4' || 1 * parsed[1].split(".")[0] > 5; - if ((parsed = ua.match(/Safari\/(\d+\.\d+)/)) && !/iPhone/.test(ua)) - return parsed[1] >= '525.13'; - if (/Opera/.test({}.toString.call(window.opera))) - return opera.version() >= '10.00'; - if (parsed = ua.match(/rv:(\d+\.\d+\.\d+)[^b].*Gecko\//)) - return parsed[1] >= '1.9.1'; - - return false; - } - }; - - // queue features - for (var key in tests) { - if (tests[key]) { - api.feature(key, tests[key].call(), true); - } - } - - // enable features at once - api.feature(); - -})(); - - -/** - Head JS The only script in your <HEAD> - Copyright Tero Piirainen (tipiirai) - License MIT / http://bit.ly/mit-license - Version 0.96 - - http://headjs.com -*/ -(function(doc) { - - var head = doc.documentElement, - isHeadReady, - isDomReady, - domWaiters = [], - queue = [], // waiters for the "head ready" event - handlers = {}, // user functions waiting for events - scripts = {}, // loadable scripts in different states - isAsync = doc.createElement("script").async === true || "MozAppearance" in doc.documentElement.style || window.opera; - - - /*** public API ***/ - var head_var = window.head_conf && head_conf.head || "head", - api = window[head_var] = (window[head_var] || function() { api.ready.apply(null, arguments); }); - - // states - var PRELOADED = 1, - PRELOADING = 2, - LOADING = 3, - LOADED = 4; - - - // Method 1: simply load and let browser take care of ordering - if (isAsync) { - - api.js = function() { - - var args = arguments, - fn = args[args.length -1], - els = {}; - - if (!isFunc(fn)) { fn = null; } - - each(args, function(el, i) { - - if (el != fn) { - el = getScript(el); - els[el.name] = el; - - load(el, fn && i == args.length -2 ? function() { - if (allLoaded(els)) { one(fn); } - - } : null); - } - }); - - return api; - }; - - - // Method 2: preload with text/cache hack - } else { - - api.js = function() { - - var args = arguments, - rest = [].slice.call(args, 1), - next = rest[0]; - - // wait for a while. immediate execution causes some browsers to ignore caching - if (!isHeadReady) { - queue.push(function() { - api.js.apply(null, args); - }); - return api; - } - - // multiple arguments - if (next) { - - // load - each(rest, function(el) { - if (!isFunc(el)) { - preload(getScript(el)); - } - }); - - // execute - load(getScript(args[0]), isFunc(next) ? next : function() { - api.js.apply(null, rest); - }); - - - // single script - } else { - load(getScript(args[0])); - } - - return api; - }; - } - - api.ready = function(key, fn) { - - // DOM ready check: head.ready(document, function() { }); - if (key == doc) { - if (isDomReady) { one(fn); } - else { domWaiters.push(fn); } - return api; - } - - // shift arguments - if (isFunc(key)) { - fn = key; - key = "ALL"; - } - - // make sure arguments are sane - if (typeof key != 'string' || !isFunc(fn)) { return api; } - - var script = scripts[key]; - - // script already loaded --> execute and return - if (script && script.state == LOADED || key == 'ALL' && allLoaded() && isDomReady) { - one(fn); - return api; - } - - var arr = handlers[key]; - if (!arr) { arr = handlers[key] = [fn]; } - else { arr.push(fn); } - return api; - }; - - - // perform this when DOM is ready - api.ready(doc, function() { - - if (allLoaded()) { - each(handlers.ALL, function(fn) { - one(fn); - }); - } - - if (api.feature) { - api.feature("domloaded", true); - } - }); - - - /*** private functions ***/ - - - // call function once - function one(fn) { - if (fn._done) { return; } - fn(); - fn._done = 1; - } - - - function toLabel(url) { - var els = url.split("/"), - name = els[els.length -1], - i = name.indexOf("?"); - - return i != -1 ? name.substring(0, i) : name; - } - - - function getScript(url) { - - var script; - - if (typeof url == 'object') { - for (var key in url) { - if (url[key]) { - script = { name: key, url: url[key] }; - } - } - } else { - script = { name: toLabel(url), url: url }; - } - - var existing = scripts[script.name]; - if (existing && existing.url === script.url) { return existing; } - - scripts[script.name] = script; - return script; - } - - - function each(arr, fn) { - if (!arr) { return; } - - // arguments special type - if (typeof arr == 'object') { arr = [].slice.call(arr); } - - // do the job - for (var i = 0; i < arr.length; i++) { - fn.call(arr, arr[i], i); - } - } - - function isFunc(el) { - return Object.prototype.toString.call(el) == '[object Function]'; - } - - function allLoaded(els) { - - els = els || scripts; - - var loaded; - - for (var name in els) { - if (els.hasOwnProperty(name) && els[name].state != LOADED) { return false; } - loaded = true; - } - - return loaded; - } - - - function onPreload(script) { - script.state = PRELOADED; - - each(script.onpreload, function(el) { - el.call(); - }); - } - - function preload(script, callback) { - - if (script.state === undefined) { - - script.state = PRELOADING; - script.onpreload = []; - - scriptTag({ src: script.url, type: 'cache'}, function() { - onPreload(script); - }); - } - } - - function load(script, callback) { - - if (script.state == LOADED) { - return callback && callback(); - } - - if (script.state == LOADING) { - return api.ready(script.name, callback); - } - - if (script.state == PRELOADING) { - return script.onpreload.push(function() { - load(script, callback); - }); - } - - script.state = LOADING; - - scriptTag(script.url, function() { - - script.state = LOADED; - - if (callback) { callback(); } - - // handlers for this script - each(handlers[script.name], function(fn) { - one(fn); - }); - - // everything ready - if (allLoaded() && isDomReady) { - each(handlers.ALL, function(fn) { - one(fn); - }); - } - }); - } - - - function scriptTag(src, callback) { - - var s = doc.createElement('script'); - s.type = 'text/' + (src.type || 'javascript'); - s.src = src.src || src; - s.async = false; - - s.onreadystatechange = s.onload = function() { - - var state = s.readyState; - - if (!callback.done && (!state || /loaded|complete/.test(state))) { - callback.done = true; - callback(); - } - }; - - // use body if available. more safe in IE - (doc.body || head).appendChild(s); - } - - /* - The much desired DOM ready check - Thanks to jQuery and http://javascript.nwbox.com/IEContentLoaded/ - */ - - function fireReady() { - if (!isDomReady) { - isDomReady = true; - each(domWaiters, function(fn) { - one(fn); - }); - } - } - - // W3C - if (window.addEventListener) { - doc.addEventListener("DOMContentLoaded", fireReady, false); - - // fallback. this is always called - window.addEventListener("load", fireReady, false); - - // IE - } else if (window.attachEvent) { - - // for iframes - doc.attachEvent("onreadystatechange", function() { - if (doc.readyState === "complete" ) { - fireReady(); - } - }); - - - // avoid frames with different domains issue - var frameElement = 1; - - try { - frameElement = window.frameElement; - - } catch(e) {} - - - if (!frameElement && head.doScroll) { - - (function() { - try { - head.doScroll("left"); - fireReady(); - - } catch(e) { - setTimeout(arguments.callee, 1); - return; - } - })(); - } - - // fallback - window.attachEvent("onload", fireReady); - } - - - // enable document.readyState for Firefox <= 3.5 - if (!doc.readyState && doc.addEventListener) { - doc.readyState = "loading"; - doc.addEventListener("DOMContentLoaded", handler = function () { - doc.removeEventListener("DOMContentLoaded", handler, false); - doc.readyState = "complete"; - }, false); - } - - /* - We wait for 300 ms before script loading starts. for some reason this is needed - to make sure scripts are cached. Not sure why this happens yet. A case study: - - https://github.com/headjs/headjs/issues/closed#issue/83 - */ - setTimeout(function() { - isHeadReady = true; - each(queue, function(fn) { fn(); }); - - }, 300); - -})(document); - diff --git a/pub/lib/jquery/jquery-ui.min.js b/pub/lib/jquery/jquery-ui.min.js deleted file mode 100644 index 9ec6b4b94018d1dca133f806b4480453f9ddadba..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/jquery-ui.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! jQuery UI - v1.9.2 - 2012-11-26 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.sortable.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.slider.js, jquery.ui.tabs.js, jquery.ui.effect.js -* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ - -(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,"visibility")==="hidden"}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},contains:e.contains,hasScroll:function(t,n){if(e(t).css("overflow")==="hidden")return!1;var r=n&&n==="left"?"scrollLeft":"scrollTop",i=!1;return t[r]>0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e<t+n},isOver:function(t,n,r,i,s,o){return e.ui.isOverAxis(t,r,s)&&e.ui.isOverAxis(n,i,o)}})})(jQuery);(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n=0,r;(r=t[n])!=null;n++)try{e(r).triggerHandler("remove")}catch(s){}i(t)},e.widget=function(t,n,r){var i,s,o,u,a=t.split(".")[0];t=t.split(".")[1],i=a+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[a]=e[a]||{},s=e[a][t],o=e[a][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,s,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),u=new n,u.options=e.widget.extend({},u.options),e.each(r,function(t,i){e.isFunction(i)&&(r[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},r=function(e){return n.prototype[t].apply(this,e)};return function(){var t=this._super,n=this._superApply,s;return this._super=e,this._superApply=r,s=i.apply(this,arguments),this._super=t,this._superApply=n,s}}())}),o.prototype=e.widget.extend(u,{widgetEventPrefix:s?u.widgetEventPrefix:t},r,{constructor:o,namespace:a,widgetName:t,widgetBaseClass:i,widgetFullName:i}),s?(e.each(s._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete s._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o)},e.widget.extend=function(n){var i=r.call(arguments,1),s=0,o=i.length,u,a;for(;s<o;s++)for(u in i[s])a=i[s][u],i[s].hasOwnProperty(u)&&a!==t&&(e.isPlainObject(a)?n[u]=e.isPlainObject(n[u])?e.widget.extend({},n[u],a):e.widget.extend({},a):n[u]=a);return n},e.widget.bridge=function(n,i){var s=i.prototype.widgetFullName||n;e.fn[n]=function(o){var u=typeof o=="string",a=r.call(arguments,1),f=this;return o=!u&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,u?this.each(function(){var r,i=e.data(this,s);if(!i)return e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+o+"'");if(!e.isFunction(i[o])||o.charAt(0)==="_")return e.error("no such method '"+o+"' for "+n+" widget instance");r=i[o].apply(i,a);if(r!==i&&r!==t)return f=r&&r.jquery?f.pushStack(r.get()):r,!1}):this.each(function(){var t=e.data(this,s);t?t.option(o||{})._init():e.data(this,s,new i(o,this))}),f}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u<s.length-1;u++)o[s[u]]=o[s[u]]||{},o=o[s[u]];n=s.pop();if(r===t)return o[n]===t?null:o[n];o[n]=r}else{if(r===t)return this.options[n]===t?null:this.options[n];i[n]=r}}return this._setOptions(i),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,e==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,s=this;typeof t!="boolean"&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,o){function u(){if(!t&&(s.options.disabled===!0||e(this).hasClass("ui-state-disabled")))return;return(typeof o=="string"?s[o]:o).apply(s,arguments)}typeof o!="string"&&(u.guid=o.guid=o.guid||u.guid||e.guid++);var a=r.match(/^(\w+)\s*(.*)$/),f=a[1]+s.eventNamespace,l=a[2];l?i.delegate(l,f,u):n.bind(f,u)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return(typeof e=="string"?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,s,o=this.options[t];r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent;if(s)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){typeof i=="string"&&(i={effect:i});var o,u=i?i===!0||typeof i=="number"?n:i.effect||n:t;i=i||{},typeof i=="number"&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&(e.effects.effect[u]||e.uiBackCompat!==!1&&e.effects[u])?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()})}}),e.uiBackCompat!==!1&&(e.Widget.prototype._getCreateOptions=function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]})})(jQuery);(function(e,t){var n=!1;e(document).mouseup(function(e){n=!1}),e.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(n)return;this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var r=this,i=t.which===1,s=typeof this.options.cancel=="string"&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;if(!i||s||!this._mouseCapture(t))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(t)!==!1;if(!this._mouseStarted)return t.preventDefault(),!0}return!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,!0},_mouseMove:function(t){return!e.ui.ie||document.documentMode>=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width<t.element[0].scrollWidth,s=r==="scroll"||r==="auto"&&t.height<t.element[0].scrollHeight;return{width:i?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]);return{element:n,isWindow:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return c.apply(this,arguments);t=e.extend({},t);var n,l,d,v,m,g=e(t.of),y=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(y),w=g[0],E=(t.collision||"flip").split(" "),S={};return w.nodeType===9?(l=g.width(),d=g.height(),v={top:0,left:0}):e.isWindow(w)?(l=g.width(),d=g.height(),v={top:g.scrollTop(),left:g.scrollLeft()}):w.preventDefault?(t.at="left top",l=d=0,v={top:w.pageY,left:w.pageX}):(l=g.outerWidth(),d=g.outerHeight(),v=g.offset()),m=e.extend({},v),e.each(["my","at"],function(){var e=(t[this]||"").split(" "),n,r;e.length===1&&(e=o.test(e[0])?e.concat(["center"]):u.test(e[0])?["center"].concat(e):["center","center"]),e[0]=o.test(e[0])?e[0]:"center",e[1]=u.test(e[1])?e[1]:"center",n=a.exec(e[0]),r=a.exec(e[1]),S[this]=[n?n[0]:0,r?r[0]:0],t[this]=[f.exec(e[0])[0],f.exec(e[1])[0]]}),E.length===1&&(E[1]=E[0]),t.at[0]==="right"?m.left+=l:t.at[0]==="center"&&(m.left+=l/2),t.at[1]==="bottom"?m.top+=d:t.at[1]==="center"&&(m.top+=d/2),n=h(S.at,l,d),m.left+=n[0],m.top+=n[1],this.each(function(){var o,u,a=e(this),f=a.outerWidth(),c=a.outerHeight(),w=p(this,"marginLeft"),x=p(this,"marginTop"),T=f+w+p(this,"marginRight")+b.width,N=c+x+p(this,"marginBottom")+b.height,C=e.extend({},m),k=h(S.my,a.outerWidth(),a.outerHeight());t.my[0]==="right"?C.left-=f:t.my[0]==="center"&&(C.left-=f/2),t.my[1]==="bottom"?C.top-=c:t.my[1]==="center"&&(C.top-=c/2),C.left+=k[0],C.top+=k[1],e.support.offsetFractions||(C.left=s(C.left),C.top=s(C.top)),o={marginLeft:w,marginTop:x},e.each(["left","top"],function(r,i){e.ui.position[E[r]]&&e.ui.position[E[r]][i](C,{targetWidth:l,targetHeight:d,elemWidth:f,elemHeight:c,collisionPosition:o,collisionWidth:T,collisionHeight:N,offset:[n[0]+k[0],n[1]+k[1]],my:t.my,at:t.at,within:y,elem:a})}),e.fn.bgiframe&&a.bgiframe(),t.using&&(u=function(e){var n=v.left-C.left,s=n+l-f,o=v.top-C.top,u=o+d-c,h={target:{element:g,left:v.left,top:v.top,width:l,height:d},element:{element:a,left:C.left,top:C.top,width:f,height:c},horizontal:s<0?"left":n>0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};l<f&&i(n+s)<l&&(h.horizontal="center"),d<c&&i(o+u)<d&&(h.vertical="middle"),r(i(n),i(s))>r(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p<i(a))e.left+=l+c+h}else if(f>0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)<f)e.left+=l+c+h}},top:function(e,t){var n=t.within,r=n.offset.top+n.scrollTop,s=n.height,o=n.isWindow?n.scrollTop:n.offset.top,u=e.top-t.collisionPosition.marginTop,a=u-o,f=u+t.collisionHeight-s-o,l=t.my[1]==="top",c=l?-t.elemHeight:t.my[1]==="bottom"?t.elemHeight:0,h=t.at[1]==="top"?t.targetHeight:t.at[1]==="bottom"?-t.targetHeight:0,p=-2*t.offset[1],d,v;a<0?(v=e.top+c+h+p+t.collisionHeight-s-r,e.top+c+h+p>a&&(v<0||v<i(a))&&(e.top+=c+h+p)):f>0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)<f)&&(e.top+=c+h+p))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,n,r,i,s,o=document.getElementsByTagName("body")[0],u=document.createElement("div");t=document.createElement(o?"div":"body"),r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in r)t.style[s]=r[s];t.appendChild(u),n=o||document.documentElement,n.insertBefore(t,n.firstChild),u.style.cssText="position: absolute; left: 10.7432222px;",i=e(u).offset().left,e.support.offsetFractions=i>10&&i<11,t.innerHTML="",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(" "),s=r.at.split(" ");return i.length===1&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);var r=this.element[0],i=!1;while(r&&(r=r.parentNode))r==document&&(i=!0);if(!i&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.left<u[0]&&(s=u[0]+this.offset.click.left),t.pageY-this.offset.click.top<u[1]&&(o=u[1]+this.offset.click.top),t.pageX-this.offset.click.left>u[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.top<u[1]||f-this.offset.click.top>u[3]?f-this.offset.click.top<u[1]?f+n.grid[1]:f-n.grid[1]:f:f;var l=n.grid[0]?this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX;s=u?l-this.offset.click.left<u[0]||l-this.offset.click.left>u[2]?l-this.offset.click.left<u[0]?l+n.grid[0]:l-n.grid[0]:l:l}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,n,r){return r=r||this._uiHash(),e.ui.plugin.call(this,t,[n,r]),t=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,n,r)},plugins:{},_uiHash:function(e){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n){var r=e(this).data("draggable"),i=r.options,s=e.extend({},n,{item:r.element});r.sortables=[],e(i.connectToSortable).each(function(){var n=e.data(this,"sortable");n&&!n.options.disabled&&(r.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",t,s))})},stop:function(t,n){var r=e(this).data("draggable"),i=e.extend({},n,{item:r.element});e.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,r.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,i))})},drag:function(t,n){var r=e(this).data("draggable"),i=this,s=function(t){var n=this.offset.click.top,r=this.offset.click.left,i=this.positionAbs.top,s=this.positionAbs.left,o=t.height,u=t.width,a=t.top,f=t.left;return e.ui.isOver(i+n,s+r,a,f,o,u)};e.each(r.sortables,function(s){var o=!1,u=this;this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!=u&&this.instance._intersectsWith(this.instance.containerCache)&&e.ui.contains(u.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n){var r=e("body"),i=e(this).data("draggable").options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(t,n){var r=e(this).data("draggable").options;r._cursor&&e("body").css("cursor",r._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(t,n){var r=e(this).data("draggable").options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(t,n){var r=e(this).data("draggable");r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"&&(r.overflowOffset=r.scrollParent.offset())},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=!1;if(r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"){if(!i.axis||i.axis!="x")r.overflowOffset.top+r.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop-i.scrollSpeed);if(!i.axis||i.axis!="y")r.overflowOffset.left+r.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft-i.scrollSpeed)}else{if(!i.axis||i.axis!="x")t.pageY-e(document).scrollTop()<i.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<i.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+i.scrollSpeed));if(!i.axis||i.axis!="y")t.pageX-e(document).scrollLeft()<i.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<i.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+i.scrollSpeed))}s!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(r,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n){var r=e(this).data("draggable"),i=r.options;r.snapElements=[],e(i.snap.constructor!=String?i.snap.items||":data(draggable)":i.snap).each(function(){var t=e(this),n=t.offset();this!=r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=i.snapTolerance,o=n.offset.left,u=o+r.helperProportions.width,a=n.offset.top,f=a+r.helperProportions.height;for(var l=r.snapElements.length-1;l>=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s<o&&o<h+s&&p-s<a&&a<d+s||c-s<o&&o<h+s&&p-s<f&&f<d+s||c-s<u&&u<h+s&&p-s<a&&a<d+s||c-s<u&&u<h+s&&p-s<f&&f<d+s)){r.snapElements[l].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=!1;continue}if(i.snapMode!="inner"){var v=Math.abs(p-f)<=s,m=Math.abs(d-a)<=s,g=Math.abs(c-u)<=s,y=Math.abs(h-o)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p-r.helperProportions.height,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h}).left-r.margins.left)}var b=v||m||g||y;if(i.snapMode!="outer"){var v=Math.abs(p-a)<=s,m=Math.abs(d-f)<=s,g=Math.abs(c-o)<=s,y=Math.abs(h-u)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d-r.helperProportions.height,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h-r.helperProportions.width}).left-r.margins.left)}!r.snapElements[l].snapping&&(v||m||g||y||b)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=v||m||g||y||b}}}),e.ui.plugin.add("draggable","stack",{start:function(t,n){var r=e(this).data("draggable").options,i=e.makeArray(e(r.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});if(!i.length)return;var s=parseInt(i[0].style.zIndex)||0;e(i).each(function(e){this.style.zIndex=s+e}),this[0].style.zIndex=s+i.length}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(t,n){var r=e(this).data("draggable").options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}})})(jQuery);(function(e,t){e.widget("ui.droppable",{version:"1.9.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var t=this.options,n=t.accept;this.isover=0,this.isout=1,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];for(var n=0;n<t.length;n++)t[n]==this&&t.splice(n,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,n){t=="accept"&&(this.accept=e.isFunction(n)?n:function(e){return e.is(n)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0])return;this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0])return;this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var r=n||e.ui.ddmanager.current;if(!r||(r.currentItem||r.element)[0]==this.element[0])return!1;var i=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"droppable");if(t.options.greedy&&!t.options.disabled&&t.options.scope==r.options.scope&&t.accept.call(t.element[0],r.currentItem||r.element)&&e.ui.intersect(r,e.extend(t,{offset:t.element.offset()}),t.options.tolerance))return i=!0,!1}),i?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(r)),this.element):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(t,n,r){if(!n.offset)return!1;var i=(t.positionAbs||t.position.absolute).left,s=i+t.helperProportions.width,o=(t.positionAbs||t.position.absolute).top,u=o+t.helperProportions.height,a=n.offset.left,f=a+n.proportions.width,l=n.offset.top,c=l+n.proportions.height;switch(r){case"fit":return a<=i&&s<=f&&l<=o&&u<=c;case"intersect":return a<i+t.helperProportions.width/2&&s-t.helperProportions.width/2<f&&l<o+t.helperProportions.height/2&&u-t.helperProportions.height/2<c;case"pointer":var h=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,p=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,d=e.ui.isOver(p,h,l,a,n.proportions.height,n.proportions.width);return d;case"touch":return(o>=l&&o<=c||u>=l&&u<=c||o<l&&u>c)&&(i>=a&&i<=f||s>=a&&s<=f||i<a&&s>f);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r=e.ui.ddmanager.droppables[t.options.scope]||[],i=n?n.type:null,s=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var o=0;o<r.length;o++){if(r[o].options.disabled||t&&!r[o].accept.call(r[o].element[0],t.currentItem||t.element))continue;for(var u=0;u<s.length;u++)if(s[u]==r[o].element[0]){r[o].proportions.height=0;continue e}r[o].visible=r[o].element.css("display")!="none";if(!r[o].visible)continue;i=="mousedown"&&r[o]._activate.call(r[o],n),r[o].offset=r[o].element.offset(),r[o].proportions={width:r[o].element[0].offsetWidth,height:r[o].element[0].offsetHeight}}},drop:function(t,n){var r=!1;return e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options)return;!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(r=this._drop.call(this,n)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,n))}),r},dragStart:function(t,n){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var r=e.ui.intersect(t,this,this.options.tolerance),i=!r&&this.isover==1?"isout":r&&this.isover==0?"isover":null;if(!i)return;var s;if(this.options.greedy){var o=this.options.scope,u=this.element.parents(":data(droppable)").filter(function(){return e.data(this,"droppable").options.scope===o});u.length&&(s=e.data(u[0],"droppable"),s.greedyChild=i=="isover"?1:0)}s&&i=="isover"&&(s.isover=0,s.isout=1,s._out.call(s,n)),this[i]=1,this[i=="isout"?"isover":"isout"]=0,this[i=="isover"?"_over":"_out"].call(this,n),s&&i=="isout"&&(s.isout=0,s.isover=1,s._over.call(s,n))})},dragStop:function(t,n){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}}})(jQuery);(function(e,t){e.widget("ui.resizable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var t=this,n=this.options;this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=n.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var r=this.handles.split(",");this.handles={};for(var i=0;i<r.length;i++){var s=e.trim(r[i]),o="ui-resizable-"+s,u=e('<div class="ui-resizable-handle '+o+'"></div>');u.css({zIndex:n.zIndex}),"se"==s&&u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(u)}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=e(this.handles[n],this.element),i=0;i=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth();var s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");t.css(s,i),this._proportionallyResize()}if(!e(this.handles[n]).length)continue}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(n.disabled)return;e(this).removeClass("ui-resizable-autohide"),t._handles.show()}).mouseleave(function(){if(n.disabled)return;t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var n=this.element;this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")}).insertAfter(n),n.remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;for(var r in this.handles)e(this.handles[r])[0]==t.target&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var r=this.options,i=this.element.position(),s=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(s.is(".ui-draggable")||/absolute/.test(s.css("position")))&&s.css({position:"absolute",top:i.top,left:i.left}),this._renderProxy();var o=n(this.helper.css("left")),u=n(this.helper.css("top"));r.containment&&(o+=e(r.containment).scrollLeft()||0,u+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:u},this.size=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalPosition={left:o,top:u},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof r.aspectRatio=="number"?r.aspectRatio:this.originalSize.width/this.originalSize.height||1;var a=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor",a=="auto"?this.axis+"-resize":a),s.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(e){var t=this.helper,n=this.options,r={},i=this,s=this.originalMousePosition,o=this.axis,u=e.pageX-s.left||0,a=e.pageY-s.top||0,f=this._change[o];if(!f)return!1;var l=f.apply(this,[e,u,a]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey)l=this._updateRatio(l,e);return l=this._respectSize(l,e),this._propagate("resize",e),t.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",e,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var n=this.options,r=this;if(this._helper){var i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:r.sizeDiff.height,u=s?0:r.sizeDiff.width,a={width:r.helper.width()-u,height:r.helper.height()-o},f=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,l=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;n.animate||this.element.css(e.extend(a,{top:l,left:f})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!n.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t=this.options,n,i,s,o,u;u={minWidth:r(t.minWidth)?t.minWidth:0,maxWidth:r(t.maxWidth)?t.maxWidth:Infinity,minHeight:r(t.minHeight)?t.minHeight:0,maxHeight:r(t.maxHeight)?t.maxHeight:Infinity};if(this._aspectRatio||e)n=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,i=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,n>u.minWidth&&(u.minWidth=n),s>u.minHeight&&(u.minHeight=s),i<u.maxWidth&&(u.maxWidth=i),o<u.maxHeight&&(u.maxHeight=o);this._vBoundaries=u},_updateCache:function(e){var t=this.options;this.offset=this.helper.offset(),r(e.left)&&(this.position.left=e.left),r(e.top)&&(this.position.top=e.top),r(e.height)&&(this.size.height=e.height),r(e.width)&&(this.size.width=e.width)},_updateRatio:function(e,t){var n=this.options,i=this.position,s=this.size,o=this.axis;return r(e.height)?e.width=e.height*this.aspectRatio:r(e.width)&&(e.height=e.width/this.aspectRatio),o=="sw"&&(e.left=i.left+(s.width-e.width),e.top=null),o=="nw"&&(e.top=i.top+(s.height-e.height),e.left=i.left+(s.width-e.width)),e},_respectSize:function(e,t){var n=this.helper,i=this._vBoundaries,s=this._aspectRatio||t.shiftKey,o=this.axis,u=r(e.width)&&i.maxWidth&&i.maxWidth<e.width,a=r(e.height)&&i.maxHeight&&i.maxHeight<e.height,f=r(e.width)&&i.minWidth&&i.minWidth>e.width,l=r(e.height)&&i.minHeight&&i.minHeight>e.height;f&&(e.width=i.minWidth),l&&(e.height=i.minHeight),u&&(e.width=i.maxWidth),a&&(e.height=i.maxHeight);var c=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,p=/sw|nw|w/.test(o),d=/nw|ne|n/.test(o);f&&p&&(e.left=c-i.minWidth),u&&p&&(e.left=c-i.maxWidth),l&&d&&(e.top=h-i.minHeight),a&&d&&(e.top=h-i.maxHeight);var v=!e.width&&!e.height;return v&&!e.left&&e.top?e.top=null:v&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){var t=this.options;if(!this._proportionallyResizeElements.length)return;var n=this.helper||this.element;for(var r=0;r<this._proportionallyResizeElements.length;r++){var i=this._proportionallyResizeElements[r];if(!this.borderDif){var s=[i.css("borderTopWidth"),i.css("borderRightWidth"),i.css("borderBottomWidth"),i.css("borderLeftWidth")],o=[i.css("paddingTop"),i.css("paddingRight"),i.css("paddingBottom"),i.css("paddingLeft")];this.borderDif=e.map(s,function(e,t){var n=parseInt(e,10)||0,r=parseInt(o[t],10)||0;return n+r})}i.css({height:n.height()-this.borderDif[0]-this.borderDif[2]||0,width:n.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var r=e.ui.ie6?1:0,i=e.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+i,height:this.element.outerHeight()+i,position:"absolute",left:this.elementOffset.left-r+"px",top:this.elementOffset.top-r+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t,n){return{width:this.originalSize.width+t}},w:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{top:s.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),t!="resize"&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","alsoResize",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof i.alsoResize=="object"&&!i.alsoResize.parentNode?i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)}):s(i.alsoResize)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};typeof i.alsoResize=="object"&&!i.alsoResize.nodeType?e.each(i.alsoResize,function(e,t){a(e,t)}):a(i.alsoResize)},stop:function(t,n){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),u=o&&e.ui.hasScroll(s[0],"left")?0:r.sizeDiff.height,a=o?0:r.sizeDiff.width,f={width:r.size.width-a,height:r.size.height-u},l=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,c=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;r.element.animate(e.extend(f,c&&l?{top:c,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var n={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),r._updateCache(n),r._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(t,r){var i=e(this).data("resizable"),s=i.options,o=i.element,u=s.containment,a=u instanceof e?u.get(0):/parent/.test(u)?o.parent().get(0):u;if(!a)return;i.containerElement=e(a);if(/document/.test(u)||u==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var f=e(a),l=[];e(["Top","Right","Left","Bottom"]).each(function(e,t){l[e]=n(f.css("padding"+t))}),i.containerOffset=f.offset(),i.containerPosition=f.position(),i.containerSize={height:f.innerHeight()-l[3],width:f.innerWidth()-l[1]};var c=i.containerOffset,h=i.containerSize.height,p=i.containerSize.width,d=e.ui.hasScroll(a,"left")?a.scrollWidth:p,v=e.ui.hasScroll(a)?a.scrollHeight:h;i.parentData={element:a,left:c.left,top:c.top,width:d,height:v}}},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.containerSize,o=r.containerOffset,u=r.size,a=r.position,f=r._aspectRatio||t.shiftKey,l={top:0,left:0},c=r.containerElement;c[0]!=document&&/static/.test(c.css("position"))&&(l=o),a.left<(r._helper?o.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-o.left:r.position.left-l.left),f&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=i.helper?o.left:0),a.top<(r._helper?o.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-o.top:r.position.top),f&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?o.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top;var h=Math.abs((r._helper?r.offset.left-l.left:r.offset.left-l.left)+r.sizeDiff.width),p=Math.abs((r._helper?r.offset.top-l.top:r.offset.top-o.top)+r.sizeDiff.height),d=r.containerElement.get(0)==r.element.parent().get(0),v=/relative|absolute/.test(r.containerElement.css("position"));d&&v&&(h-=r.parentData.left),h+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-h,f&&(r.size.height=r.size.width/r.aspectRatio)),p+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-p,f&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.position,o=r.containerOffset,u=r.containerPosition,a=r.containerElement,f=e(r.helper),l=f.offset(),c=f.outerWidth()-r.sizeDiff.width,h=f.outerHeight()-r.sizeDiff.height;r._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h}),r._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h})}}),e.ui.plugin.add("resizable","ghost",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size;r.ghost=r.originalElement.clone(),r.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:""),r.ghost.appendTo(r.helper)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.ghost.css({position:"relative",height:r.size.height,width:r.size.width})},stop:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.helper&&r.helper.get(0).removeChild(r.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size,o=r.originalSize,u=r.originalPosition,a=r.axis,f=i._aspectRatio||t.shiftKey;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var l=Math.round((s.width-o.width)/(i.grid[0]||1))*(i.grid[0]||1),c=Math.round((s.height-o.height)/(i.grid[1]||1))*(i.grid[1]||1);/^(se|s|e)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c):/^(ne)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c):/^(sw)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.left=u.left-l):(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c,r.position.left=u.left-l)}});var n=function(e){return parseInt(e,10)||0},r=function(e){return!isNaN(parseInt(e,10))}})(jQuery);(function(e,t){e.widget("ui.sortable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?e.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){t==="disabled"?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(t);var i=null,s=e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")==r)return i=e(this),!1});e.data(t.target,r.widgetName+"-item")==r&&(i=e(t.target));if(!i)return!1;if(this.options.handle&&!n){var o=!1;e(this.options.handle,i).find("*").andSelf().each(function(){this==t.target&&(o=!0)});if(!o)return!1}return this.currentItem=i,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){var i=this.options;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),i.containment&&this._setContainment(),i.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",i.cursor)),i.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",i.opacity)),i.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",i.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(var s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-e(document).scrollTop()<n.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed)),t.pageX-e(document).scrollLeft()<n.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var i=this.items.length-1;i>=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(!u)continue;if(s.instance!==this.currentContainer)continue;if(o!=this.currentItem[0]&&this.placeholder[u==1?"next":"prev"]()[0]!=o&&!e.contains(this.placeholder[0],o)&&(this.options.type=="semi-dynamic"?!e.contains(this.element[0],o):!0)){this.direction=u==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(!t)return;e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1},cancel:function(){if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left,c=r+f>u&&r+f<a&&t+l>s&&t+l<o;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?c:s<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<o&&u<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<a},_intersectsWithPointer:function(t){var n=this.options.axis==="x"||e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),r=this.options.axis==="y"||e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),i=n&&r,s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return i?this.floating?o&&o=="right"||s=="down"?2:1:s&&(s=="down"?2:1):!1},_intersectsWithSides:function(t){var n=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),r=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?s=="right"&&r||s=="left"&&!r:i&&(i=="down"&&n||i=="up"&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return e!=0&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return e!=0&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t)for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var s=r.length-1;s>=0;s--)r[s][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]==e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n=this.items,r=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],i=this._connectWith();if(i&&this.ready)for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))}}for(var s=r.length-1;s>=0;s--){var f=r[s][1],l=r[s][0];for(var u=0,c=l.length;u<c;u++){var h=e(l[u]);h.data(this.widgetName+"-item",f),n.push({item:h,instance:f,width:0,height:0,left:0,top:0})}}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var n=this.items.length-1;n>=0;n--){var r=this.items[n];if(r.instance!=this.currentContainer&&this.currentContainer&&r.item[0]!=this.currentItem[0])continue;var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight());var s=i.offset();r.left=s.left,r.top=s.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var n=this.containers.length-1;n>=0;n--){var s=this.containers[n].element.offset();this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n=t.options;if(!n.placeholder||n.placeholder.constructor==String){var r=n.placeholder;n.placeholder={element:function(){var n=e(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(n.style.visibility="hidden"),n},update:function(e,i){if(r&&!n.forcePlaceholderSize)return;i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))}}}t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n=null,r=null;for(var i=this.containers.length-1;i>=0;i--){if(e.contains(this.currentItem[0],this.containers[i].element[0]))continue;if(this._intersectsWith(this.containers[i].containerCache)){if(n&&e.contains(this.containers[i].element[0],n.element[0]))continue;n=this.containers[i],r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0)}if(!n)return;if(this.containers.length===1)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else{var s=1e4,o=null,u=this.containers[r].floating?"left":"top",a=this.containers[r].floating?"width":"height",f=this.positionAbs[u]+this.offset.click[u];for(var l=this.items.length-1;l>=0;l--){if(!e.contains(this.containers[r].element[0],this.items[l].item[0]))continue;if(this.items[l].item[0]==this.currentItem[0])continue;var c=this.items[l].item.offset()[u],h=!1;Math.abs(c-f)>Math.abs(c+this.items[l][a]-f)&&(h=!0,c+=this.items[l][a]),Math.abs(c-f)<s&&(s=Math.abs(c-f),o=this.items[l],this.direction=h?"up":"down")}if(!o&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[r],o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[r].element,!0),this._trigger("change",t,this._uiHash()),this.containers[r]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):n.helper=="clone"?this.currentItem.clone():this.currentItem;return r.parents("body").length||e(n.appendTo!="parent"?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(r[0].style.width==""||n.forceHelperSize)&&r.width(this.currentItem.width()),(r[0].style.height==""||n.forceHelperSize)&&r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)){var n=e(t.containment)[0],r=e(t.containment).offset(),i=e(n).css("overflow")!="hidden";this.containment=[r.left+(parseInt(e(n).css("borderLeftWidth"),10)||0)+(parseInt(e(n).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(e(n).css("borderTopWidth"),10)||0)+(parseInt(e(n).css("paddingTop"),10)||0)-this.margins.top,r.left+(i?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e(n).css("borderLeftWidth"),10)||0)-(parseInt(e(n).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(i?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e(n).css("borderTopWidth"),10)||0)-(parseInt(e(n).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var s=t.pageX,o=t.pageY;if(this.originalPosition){this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top));if(n.grid){var u=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1];o=this.containment?u-this.offset.click.top<this.containment[1]||u-this.offset.click.top>this.containment[3]?u-this.offset.click.top<this.containment[1]?u+n.grid[1]:u-n.grid[1]:u:u;var a=this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0];s=this.containment?a-this.offset.click.left<this.containment[0]||a-this.offset.click.left>this.containment[2]?a-this.offset.click.left<this.containment[0]?a+n.grid[0]:a-n.grid[0]:a:a}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i==this.counter&&this.refreshPositions(!r)})},_clear:function(t,n){this.reverting=!1;var r=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS)if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static")this._storedCSS[i]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!n&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!n&&r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(n||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))));for(var i=this.containers.length-1;i>=0;i--)n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(var i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}n||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!n){for(var i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})})(jQuery);(function(e,t){var n=0;e.widget("ui.autocomplete",{version:"1.9.2",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(i){if(this.element.prop("readOnly")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move("previousPage",i);break;case s.PAGE_DOWN:t=!0,this._move("nextPage",i);break;case s.UP:t=!0,this._keyEvent("previous",i);break;case s.DOWN:t=!0,this._keyEvent("next",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move("previousPage",r);break;case i.PAGE_DOWN:this._move("nextPage",r);break;case i.UP:this._keyEvent("previous",r);break;case i.DOWN:this._keyEvent("next",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(r){r.target!==t.element[0]&&r.target!==n&&!e.contains(n,r.target)&&t.close()})})},menufocus:function(t,n){if(this.isNewMenu){this.isNewMenu=!1;if(t.originalEvent&&/^mouse/.test(t.originalEvent.type)){this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});return}}var r=n.item.data("ui-autocomplete-item")||n.item.data("item.autocomplete");!1!==this._trigger("focus",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item")||t.item.data("item.autocomplete"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),e==="source"&&this._initSource(),e==="appendTo"&&this.menu.element.appendTo(this.document.find(t||"body")[0]),e==="disabled"&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))}):typeof this.options.source=="string"?(n=this.options.source,this.source=function(t,i){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){i(e)},error:function(){i([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){e=e!=null?e:this._value(),this.term=this._value();if(e.length<this.options.minLength)return this.close(t);if(this._trigger("search",t)===!1)return;return this._search(e)},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=this,t=++n;return function(r){t===n&&e.__response(r),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return typeof t=="string"?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var n=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(n,t),this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var r=this;e.each(n,function(e,n){r._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,n){return e("<li>").append(e("<a>").text(n.label)).appendTo(t)},_move:function(e,t){if(!this.menu.element.is(":visible")){this.search(null,t);return}if(this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)){this._value(this.term),this.menu.blur();return}this.menu[e](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(e,t),t.preventDefault()}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments);if(this.options.disabled||this.cancelSearch)return;e&&e.length?t=this.options.messages.results(e.length):t=this.options.messages.noResults,this.liveRegion.text(t)}})})(jQuery);(function(e,t){var n,r,i,s,o="ui-button ui-widget ui-state-default ui-corner-all",u="ui-state-hover ui-state-active ",a="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",f=function(){var t=e(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},l=function(t){var n=t.name,r=t.form,i=e([]);return n&&(r?i=e(r).find("[name='"+n+"']"):i=e("[name='"+n+"']",t.ownerDocument).filter(function(){return!this.form})),i};e.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,f),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,u=this.options,a=this.type==="checkbox"||this.type==="radio",c=a?"":"ui-state-active",h="ui-state-focus";u.label===null&&(u.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(u.disabled)return;this===n&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){if(u.disabled)return;e(this).removeClass(c)}).bind("click"+this.eventNamespace,function(e){u.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){t.buttonElement.addClass(h)}).bind("blur"+this.eventNamespace,function(){t.buttonElement.removeClass(h)}),a&&(this.element.bind("change"+this.eventNamespace,function(){if(s)return;t.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(e){if(u.disabled)return;s=!1,r=e.pageX,i=e.pageY}).bind("mouseup"+this.eventNamespace,function(e){if(u.disabled)return;if(r!==e.pageX||i!==e.pageY)s=!0})),this.type==="checkbox"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||s)return!1;e(this).toggleClass("ui-state-active"),t.buttonElement.attr("aria-pressed",t.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||s)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var n=t.element[0];l(n).not(n).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(u.disabled)return!1;e(this).addClass("ui-state-active"),n=this,t.document.one("mouseup",function(){n=null})}).bind("mouseup"+this.eventNamespace,function(){if(u.disabled)return!1;e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(u.disabled)return!1;(t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",u.disabled),this._resetButton()},_determineButtonType:function(){var e,t,n;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button",this.type==="checkbox"||this.type==="radio"?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),n=this.element.is(":checked"),n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+u+" "+a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){this._super(e,t);if(e==="disabled"){t?this.element.prop("disabled",!0):this.element.prop("disabled",!1);return}this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),this.type==="radio"?l(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var t=this.buttonElement.removeClass(a),n=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),r=this.options.icons,i=r.primary&&r.secondary,s=[];r.primary||r.secondary?(this.options.text&&s.push("ui-button-text-icon"+(i?"s":r.primary?"-primary":"-secondary")),r.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+r.primary+"'></span>"),r.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+r.secondary+"'></span>"),this.options.text||(s.push(i?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(n)))):s.push("ui-button-text-only"),t.addClass(s.join(" "))}}),e.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){e==="disabled"&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){$(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&$(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&$(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",function(){$.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])||($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&$(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&$(this).addClass("ui-datepicker-next-hover"))})}function extendRemove(e,t){$.extend(e,t);for(var n in t)if(t[n]==null||t[n]==undefined)e[n]=t[n];return e}$.extend($.ui,{datepicker:{version:"1.9.2"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(e,t){var n=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(e,t){var n=$(e);t.append=$([]),t.trigger=$([]);if(n.hasClass(this.markerClassName))return;this._attachments(n,t),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),this._autoSize(t),$.data(e,PROP_NAME,t),t.settings.disabled&&this._disableDatepicker(e)},_attachments:function(e,t){var n=this._get(t,"appendText"),r=this._get(t,"isRTL");t.append&&t.append.remove(),n&&(t.append=$('<span class="'+this._appendClass+'">'+n+"</span>"),e[r?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove();var i=this._get(t,"showOn");(i=="focus"||i=="both")&&e.focus(this._showDatepicker);if(i=="button"||i=="both"){var s=this._get(t,"buttonText"),o=this._get(t,"buttonImage");t.trigger=$(this._get(t,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):$('<button type="button"></button>').addClass(this._triggerClass).html(o==""?s:$("<img/>").attr({src:o,alt:s,title:s}))),e[r?"before":"after"](t.trigger),t.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==e[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(e[0])):$.datepicker._showDatepicker(e[0]),!1})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,11,20),n=this._get(e,"dateFormat");if(n.match(/[DM]/)){var r=function(e){var t=0,n=0;for(var r=0;r<e.length;r++)e[r].length>t&&(t=e[r].length,n=r);return n};t.setMonth(r(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),t.setDate(r(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var n=$(e);if(n.hasClass(this.markerClassName))return;n.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),$.data(e,PROP_NAME,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block")},_dialogDatepicker:function(e,t,n,r,i){var s=this._dialogInst;if(!s){this.uuid+=1;var o="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+o+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},$.data(this._dialogInput[0],PROP_NAME,s)}extendRemove(s.settings,r||{}),t=t&&t.constructor==Date?this._formatDate(s,t):t,this._dialogInput.val(t),this._pos=i?i.length?i:[i.pageX,i.pageY]:null;if(!this._pos){var u=document.documentElement.clientWidth,a=document.documentElement.clientHeight,f=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[u/2-100+f,a/2-150+l]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,s),this},_destroyDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName))return;var r=e.nodeName.toLowerCase();$.removeData(e,PROP_NAME),r=="input"?(n.append.remove(),n.trigger.remove(),t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(r=="div"||r=="span")&&t.removeClass(this.markerClassName).empty()},_enableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName))return;var r=e.nodeName.toLowerCase();if(r=="input")e.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);i.children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t})},_disableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName))return;var r=e.nodeName.toLowerCase();if(r=="input")e.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);i.children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t}),this._disabledInputs[this._disabledInputs.length]=e},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]==e)return!0;return!1},_getInst:function(e){try{return $.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var r=this._getInst(e);if(arguments.length==2&&typeof t=="string")return t=="defaults"?$.extend({},$.datepicker._defaults):r?t=="all"?$.extend({},r.settings):this._get(r,t):null;var i=t||{};typeof t=="string"&&(i={},i[t]=n);if(r){this._curInst==r&&this._hideDatepicker();var s=this._getDateDatepicker(e,!0),o=this._getMinMaxDate(r,"min"),u=this._getMinMaxDate(r,"max");extendRemove(r.settings,i),o!==null&&i.dateFormat!==undefined&&i.minDate===undefined&&(r.settings.minDate=this._formatDate(r,o)),u!==null&&i.dateFormat!==undefined&&i.maxDate===undefined&&(r.settings.maxDate=this._formatDate(r,u)),this._attachments($(e),r),this._autoSize(r),this._setDate(r,s),this._updateAlternate(r),this._updateDatepicker(r)}},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(e){var t=$.datepicker._getInst(e.target),n=!0,r=t.dpDiv.is(".ui-datepicker-rtl");t._keyEvent=!0;if($.datepicker._datepickerShowing)switch(e.keyCode){case 9:$.datepicker._hideDatepicker(),n=!1;break;case 13:var i=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",t.dpDiv);i[0]&&$.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,i[0]);var s=$.datepicker._get(t,"onSelect");if(s){var o=$.datepicker._formatDate(t);s.apply(t.input?t.input[0]:null,[o,t])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&$.datepicker._clearDate(e.target),n=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&$.datepicker._gotoToday(e.target),n=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,r?1:-1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,-7,"D"),n=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,r?-1:1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,7,"D"),n=e.ctrlKey||e.metaKey;break;default:n=!1}else e.keyCode==36&&e.ctrlKey?$.datepicker._showDatepicker(this):n=!1;n&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t=$.datepicker._getInst(e.target);if($.datepicker._get(t,"constrainInput")){var n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||r<" "||!n||n.indexOf(r)>-1}},_doKeyUp:function(e){var t=$.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal)try{var n=$.datepicker.parseDate($.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,$.datepicker._getFormatConfig(t));n&&($.datepicker._setDateFromField(t),$.datepicker._updateAlternate(t),$.datepicker._updateDatepicker(t))}catch(r){$.datepicker.log(r)}return!0},_showDatepicker:function(e){e=e.target||e,e.nodeName.toLowerCase()!="input"&&(e=$("input",e.parentNode)[0]);if($.datepicker._isDisabledDatepicker(e)||$.datepicker._lastInput==e)return;var t=$.datepicker._getInst(e);$.datepicker._curInst&&$.datepicker._curInst!=t&&($.datepicker._curInst.dpDiv.stop(!0,!0),t&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var n=$.datepicker._get(t,"beforeShow"),r=n?n.apply(e,[e,t]):{};if(r===!1)return;extendRemove(t.settings,r),t.lastVal=null,$.datepicker._lastInput=e,$.datepicker._setDateFromField(t),$.datepicker._inDialog&&(e.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(e),$.datepicker._pos[1]+=e.offsetHeight);var i=!1;$(e).parents().each(function(){return i|=$(this).css("position")=="fixed",!i});var s={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(t),s=$.datepicker._checkOffset(t,s,i),t.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":i?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"});if(!t.inline){var o=$.datepicker._get(t,"showAnim"),u=$.datepicker._get(t,"duration"),a=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");if(!!e.length){var n=$.datepicker._getBorders(t.dpDiv);e.css({left:-n[0],top:-n[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex($(e).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&($.effects.effect[o]||$.effects[o])?t.dpDiv.show(o,$.datepicker._get(t,"showOptions"),u,a):t.dpDiv[o||"show"](o?u:null,a),(!o||!u)&&a(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.datepicker._curInst=t}},_updateDatepicker:function(e){this.maxRows=4;var t=$.datepicker._getBorders(e.dpDiv);instActive=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var n=e.dpDiv.find("iframe.ui-datepicker-cover");!n.length||n.css({left:-t[0],top:-t[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()}),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var r=this._getNumberOfMonths(e),i=r[1],s=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),i>1&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",s*i+"em"),e.dpDiv[(r[0]!=1||r[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e==$.datepicker._curInst&&$.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement&&e.input.focus();if(e.yearshtml){var o=e.yearshtml;setTimeout(function(){o===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),o=e.yearshtml=null},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},_checkOffset:function(e,t,n){var r=e.dpDiv.outerWidth(),i=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,u=document.documentElement.clientWidth+(n?0:$(document).scrollLeft()),a=document.documentElement.clientHeight+(n?0:$(document).scrollTop());return t.left-=this._get(e,"isRTL")?r-s:0,t.left-=n&&t.left==e.input.offset().left?$(document).scrollLeft():0,t.top-=n&&t.top==e.input.offset().top+o?$(document).scrollTop():0,t.left-=Math.min(t.left,t.left+r>u&&u>r?Math.abs(t.left+r-u):0),t.top-=Math.min(t.top,t.top+i>a&&a>i?Math.abs(i+o):0),t},_findPos:function(e){var t=this._getInst(e),n=this._get(t,"isRTL");while(e&&(e.type=="hidden"||e.nodeType!=1||$.expr.filters.hidden(e)))e=e[n?"previousSibling":"nextSibling"];var r=$(e).offset();return[r.left,r.top]},_hideDatepicker:function(e){var t=this._curInst;if(!t||e&&t!=$.data(e,PROP_NAME))return;if(this._datepickerShowing){var n=this._get(t,"showAnim"),r=this._get(t,"duration"),i=function(){$.datepicker._tidyDialog(t)};$.effects&&($.effects.effect[n]||$.effects[n])?t.dpDiv.hide(n,$.datepicker._get(t,"showOptions"),r,i):t.dpDiv[n=="slideDown"?"slideUp":n=="fadeIn"?"fadeOut":"hide"](n?r:null,i),n||i(),this._datepickerShowing=!1;var s=this._get(t,"onClose");s&&s.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(!$.datepicker._curInst)return;var t=$(e.target),n=$.datepicker._getInst(t[0]);(t[0].id!=$.datepicker._mainDivId&&t.parents("#"+$.datepicker._mainDivId).length==0&&!t.hasClass($.datepicker.markerClassName)&&!t.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||t.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=n)&&$.datepicker._hideDatepicker()},_adjustDate:function(e,t,n){var r=$(e),i=this._getInst(r[0]);if(this._isDisabledDatepicker(r[0]))return;this._adjustInstDate(i,t+(n=="M"?this._get(i,"showCurrentAtPos"):0),n),this._updateDatepicker(i)},_gotoToday:function(e){var t=$(e),n=this._getInst(t[0]);if(this._get(n,"gotoCurrent")&&n.currentDay)n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear;else{var r=new Date;n.selectedDay=r.getDate(),n.drawMonth=n.selectedMonth=r.getMonth(),n.drawYear=n.selectedYear=r.getFullYear()}this._notifyChange(n),this._adjustDate(t)},_selectMonthYear:function(e,t,n){var r=$(e),i=this._getInst(r[0]);i["selected"+(n=="M"?"Month":"Year")]=i["draw"+(n=="M"?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(r)},_selectDay:function(e,t,n,r){var i=$(e);if($(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(i[0]))return;var s=this._getInst(i[0]);s.selectedDay=s.currentDay=$("a",r).html(),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=n,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear))},_clearDate:function(e){var t=$(e),n=this._getInst(t[0]);this._selectDate(t,"")},_selectDate:function(e,t){var n=$(e),r=this._getInst(n[0]);t=t!=null?t:this._formatDate(r),r.input&&r.input.val(t),this._updateAlternate(r);var i=this._get(r,"onSelect");i?i.apply(r.input?r.input[0]:null,[t,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],typeof r.input[0]!="object"&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var n=this._get(e,"altFormat")||this._get(e,"dateFormat"),r=this._getDate(e),i=this.formatDate(n,r,this._getFormatConfig(e));$(t).each(function(){$(this).val(i)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1},parseDate:function(e,t,n){if(e==null||t==null)throw"Invalid arguments";t=typeof t=="object"?t.toString():t+"";if(t=="")return null;var r=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff;r=typeof r!="string"?r:(new Date).getFullYear()%100+parseInt(r,10);var i=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,s=(n?n.dayNames:null)||this._defaults.dayNames,o=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,u=(n?n.monthNames:null)||this._defaults.monthNames,a=-1,f=-1,l=-1,c=-1,h=!1,p=function(t){var n=y+1<e.length&&e.charAt(y+1)==t;return n&&y++,n},d=function(e){var n=p(e),r=e=="@"?14:e=="!"?20:e=="y"&&n?4:e=="o"?3:2,i=new RegExp("^\\d{1,"+r+"}"),s=t.substring(g).match(i);if(!s)throw"Missing number at position "+g;return g+=s[0].length,parseInt(s[0],10)},v=function(e,n,r){var i=$.map(p(e)?r:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)}),s=-1;$.each(i,function(e,n){var r=n[1];if(t.substr(g,r.length).toLowerCase()==r.toLowerCase())return s=n[0],g+=r.length,!1});if(s!=-1)return s+1;throw"Unknown name at position "+g},m=function(){if(t.charAt(g)!=e.charAt(y))throw"Unexpected literal at position "+g;g++},g=0;for(var y=0;y<e.length;y++)if(h)e.charAt(y)=="'"&&!p("'")?h=!1:m();else switch(e.charAt(y)){case"d":l=d("d");break;case"D":v("D",i,s);break;case"o":c=d("o");break;case"m":f=d("m");break;case"M":f=v("M",o,u);break;case"y":a=d("y");break;case"@":var b=new Date(d("@"));a=b.getFullYear(),f=b.getMonth()+1,l=b.getDate();break;case"!":var b=new Date((d("!")-this._ticksTo1970)/1e4);a=b.getFullYear(),f=b.getMonth()+1,l=b.getDate();break;case"'":p("'")?m():h=!0;break;default:m()}if(g<t.length){var w=t.substr(g);if(!/^\s+/.test(w))throw"Extra/unparsed characters found in date: "+w}a==-1?a=(new Date).getFullYear():a<100&&(a+=(new Date).getFullYear()-(new Date).getFullYear()%100+(a<=r?0:-100));if(c>-1){f=1,l=c;do{var E=this._getDaysInMonth(a,f-1);if(l<=E)break;f++,l-=E}while(!0)}var b=this._daylightSavingAdjust(new Date(a,f-1,l));if(b.getFullYear()!=a||b.getMonth()+1!=f||b.getDate()!=l)throw"Invalid date";return b},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(e,t,n){if(!t)return"";var r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,i=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,o=(n?n.monthNames:null)||this._defaults.monthNames,u=function(t){var n=h+1<e.length&&e.charAt(h+1)==t;return n&&h++,n},a=function(e,t,n){var r=""+t;if(u(e))while(r.length<n)r="0"+r;return r},f=function(e,t,n,r){return u(e)?r[t]:n[t]},l="",c=!1;if(t)for(var h=0;h<e.length;h++)if(c)e.charAt(h)=="'"&&!u("'")?c=!1:l+=e.charAt(h);else switch(e.charAt(h)){case"d":l+=a("d",t.getDate(),2);break;case"D":l+=f("D",t.getDay(),r,i);break;case"o":l+=a("o",Math.round(((new Date(t.getFullYear(),t.getMonth(),t.getDate())).getTime()-(new Date(t.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":l+=a("m",t.getMonth()+1,2);break;case"M":l+=f("M",t.getMonth(),s,o);break;case"y":l+=u("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=t.getTime()*1e4+this._ticksTo1970;break;case"'":u("'")?l+="'":c=!0;break;default:l+=e.charAt(h)}return l},_possibleChars:function(e){var t="",n=!1,r=function(t){var n=i+1<e.length&&e.charAt(i+1)==t;return n&&i++,n};for(var i=0;i<e.length;i++)if(n)e.charAt(i)=="'"&&!r("'")?n=!1:t+=e.charAt(i);else switch(e.charAt(i)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":r("'")?t+="'":n=!0;break;default:t+=e.charAt(i)}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()==e.lastVal)return;var n=this._get(e,"dateFormat"),r=e.lastVal=e.input?e.input.val():null,i,s;i=s=this._getDefaultDate(e);var o=this._getFormatConfig(e);try{i=this.parseDate(n,r,o)||s}catch(u){this.log(u),r=t?"":r}e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),e.currentDay=r?i.getDate():0,e.currentMonth=r?i.getMonth():0,e.currentYear=r?i.getFullYear():0,this._adjustInstDate(e)},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(e,t,n){var r=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},i=function(t){try{return $.datepicker.parseDate($.datepicker._get(e,"dateFormat"),t,$.datepicker._getFormatConfig(e))}catch(n){}var r=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(e):null)||new Date,i=r.getFullYear(),s=r.getMonth(),o=r.getDate(),u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=u.exec(t);while(a){switch(a[2]||"d"){case"d":case"D":o+=parseInt(a[1],10);break;case"w":case"W":o+=parseInt(a[1],10)*7;break;case"m":case"M":s+=parseInt(a[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(i,s))}a=u.exec(t)}return new Date(i,s,o)},s=t==null||t===""?n:typeof t=="string"?i(t):typeof t=="number"?isNaN(t)?n:r(t):new Date(t.getTime());return s=s&&s.toString()=="Invalid Date"?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var r=!t,i=e.selectedMonth,s=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),(i!=e.selectedMonth||s!=e.selectedYear)&&!n&&this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(r?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&e.input.val()==""?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,-t,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,+t,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(n)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t=new Date;t=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth(),t.getDate()));var n=this._get(e,"isRTL"),r=this._get(e,"showButtonPanel"),i=this._get(e,"hideIfNoPrevNext"),s=this._get(e,"navigationAsDateFormat"),o=this._getNumberOfMonths(e),u=this._get(e,"showCurrentAtPos"),a=this._get(e,"stepMonths"),f=o[0]!=1||o[1]!=1,l=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),c=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),p=e.drawMonth-u,d=e.drawYear;p<0&&(p+=12,d--);if(h){var v=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth()-o[0]*o[1]+1,h.getDate()));v=c&&v<c?c:v;while(this._daylightSavingAdjust(new Date(d,p,1))>v)p--,p<0&&(p=11,d--)}e.drawMonth=p,e.drawYear=d;var m=this._get(e,"prevText");m=s?this.formatDate(m,this._daylightSavingAdjust(new Date(d,p-a,1)),this._getFormatConfig(e)):m;var g=this._canAdjustMonth(e,-1,d,p)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>":i?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>",y=this._get(e,"nextText");y=s?this.formatDate(y,this._daylightSavingAdjust(new Date(d,p+a,1)),this._getFormatConfig(e)):y;var b=this._canAdjustMonth(e,1,d,p)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>":i?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>",w=this._get(e,"currentText"),E=this._get(e,"gotoCurrent")&&e.currentDay?l:t;w=s?this.formatDate(w,E,this._getFormatConfig(e)):w;var S=e.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(e,"closeText")+"</button>",x=r?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?S:"")+(this._isInRange(e,E)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+w+"</button>":"")+(n?"":S)+"</div>":"",T=parseInt(this._get(e,"firstDay"),10);T=isNaN(T)?0:T;var N=this._get(e,"showWeek"),C=this._get(e,"dayNames"),k=this._get(e,"dayNamesShort"),L=this._get(e,"dayNamesMin"),A=this._get(e,"monthNames"),O=this._get(e,"monthNamesShort"),M=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),D=this._get(e,"selectOtherMonths"),P=this._get(e,"calculateWeek")||this.iso8601Week,H=this._getDefaultDate(e),B="";for(var j=0;j<o[0];j++){var F="";this.maxRows=4;for(var I=0;I<o[1];I++){var q=this._daylightSavingAdjust(new Date(d,p,e.selectedDay)),R=" ui-corner-all",U="";if(f){U+='<div class="ui-datepicker-group';if(o[1]>1)switch(I){case 0:U+=" ui-datepicker-group-first",R=" ui-corner-"+(n?"right":"left");break;case o[1]-1:U+=" ui-datepicker-group-last",R=" ui-corner-"+(n?"left":"right");break;default:U+=" ui-datepicker-group-middle",R=""}U+='">'}U+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+R+'">'+(/all|left/.test(R)&&j==0?n?b:g:"")+(/all|right/.test(R)&&j==0?n?g:b:"")+this._generateMonthYearHeader(e,p,d,c,h,j>0||I>0,A,O)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var z=N?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"";for(var W=0;W<7;W++){var X=(W+T)%7;z+="<th"+((W+T+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+C[X]+'">'+L[X]+"</span></th>"}U+=z+"</tr></thead><tbody>";var V=this._getDaysInMonth(d,p);d==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,V));var J=(this._getFirstDayOfMonth(d,p)-T+7)%7,K=Math.ceil((J+V)/7),Q=f?this.maxRows>K?this.maxRows:K:K;this.maxRows=Q;var G=this._daylightSavingAdjust(new Date(d,p,1-J));for(var Y=0;Y<Q;Y++){U+="<tr>";var Z=N?'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(G)+"</td>":"";for(var W=0;W<7;W++){var et=M?M.apply(e.input?e.input[0]:null,[G]):[!0,""],tt=G.getMonth()!=p,nt=tt&&!D||!et[0]||c&&G<c||h&&G>h;Z+='<td class="'+((W+T+6)%7>=5?" ui-datepicker-week-end":"")+(tt?" ui-datepicker-other-month":"")+(G.getTime()==q.getTime()&&p==e.selectedMonth&&e._keyEvent||H.getTime()==G.getTime()&&H.getTime()==q.getTime()?" "+this._dayOverClass:"")+(nt?" "+this._unselectableClass+" ui-state-disabled":"")+(tt&&!_?"":" "+et[1]+(G.getTime()==l.getTime()?" "+this._currentClass:"")+(G.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+((!tt||_)&&et[2]?' title="'+et[2]+'"':"")+(nt?"":' data-handler="selectDay" data-event="click" data-month="'+G.getMonth()+'" data-year="'+G.getFullYear()+'"')+">"+(tt&&!_?" ":nt?'<span class="ui-state-default">'+G.getDate()+"</span>":'<a class="ui-state-default'+(G.getTime()==t.getTime()?" ui-state-highlight":"")+(G.getTime()==l.getTime()?" ui-state-active":"")+(tt?" ui-priority-secondary":"")+'" href="#">'+G.getDate()+"</a>")+"</td>",G.setDate(G.getDate()+1),G=this._daylightSavingAdjust(G)}U+=Z+"</tr>"}p++,p>11&&(p=0,d++),U+="</tbody></table>"+(f?"</div>"+(o[0]>0&&I==o[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),F+=U}B+=F}return B+=x+($.ui.ie6&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,B},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth"),f=this._get(e,"changeYear"),l=this._get(e,"showMonthAfterYear"),c='<div class="ui-datepicker-title">',h="";if(s||!a)h+='<span class="ui-datepicker-month">'+o[t]+"</span>";else{var p=r&&r.getFullYear()==n,d=i&&i.getFullYear()==n;h+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var v=0;v<12;v++)(!p||v>=r.getMonth())&&(!d||v<=i.getMonth())&&(h+='<option value="'+v+'"'+(v==t?' selected="selected"':"")+">"+u[v]+"</option>");h+="</select>"}l||(c+=h+(s||!a||!f?" ":""));if(!e.yearshtml){e.yearshtml="";if(s||!f)c+='<span class="ui-datepicker-year">'+n+"</span>";else{var m=this._get(e,"yearRange").split(":"),g=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);return isNaN(t)?g:t},b=y(m[0]),w=Math.max(b,y(m[1]||""));b=r?Math.max(b,r.getFullYear()):b,w=i?Math.min(w,i.getFullYear()):w,e.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';for(;b<=w;b++)e.yearshtml+='<option value="'+b+'"'+(b==n?' selected="selected"':"")+">"+b+"</option>";e.yearshtml+="</select>",c+=e.yearshtml,e.yearshtml=null}}return c+=this._get(e,"yearSuffix"),l&&(c+=(s||!a||!f?" ":"")+h),c+="</div>",c},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n=="Y"?t:0),i=e.drawMonth+(n=="M"?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n=="D"?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,s)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),(n=="M"||n=="Y")&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&t<n?n:t;return i=r&&i>r?r:i,i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new Date(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return typeof e!="string"||e!="isDisabled"&&e!="getDate"&&e!="widget"?e=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){typeof e=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(e,t){var n="ui-dialog ui-widget ui-widget-content ui-corner-all ",r={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var t=this,r=this.options,i=r.title||" ",s,o,u,a,f;s=(this.uiDialog=e("<div>")).addClass(n+r.dialogClass).css({display:"none",outline:0,zIndex:r.zIndex}).attr("tabIndex",-1).keydown(function(n){r.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===e.ui.keyCode.ESCAPE&&(t.close(n),n.preventDefault())}).mousedown(function(e){t.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s),o=(this.uiDialogTitlebar=e("<div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){s.focus()}).prependTo(s),u=e("<a href='#'></a>").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),t.close(e)}).appendTo(o),(this.uiDialogTitlebarCloseText=e("<span>")).addClass("ui-icon ui-icon-closethick").text(r.closeText).appendTo(u),a=e("<span>").uniqueId().addClass("ui-dialog-title").html(i).prependTo(o),f=(this.uiDialogButtonPane=e("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("<div>")).addClass("ui-dialog-buttonset").appendTo(f),s.attr({role:"dialog","aria-labelledby":a.attr("id")}),o.find("*").add(o).disableSelection(),this._hoverable(u),this._focusable(u),r.draggable&&e.fn.draggable&&this._makeDraggable(),r.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(r.buttons),this._isOpen=!1,e.fn.bgiframe&&s.bgiframe(),this._on(s,{keydown:function(t){if(!r.modal||t.keyCode!==e.ui.keyCode.TAB)return;var n=e(":tabbable",s),i=n.filter(":first"),o=n.filter(":last");if(t.target===o[0]&&!t.shiftKey)return i.focus(1),!1;if(t.target===i[0]&&t.shiftKey)return o.focus(1),!1}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var n=this,r,i;if(!this._isOpen)return;if(!1===this._trigger("beforeClose",t))return;return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(r=0,e(".ui-dialog").each(function(){this!==n.uiDialog[0]&&(i=e(this).css("z-index"),isNaN(i)||(r=Math.max(r,i)))}),e.ui.dialog.maxZ=r),this},isOpen:function(){return this._isOpen},moveToTop:function(t,n){var r=this.options,i;return r.modal&&!t||!r.stack&&!r.modal?this._trigger("focus",n):(r.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=r.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),i={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(i),this._trigger("focus",n),this)},open:function(){if(this._isOpen)return;var t,n=this.options,r=this.uiDialog;return this._size(),this._position(n.position),r.show(n.show),this.overlay=n.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=r)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this},_createButtons:function(t){var n=this,r=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),typeof t=="object"&&t!==null&&e.each(t,function(){return!(r=!0)}),r?(e.each(t,function(t,r){var i,s;r=e.isFunction(r)?{click:r,text:t}:r,r=e.extend({type:"button"},r),s=r.click,r.click=function(){s.apply(n.element[0],arguments)},i=e("<button></button>",r).appendTo(n.uiButtonSet),e.fn.button&&i.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function r(e){return{position:e.position,offset:e.offset}}var t=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,i){e(this).addClass("ui-dialog-dragging"),t._trigger("dragStart",n,r(i))},drag:function(e,n){t._trigger("drag",e,r(n))},stop:function(i,s){n.position=[s.position.left-t.document.scrollLeft(),s.position.top-t.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),t._trigger("dragStop",i,r(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(n){function u(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}n=n===t?this.options.resizable:n;var r=this,i=this.options,s=this.uiDialog.css("position"),o=typeof n=="string"?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:o,start:function(t,n){e(this).addClass("ui-dialog-resizing"),r._trigger("resizeStart",t,u(n))},resize:function(e,t){r._trigger("resize",e,u(t))},stop:function(t,n){e(this).removeClass("ui-dialog-resizing"),i.height=e(this).height(),i.width=e(this).width(),r._trigger("resizeStop",t,u(n)),e.ui.dialog.overlay.resize()}}).css("position",s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var n=[],r=[0,0],i;if(t){if(typeof t=="string"||typeof t=="object"&&"0"in t)n=t.split?t.split(" "):[t[0],t[1]],n.length===1&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(r[e]=n[e],n[e]=t)}),t={my:n[0]+(r[0]<0?r[0]:"+"+r[0])+" "+n[1]+(r[1]<0?r[1]:"+"+r[1]),at:n.join(" ")};t=e.extend({},e.ui.dialog.prototype.options.position,t)}else t=e.ui.dialog.prototype.options.position;i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()},_setOptions:function(t){var n=this,s={},o=!1;e.each(t,function(e,t){n._setOption(e,t),e in r&&(o=!0),e in i&&(s[e]=t)}),o&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,r){var i,s,o=this.uiDialog;switch(t){case"buttons":this._createButtons(r);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+r);break;case"dialogClass":o.removeClass(this.options.dialogClass).addClass(n+r);break;case"disabled":r?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":i=o.is(":data(draggable)"),i&&!r&&o.draggable("destroy"),!i&&r&&this._makeDraggable();break;case"position":this._position(r);break;case"resizable":s=o.is(":data(resizable)"),s&&!r&&o.resizable("destroy"),s&&typeof r=="string"&&o.resizable("option","handles",r),!s&&r!==!1&&this._makeResizable(r);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(r||" "))}this._super(t,r)},_size:function(){var t,n,r,i=this.options,s=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),n=Math.max(0,i.minHeight-t),i.height==="auto"?e.support.minHeight?this.element.css({minHeight:n,height:"auto"}):(this.uiDialog.show(),r=this.element.css("height","auto").height(),s||this.uiDialog.hide(),this.element.height(Math.max(r,n))):this.element.height(Math.max(i.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(t){this.instances.length===0&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(t){if(e(t.target).zIndex()<e.ui.dialog.overlay.maxZ)return!1})},1),e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize));var n=this.oldInstances.pop()||e("<div>").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(r){var i=e.ui.dialog.overlay.instances;i.length!==0&&i[i.length-1]===n&&t.options.closeOnEscape&&!r.isDefaultPrevented()&&r.keyCode&&r.keyCode===e.ui.keyCode.ESCAPE&&(t.close(r),r.preventDefault())}),n.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&n.bgiframe(),this.instances.push(n),n},destroy:function(t){var n=e.inArray(t,this.instances),r=0;n!==-1&&this.oldInstances.push(this.instances.splice(n,1)[0]),this.instances.length===0&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){r=Math.max(r,this.css("z-index"))}),this.maxZ=r},height:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),n=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),t<n?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),n=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),t<n?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(e,t){var n=!1;e.widget("ui.menu",{version:"1.9.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var r=e(t.target).closest(".ui-menu-item");!n&&r.not(".ui-state-disabled").length&&(n=!0,this.select(t),r.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),n=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,r,i,s,o,u=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:u=!1,r=this.previousFilter||"",i=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),i===r?s=!0:i=r+i,o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(i=String.fromCharCode(t.keyCode),o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}u&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus);r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),r=t.prev("a"),i=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);r.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",r.attr("id"))}),t=r.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var n,r;this.blur(e,e&&e.type==="focus"),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&e.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,r,i,s,o,u;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),u=t.height(),i<0?this.activeMenu.scrollTop(s+i):i+u>o&&this.activeMenu.scrollTop(s+i-o+u))},blur:function(e,t){t||clearTimeout(this.timer);if(!this.active)return;this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active})},_startOpening:function(e){clearTimeout(this.timer);if(e.attr("aria-hidden")!=="true")return;this.timer=this._delay(function(){this._close(),this._open(e)},this.delay)},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var r;this.active&&(e==="first"||e==="last"?r=this.active[e==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):r=this.active[e+"All"](".ui-menu-item").eq(0));if(!r||!r.length||!this.active)r=this.activeMenu.children(".ui-menu-item")[t]();this.focus(n,r)},nextPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isLastItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r-i<0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())},previousPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isFirstItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r+i>0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)}})})(jQuery);(function(e,t){var n=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var t,r,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",u=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(i.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),i.range&&(i.range===!0&&(i.values||(i.values=[this._valueMin(),this._valueMin()]),i.values.length&&i.values.length!==2&&(i.values=[i.values[0],i.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(i.range==="min"||i.range==="max"?" ui-slider-range-"+i.range:""))),r=i.values&&i.values.length||1;for(t=s.length;t<r;t++)u.push(o);this.handles=s.add(e(u.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).mouseenter(function(){i.disabled||e(this).addClass("ui-state-hover")}).mouseleave(function(){e(this).removeClass("ui-state-hover")}).focus(function(){i.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)}),this._on(this.handles,{keydown:function(t){var r,i,s,o,u=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:t.preventDefault();if(!this._keySliding){this._keySliding=!0,e(t.target).addClass("ui-state-active"),r=this._start(t,u);if(r===!1)return}}o=this.options.step,this.options.values&&this.options.values.length?i=s=this.values(u):i=s=this.value();switch(t.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-o)}this._slide(t,u,s)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),e(t.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var n,r,i,s,o,u,a,f,l=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(r-l.values(t));i>n&&(i=n,s=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,s=e(this.handles[o])),u=this._start(t,o),u===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),a=s.offset(),f=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=f?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i,s;return this.orientation==="horizontal"?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),r=n/t,r>1&&(r=1),r<0&&(r=0),this.orientation==="vertical"&&(r=1-r),i=this._valueMax()-this._valueMin(),s=this._valueMin()+r*i,this._trimAlignValue(s)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var r,i,s;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&n>r||t===1&&n<r)&&(n=r),n!==this.values(t)&&(i=this.values(),i[t]=n,s=this._trigger("slide",e,{handle:this.handles[t],value:n,values:i}),r=this.values(t?0:1),s!==!1&&this.values(t,n,!0))):n!==this.value()&&(s=this._trigger("slide",e,{handle:this.handles[t],value:n}),s!==!1&&this.value(n))},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("change",e,n)}},value:function(e){if(arguments.length){this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(t,n){var r,i,s;if(arguments.length>1){this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t);return}if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();r=this.options.values,i=arguments[0];for(s=0;s<r.length;s+=1)r[s]=this._trimAlignValue(i[s]),this._change(null,s);this._refreshValue()},_setOption:function(t,n){var r,i=0;e.isArray(this.options.values)&&(i=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments);switch(t){case"disabled":n?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(r=0;r<i;r+=1)this._change(null,r);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e),e},_values:function(e){var t,n,r;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t),t;n=this.options.values.slice();for(r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(n[r]);return n},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return Math.abs(n)*2>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,r,i,s,o=this.options.range,u=this.options,a=this,f=this._animateOff?!1:u.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(r){n=(a.values(r)-a._valueMin())/(a._valueMax()-a._valueMin())*100,l[a.orientation==="horizontal"?"left":"bottom"]=n+"%",e(this).stop(1,1)[f?"animate":"css"](l,u.animate),a.options.range===!0&&(a.orientation==="horizontal"?(r===0&&a.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:u.animate})):(r===0&&a.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:u.animate}))),t=n}):(r=this.value(),i=this._valueMin(),s=this._valueMax(),n=s!==i?(r-i)/(s-i)*100:0,l[this.orientation==="horizontal"?"left":"bottom"]=n+"%",this.handle.stop(1,1)[f?"animate":"css"](l,u.animate),o==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},u.animate),o==="max"&&this.orientation==="horizontal"&&this.range[f?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:u.animate}),o==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[f?"animate":"css"]({height:n+"%"},u.animate),o==="max"&&this.orientation==="vertical"&&this.range[f?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:u.animate}))}})})(jQuery);(function(e,t){function i(){return++n}function s(e){return e.hash.length>1&&e.href.replace(r,"")===location.href.replace(r,"").replace(/\s/g,"%20")}var n=0,r=/#.*$/;e.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,n=this.options,r=n.active,i=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs();if(r===null){i&&this.tabs.each(function(t,n){if(e(n).attr("aria-controls")===i)return r=t,!1}),r===null&&(r=this.tabs.index(this.tabs.filter(".ui-tabs-active")));if(r===null||r===-1)r=this.tabs.length?0:!1}r!==!1&&(r=this.tabs.index(this.tabs.eq(r)),r===-1&&(r=n.collapsible?!1:0)),n.active=r,!n.collapsible&&n.active===!1&&this.anchors.length&&(n.active=0),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(this.options.active):this.active=e(),this._refresh(),this.active.length&&this.load(n.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(this.document[0].activeElement).closest("li"),r=this.tabs.index(n),i=!0;if(this._handlePageNav(t))return;switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:r++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:i=!1,r--;break;case e.ui.keyCode.END:r=this.anchors.length-1;break;case e.ui.keyCode.HOME:r=0;break;case e.ui.keyCode.SPACE:t.preventDefault(),clearTimeout(this.activating),this._activate(r);return;case e.ui.keyCode.ENTER:t.preventDefault(),clearTimeout(this.activating),this._activate(r===this.options.active?!1:r);return;default:return}t.preventDefault(),clearTimeout(this.activating),r=this._focusNextTab(r,i),t.ctrlKey||(n.attr("aria-selected","false"),this.tabs.eq(r).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",r)},this.delay))},_panelKeydown:function(t){if(this._handlePageNav(t))return;t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(t,n){function i(){return t>r&&(t=0),t<0&&(t=r),t}var r=this.tabs.length-1;while(e.inArray(i(),this.options.disabled)!==-1)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){if(e==="active"){this._activate(t);return}if(e==="disabled"){this._setupDisabled(t);return}this._super(e,t),e==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",t),!t&&this.options.active===!1&&this._activate(0)),e==="event"&&this._setupEvents(t),e==="heightStyle"&&this._setupHeightStyle(t)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active===!1||!this.anchors.length?(t.active=!1,this.active=e()):this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(n,r){var i,o,u,a=e(r).uniqueId().attr("id"),f=e(r).closest("li"),l=f.attr("aria-controls");s(r)?(i=r.hash,o=t.element.find(t._sanitizeSelector(i))):(u=t._tabId(f),i="#"+u,o=t.element.find(i),o.length||(o=t._createPanel(u),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),l&&f.data("ui-tabs-aria-controls",l),f.attr({"aria-controls":i.substring(1),"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n=0,r;r=this.tabs[n];n++)t===!0||e.inArray(n,t)!==-1?e(r).addClass("ui-state-disabled").attr("aria-disabled","true"):e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,r,i=this.element.parent();t==="fill"?(e.support.minHeight||(r=i.css("overflow"),i.css("overflow","hidden")),n=i.height(),this.element.siblings(":visible").each(function(){var t=e(this),r=t.css("position");if(r==="absolute"||r==="fixed")return;n-=t.outerHeight(!0)}),r&&i.css("overflow",r),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):t==="auto"&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i.closest("li"),o=s[0]===r[0],u=o&&n.collapsible,a=u?e():this._getPanelForTab(s),f=r.length?this._getPanelForTab(r):e(),l={oldTab:r,oldPanel:f,newTab:u?e():s,newPanel:a};t.preventDefault();if(s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||this._trigger("beforeActivate",t,l)===!1)return;n.active=u?!1:this.tabs.index(s),this.active=o?e():s,this.xhr&&this.xhr.abort(),!f.length&&!a.length&&e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,l)},_toggle:function(t,n){function o(){r.running=!1,r._trigger("activate",t,n)}function u(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),i.length&&r.options.show?r._show(i,r.options.show,o):(i.show(),o())}var r=this,i=n.newPanel,s=n.oldPanel;this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),u()),s.attr({"aria-expanded":"false","aria-hidden":"true"}),n.oldTab.attr("aria-selected","false"),i.length&&s.length?n.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}),n.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var n,r=this._findActive(t);if(r[0]===this.active[0])return;r.length||(r=this.active),n=r.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return typeof e=="string"&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n):t.removeAttr("aria-controls")}),this.panels.show(),this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(n){var r=this.options.disabled;if(r===!1)return;n===t?r=!1:(n=this._getIndex(n),e.isArray(r)?r=e.map(r,function(e){return e!==n?e:null}):r=e.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(r)},disable:function(n){var r=this.options.disabled;if(r===!0)return;if(n===t)r=!0;else{n=this._getIndex(n);if(e.inArray(n,r)!==-1)return;e.isArray(r)?r=e.merge([n],r).sort():r=[n]}this._setupDisabled(r)},load:function(t,n){t=this._getIndex(t);var r=this,i=this.tabs.eq(t),o=i.find(".ui-tabs-anchor"),u=this._getPanelForTab(i),a={tab:i,panel:u};if(s(o[0]))return;this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&this.xhr.statusText!=="canceled"&&(i.addClass("ui-tabs-loading"),u.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){u.html(e),r._trigger("load",n,a)},1)}).complete(function(e,t){setTimeout(function(){t==="abort"&&r.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),u.removeAttr("aria-busy"),e===r.xhr&&delete r.xhr},1)}))},_ajaxSettings:function(t,n,r){var i=this;return{url:t.attr("href"),beforeSend:function(t,s){return i._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:s},r))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),e.uiBackCompat!==!1&&(e.ui.tabs.prototype._ui=function(e,t){return{tab:e,panel:t,index:this.anchors.index(e)}},e.widget("ui.tabs",e.ui.tabs,{url:function(e,t){this.anchors.eq(e).attr("href",t)}}),e.widget("ui.tabs",e.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var t=this;this._on({tabsbeforeload:function(n,r){if(e.data(r.tab[0],"cache.tabs")){n.preventDefault();return}r.jqXHR.success(function(){t.options.cache&&e.data(r.tab[0],"cache.tabs",!0)})}})},_ajaxSettings:function(t,n,r){var i=this.options.ajaxOptions;return e.extend({},i,{error:function(e,t){try{i.error(e,t,r.tab.closest("li").index(),r.tab[0])}catch(n){}}},this._superApply(arguments))},_setOption:function(e,t){e==="cache"&&t===!1&&this.anchors.removeData("cache.tabs"),this._super(e,t)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(e){this.anchors.eq(e).removeData("cache.tabs"),this._superApply(arguments)}}),e.widget("ui.tabs",e.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),e.widget("ui.tabs",e.ui.tabs,{options:{spinner:"<em>Loading…</em>"},_create:function(){this._super(),this._on({tabsbeforeload:function(e,t){if(e.target!==this.element[0]||!this.options.spinner)return;var n=t.tab.find("span"),r=n.html();n.html(this.options.spinner),t.jqXHR.complete(function(){n.html(r)})}})}}),e.widget("ui.tabs",e.ui.tabs,{options:{enable:null,disable:null},enable:function(t){var n=this.options,r;if(t&&n.disabled===!0||e.isArray(n.disabled)&&e.inArray(t,n.disabled)!==-1)r=!0;this._superApply(arguments),r&&this._trigger("enable",null,this._ui(this.anchors[t],this.panels[t]))},disable:function(t){var n=this.options,r;if(t&&n.disabled===!1||e.isArray(n.disabled)&&e.inArray(t,n.disabled)===-1)r=!0;this._superApply(arguments),r&&this._trigger("disable",null,this._ui(this.anchors[t],this.panels[t]))}}),e.widget("ui.tabs",e.ui.tabs,{options:{add:null,remove:null,tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},add:function(n,r,i){i===t&&(i=this.anchors.length);var s,o,u=this.options,a=e(u.tabTemplate.replace(/#\{href\}/g,n).replace(/#\{label\}/g,r)),f=n.indexOf("#")?this._tabId(a):n.replace("#","");return a.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),a.attr("aria-controls",f),s=i>=this.tabs.length,o=this.element.find("#"+f),o.length||(o=this._createPanel(f),s?i>0?o.insertAfter(this.panels.eq(-1)):o.appendTo(this.element):o.insertBefore(this.panels[i])),o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),s?a.appendTo(this.tablist):a.insertBefore(this.tabs[i]),u.disabled=e.map(u.disabled,function(e){return e>=i?++e:e}),this.refresh(),this.tabs.length===1&&u.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[i],this.panels[i])),this},remove:function(t){t=this._getIndex(t);var n=this.options,r=this.tabs.eq(t).remove(),i=this._getPanelForTab(r).remove();return r.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(t+(t+1<this.anchors.length?1:-1)),n.disabled=e.map(e.grep(n.disabled,function(e){return e!==t}),function(e){return e>=t?--e:e}),this.refresh(),this._trigger("remove",null,this._ui(r.find("a")[0],i[0])),this}}),e.widget("ui.tabs",e.ui.tabs,{length:function(){return this.anchors.length}}),e.widget("ui.tabs",e.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(t){var n=t.is("li")?t.find("a[href]"):t;return n=n[0],e(n).closest("li").attr("aria-controls")||n.title&&n.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+i()}}),e.widget("ui.tabs",e.ui.tabs,{options:{panelTemplate:"<div></div>"},_createPanel:function(t){return e(this.options.panelTemplate).attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),e.widget("ui.tabs",e.ui.tabs,{_create:function(){var e=this.options;e.active===null&&e.selected!==t&&(e.active=e.selected===-1?!1:e.selected),this._super(),e.selected=e.active,e.selected===!1&&(e.selected=-1)},_setOption:function(e,t){if(e!=="selected")return this._super(e,t);var n=this.options;this._super("active",t===-1?!1:t),n.selected=n.active,n.selected===!1&&(n.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),e.widget("ui.tabs",e.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(e,t,n){var r,i,s=this._superApply(arguments);return s?(e==="beforeActivate"?(r=n.newTab.length?n.newTab:n.oldTab,i=n.newPanel.length?n.newPanel:n.oldPanel,s=this._super("select",t,{tab:r.find(".ui-tabs-anchor")[0],panel:i[0],index:r.closest("li").index()})):e==="activate"&&n.newTab.length&&(s=this._super("show",t,{tab:n.newTab.find(".ui-tabs-anchor")[0],panel:n.newPanel[0],index:n.newTab.closest("li").index()})),s):!1}}),e.widget("ui.tabs",e.ui.tabs,{select:function(e){e=this._getIndex(e);if(e===-1){if(!this.options.collapsible||this.options.selected===-1)return;e=this.options.selected}this.anchors.eq(e).trigger(this.options.event+this.eventNamespace)}}),function(){var t=0;e.widget("ui.tabs",e.ui.tabs,{options:{cookie:null},_create:function(){var e=this.options,t;e.active==null&&e.cookie&&(t=parseInt(this._cookie(),10),t===-1&&(t=!1),e.active=t),this._super()},_cookie:function(n){var r=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++t)];return arguments.length&&(r.push(n===!1?-1:n),r.push(this.options.cookie)),e.cookie.apply(null,r)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),e.widget("ui.tabs",e.ui.tabs,{_trigger:function(t,n,r){var i=e.extend({},r);return t==="load"&&(i.panel=i.panel[0],i.tab=i.tab.find(".ui-tabs-anchor")[0]),this._super(t,n,i)}}),e.widget("ui.tabs",e.ui.tabs,{options:{fx:null},_getFx:function(){var t,n,r=this.options.fx;return r&&(e.isArray(r)?(t=r[0],n=r[1]):t=n=r),r?{show:n,hide:t}:null},_toggle:function(e,t){function o(){n.running=!1,n._trigger("activate",e,t)}function u(){t.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&s.show?r.animate(s.show,s.show.duration,function(){o()}):(r.show(),o())}var n=this,r=t.newPanel,i=t.oldPanel,s=this._getFx();if(!s)return this._super(e,t);n.running=!0,i.length&&s.hide?i.animate(s.hide,s.hide.duration,function(){t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),i.hide(),u())}}))})(jQuery);jQuery.effects||function(e,t){var n=e.uiBackCompat!==!1,r="ui-effects-";e.effects={effect:{}},function(t,n){function p(e,t,n){var r=a[t.type]||{};return e==null?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:0>e?0:r.max<e?r.max:e)}function d(e){var n=o(),r=n._rgba=[];return e=e.toLowerCase(),h(s,function(t,i){var s,o=i.re.exec(e),a=o&&i.parse(o),f=i.space||"rgba";if(a)return s=n[f](a),n[u[f].cache]=s[u[f].cache],r=n._rgba=s._rgba,!1}),r.length?(r.join()==="0,0,0,0"&&t.extend(r,c.transparent),n):c[e]}function v(e,t,n){return n=(n+1)%1,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}var r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),i=/^([\-+])=\s*(\d+\.?\d*)/,s=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1]*2.55,e[2]*2.55,e[3]*2.55,e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],o=t.Color=function(e,n,r,i){return new t.Color.fn.parse(e,n,r,i)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},a={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},f=o.support={},l=t("<p>")[0],c,h=t.each;l.style.cssText="background-color:rgba(1,1,1,.5)",f.rgba=l.style.backgroundColor.indexOf("rgba")>-1,h(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),o.fn=t.extend(o.prototype,{parse:function(r,i,s,a){if(r===n)return this._rgba=[null,null,null,null],this;if(r.jquery||r.nodeType)r=t(r).css(i),i=n;var f=this,l=t.type(r),v=this._rgba=[];i!==n&&(r=[r,i,s,a],l="array");if(l==="string")return this.parse(d(r)||c._default);if(l==="array")return h(u.rgba.props,function(e,t){v[t.idx]=p(r[t.idx],t)}),this;if(l==="object")return r instanceof o?h(u,function(e,t){r[t.cache]&&(f[t.cache]=r[t.cache].slice())}):h(u,function(t,n){var i=n.cache;h(n.props,function(e,t){if(!f[i]&&n.to){if(e==="alpha"||r[e]==null)return;f[i]=n.to(f._rgba)}f[i][t.idx]=p(r[e],t,!0)}),f[i]&&e.inArray(null,f[i].slice(0,3))<0&&(f[i][3]=1,n.from&&(f._rgba=n.from(f[i])))}),this},is:function(e){var t=o(e),n=!0,r=this;return h(u,function(e,i){var s,o=t[i.cache];return o&&(s=r[i.cache]||i.to&&i.to(r._rgba)||[],h(i.props,function(e,t){if(o[t.idx]!=null)return n=o[t.idx]===s[t.idx],n})),n}),n},_space:function(){var e=[],t=this;return h(u,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=o(e),r=n._space(),i=u[r],s=this.alpha()===0?o("transparent"):this,f=s[i.cache]||i.to(s._rgba),l=f.slice();return n=n[i.cache],h(i.props,function(e,r){var i=r.idx,s=f[i],o=n[i],u=a[r.type]||{};if(o===null)return;s===null?l[i]=o:(u.mod&&(o-s>u.mod/2?s+=u.mod:s-o>u.mod/2&&(s-=u.mod)),l[i]=p((o-s)*t+s,r))}),this[r](l)},blend:function(e){if(this._rgba[3]===1)return this;var n=this._rgba.slice(),r=n.pop(),i=o(e)._rgba;return o(t.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(e,t){return e==null?t>2?1:0:e});return n[3]===1&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(e,t){return e==null&&(e=t>2?1:0),t&&t<3&&(e=Math.round(e*100)+"%"),e});return n[3]===1&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),r=n.pop();return e&&n.push(~~(r*255)),"#"+t.map(n,function(e){return e=(e||0).toString(16),e.length===1?"0"+e:e}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,u.hsla.to=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=e[3],s=Math.max(t,n,r),o=Math.min(t,n,r),u=s-o,a=s+o,f=a*.5,l,c;return o===s?l=0:t===s?l=60*(n-r)/u+360:n===s?l=60*(r-t)/u+120:l=60*(t-n)/u+240,f===0||f===1?c=f:f<=.5?c=u/a:c=u/(2-a),[Math.round(l)%360,c,f,i==null?1:i]},u.hsla.from=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;return[Math.round(v(o,s,t+1/3)*255),Math.round(v(o,s,t)*255),Math.round(v(o,s,t-1/3)*255),i]},h(u,function(e,r){var s=r.props,u=r.cache,a=r.to,f=r.from;o.fn[e]=function(e){a&&!this[u]&&(this[u]=a(this._rgba));if(e===n)return this[u].slice();var r,i=t.type(e),l=i==="array"||i==="object"?e:arguments,c=this[u].slice();return h(s,function(e,t){var n=l[i==="object"?e:t.idx];n==null&&(n=c[t.idx]),c[t.idx]=p(n,t)}),f?(r=o(f(c)),r[u]=c,r):o(c)},h(s,function(n,r){if(o.fn[n])return;o.fn[n]=function(s){var o=t.type(s),u=n==="alpha"?this._hsla?"hsla":"rgba":e,a=this[u](),f=a[r.idx],l;return o==="undefined"?f:(o==="function"&&(s=s.call(this,f),o=t.type(s)),s==null&&r.empty?this:(o==="string"&&(l=i.exec(s),l&&(s=f+parseFloat(l[2])*(l[1]==="+"?1:-1))),a[r.idx]=s,this[u](a)))}})}),h(r,function(e,n){t.cssHooks[n]={set:function(e,r){var i,s,u="";if(t.type(r)!=="string"||(i=d(r))){r=o(i||r);if(!f.rgba&&r._rgba[3]!==1){s=n==="backgroundColor"?e.parentNode:e;while((u===""||u==="transparent")&&s&&s.style)try{u=t.css(s,"backgroundColor"),s=s.parentNode}catch(a){}r=r.blend(u&&u!=="transparent"?u:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=o(e.elem,n),e.end=o(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}}),t.cssHooks.borderColor={expand:function(e){var t={};return h(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},c=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var t=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,n={},r,i;if(t&&t.length&&t[0]&&t[t[0]]){i=t.length;while(i--)r=t[i],typeof t[r]=="string"&&(n[e.camelCase(r)]=t[r])}else for(r in t)typeof t[r]=="string"&&(n[r]=t[r]);return n}function s(t,n){var i={},s,o;for(s in n)o=n[s],t[s]!==o&&!r[s]&&(e.fx.step[s]||!isNaN(parseFloat(o)))&&(i[s]=o);return i}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){if(e.end!=="none"&&!e.setAttr||e.pos===1&&!e.setAttr)jQuery.style(e.elem,n,e.end),e.setAttr=!0}}),e.effects.animateClass=function(t,r,o,u){var a=e.speed(r,o,u);return this.queue(function(){var r=e(this),o=r.attr("class")||"",u,f=a.children?r.find("*").andSelf():r;f=f.map(function(){var t=e(this);return{el:t,start:i.call(this)}}),u=function(){e.each(n,function(e,n){t[n]&&r[n+"Class"](t[n])})},u(),f=f.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",o),f=f.map(function(){var t=this,n=e.Deferred(),r=jQuery.extend({},a,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,f.get()).done(function(){u(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function i(t,n,r,i){e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},n==null&&(n={}),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t}function s(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects.effect[t]?n&&e.effects[t]?!1:!0:!1}e.extend(e.effects,{version:"1.9.2",save:function(e,t){for(var n=0;n<t.length;n++)t[n]!==null&&e.data(r+t[n],e[0].style[t[n]])},restore:function(e,n){var i,s;for(s=0;s<n.length;s++)n[s]!==null&&(i=e.data(r+n[s]),i===t&&(i=""),e.css(n[s],i))},setMode:function(e,t){return t==="toggle"&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n,r;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=e[1]/t.width}return{x:r,y:n}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},r=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),t.css("position")==="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var s=t.cssUnit(n);s[0]>0&&(i[n]=s[0]*r+s[1])}),i}}),e.fn.extend({effect:function(){function a(n){function u(){e.isFunction(i)&&i.call(r[0]),e.isFunction(n)&&n()}var r=e(this),i=t.complete,s=t.mode;(r.is(":hidden")?s==="hide":s==="show")?u():o.call(r[0],t,u)}var t=i.apply(this,arguments),r=t.mode,s=t.queue,o=e.effects.effect[t.effect],u=!o&&n&&e.effects[t.effect];return e.fx.off||!o&&!u?r?this[r](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):o?s===!1?this.each(a):this.queue(s||"fx",a):u.call(this,{options:t,duration:t.duration,callback:t.complete,mode:t.mode})},_show:e.fn.show,show:function(e){if(s(e))return this._show.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(s(e))return this._hide.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(s(t)||typeof t=="boolean"||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=i.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){var t,n=4;while(e<((t=Math.pow(2,--n))-1)/11);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(e*2)/2:1-n(e*-2+2)/2}})}()}(jQuery); diff --git a/pub/lib/jquery/jquery.hook.js b/pub/lib/jquery/jquery.hook.js deleted file mode 100644 index b946114a0774b951bd09236e212745f6132744e0..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/jquery.hook.js +++ /dev/null @@ -1,32 +0,0 @@ -(function ($) { - $.fn.mageEventFormValidate = function () { - // Loop thru the elements that we jQuery validate is attached to - // and return the loop, so jQuery function chaining will work. - return this.each(function () { - var form = $(this); - // Grab this element's validator object (if it has one) - var validator = form.data('validator'); - // Only run this code if there's a validator associated with this element - if ( !validator ) - return; - // Only add these triggers to each element once - if ( form.data('mageEventFormValidate') ) - return; - else - form.data('mageEventFormValidate', true); - // Override the function that validates the whole form to trigger a - // formValidation event and either formValidationSuccess or formValidationError - var oldForm = validator.form; - validator.form = function () { - oldForm.status = false; - oldForm.currentForm = this.currentForm; - $.mage.event.trigger('mage.form.beforeValidation', oldForm); - if ( !oldForm.status ) { - oldForm.status = oldForm.apply(this, arguments); - } - $.mage.event.trigger('mage.form.afterValidation', oldForm); - return oldForm.status; - }; - }); - }; -})(jQuery); \ No newline at end of file diff --git a/pub/lib/jquery/jquery.iframe-auto-height.plugin.1.9.0.js b/pub/lib/jquery/jquery.iframe-auto-height.plugin.1.9.0.js deleted file mode 100644 index 5f7d4d14b27a0635bf0a1c63d8f4c86b32fed110..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/jquery.iframe-auto-height.plugin.1.9.0.js +++ /dev/null @@ -1,198 +0,0 @@ -/*jslint white: true, indent: 2, onevar: false, browser: true, undef: true, nomen: false, eqeqeq: true, plusplus: false, bitwise: true, regexp: true, strict: false, newcap: true, immed: true */ -/*global window, console, jQuery, setTimeout */ - -/* - Plugin: iframe autoheight jQuery Plugin - Version: 1.9.0 - Author and Contributors - ======================================== - NATHAN SMITH (http://sonspring.com/) - Jesse House (https://github.com/house9) - aaron manela (https://github.com/aaronmanela) - Hideki Abe (https://github.com/hideki-a) - Patrick Clark (https://github.com/hellopat) - ChristineP2 (https://github.com/ChristineP2) - Mmjavellana (https://github.com/Mmjavellana) - yiqing-95 (https://github.com/yiqing-95) - jcaspian (https://github.com/jcaspian) - adamjgray (https://github.com/adamjgray) - Jens Bissinger (https://github.com/dpree) - - File: jquery.iframe-auto-height.plugin.js - Remarks: original code from http://sonspring.com/journal/jquery-iframe-sizing - Description: when the page loads set the height of an iframe based on the height of its contents - see README: http://github.com/house9/jquery-iframe-auto-height - -*/ -(function ($) { - $.fn.iframeAutoHeight = function (spec) { - - // set default option values - var options = $.extend({ - heightOffset: 0, - minHeight: 0, - callback: function (newHeight) {}, - animate: false, - debug: false, - diagnostics: false, // used for development only - resetToMinHeight: false, - triggerFunctions: [], - heightCalculationOverrides: [] - }, spec); - - // logging - function debug(message) { - if (options.debug && options.debug === true && window.console) { - console.log(message); - } - } - - // not used by production code - function showDiagnostics(iframe, calledFrom) { - debug("Diagnostics from '" + calledFrom + "'"); - try { - debug(" " + $(iframe, window.top.document).contents().find('body')[0].scrollHeight + " for ...find('body')[0].scrollHeight"); - debug(" " + $(iframe.contentWindow.document).height() + " for ...contentWindow.document).height()"); - debug(" " + $(iframe.contentWindow.document.body).height() + " for ...contentWindow.document.body).height()"); - } catch (ex) { - // ie fails when called during for each, ok later on - // probably not an issue if called in a document ready block - debug(" unable to check in this state"); - } - debug("End diagnostics -> results vary by browser and when diagnostics are requested"); - } - - // show all option values - debug(options); - - // ****************************************************** - // iterate over the matched elements passed to the plugin ; return will make it chainable - return this.each(function () { - - // ****************************************************** - // http://api.jquery.com/jQuery.browser/ - var strategyKeys = ['webkit', 'mozilla', 'msie', 'opera']; - var strategies = []; - strategies['default'] = function (iframe, $iframeBody, options, browser) { - // NOTE: this is how the plugin determines the iframe height, override if you need custom - return $iframeBody[0].scrollHeight + options.heightOffset; - }; - - jQuery.each(strategyKeys, function (index, value) { - // use the default strategy for all browsers, can be overridden if desired - strategies[value] = strategies['default']; - }); - - // override strategies if registered in options - jQuery.each(options.heightCalculationOverrides, function(index, value) { - strategies[value.browser] = value.calculation; - }); - - function findStrategy(browser) { - var strategy = null; - - jQuery.each(strategyKeys, function (index, value) { - if (browser[value]) { - strategy = strategies[value]; - return false; - } - }); - - if (strategy === null) { - strategy = strategies['default']; - } - - return strategy; - } - // ****************************************************** - - // for use by webkit only - var loadCounter = 0; - - // resizeHeight - function resizeHeight(iframe) { - if (options.diagnostics) { - showDiagnostics(iframe, "resizeHeight"); - } - - // set the iframe size to minHeight so it'll get smaller on resizes in FF and IE - if (options.resetToMinHeight && options.resetToMinHeight === true) { - iframe.style.height = options.minHeight + 'px'; - } - - // get the iframe body height and set inline style to that plus a little - var $body = $(iframe, window.top.document).contents().find('body'); - var strategy = findStrategy($.browser); - var newHeight = strategy(iframe, $body, options, $.browser); - debug(newHeight); - - if (newHeight < options.minHeight) { - debug("new height is less than minHeight"); - newHeight = options.minHeight + options.heightOffset; - } - - debug("New Height: " + newHeight); - if (options.animate) { - $(iframe).animate({height: newHeight + 'px'}, {duration: 500}); - } else { - iframe.style.height = newHeight + 'px'; - } - - options.callback.apply($(iframe), [{newFrameHeight: newHeight}]); - } // END resizeHeight - - // debug me - debug(this); - if (options.diagnostics) { - showDiagnostics(this, "each iframe"); - } - - // if trigger functions are registered, invoke them - if (options.triggerFunctions.length > 0) { - debug(options.triggerFunctions.length + " trigger Functions"); - for (var i = 0; i < options.triggerFunctions.length; i++) { - options.triggerFunctions[i](resizeHeight, this); - } - } - - // Check if browser is Webkit (Safari/Chrome) or Opera - if ($.browser.webkit || $.browser.opera) { - debug("browser is webkit or opera"); - - // Start timer when loaded. - $(this).load(function () { - var delay = 0; - var iframe = this; - - var delayedResize = function () { - resizeHeight(iframe); - }; - - if (loadCounter === 0) { - // delay the first one - delay = 500; - } else { - // Reset iframe height to 0 to force new frame size to fit window properly - // this is only an issue when going from large to small iframe, not executed on page load - iframe.style.height = options.minHeight + 'px'; - } - - debug("load delay: " + delay); - setTimeout(delayedResize, delay); - loadCounter++; - }); - - // Safari and Opera need a kick-start. - var source = $(this).attr('src'); - $(this).attr('src', ''); - $(this).attr('src', source); - } else { - // For other browsers. - $(this).load(function () { - resizeHeight(this); - }); - } // if browser - - }); // $(this).each(function () { - }; // $.fn.iframeAutoHeight = function (options) { -}(jQuery)); // (function ($) { \ No newline at end of file diff --git a/pub/lib/jquery/jquery.parsequery.js b/pub/lib/jquery/jquery.parsequery.js new file mode 100644 index 0000000000000000000000000000000000000000..87bae389eecffaddbea8333842d2a810e5281b04 --- /dev/null +++ b/pub/lib/jquery/jquery.parsequery.js @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2010 Conrad Irwin <conrad@rapportive.com> MIT license. + * Based loosely on original: Copyright (c) 2008 mkmanning MIT license. + * + * Parses CGI query strings into javascript objects. + * + * See the README for details. + **/ +/*jshint jquery:true */ +/*global window:true */ +(function ($) { + $.parseQuery = function(options) { + var config = {query: window.location.search || ""}, + params = {}; + + if (typeof options === 'string') { + options = {query: options}; + } + $.extend(config, $.parseQuery, options); + config.query = config.query.replace(/^\?/, ''); + + $.each(config.query.split(config.separator), function(i, param) { + var pair = param.split('='), + key = config.decode(pair.shift(), null).toString(), + value = config.decode(pair.length ? pair.join('=') : null, key); + + if (config.array_keys(key)) { + params[key] = params[key] || []; + params[key].push(value); + } else { + params[key] = value; + } + }); + + return params; + }; + + $.parseQuery.decode = $.parseQuery.default_decode = function(string) { + return decodeURIComponent((string || "").replace('+', ' ')); + }; + + $.parseQuery.array_keys = function() { + return false; + }; + + $.parseQuery.separator = "&"; +}(jQuery)); diff --git a/pub/lib/jquery/ui/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/pub/lib/jquery/ui/css/images/ui-bg_flat_0_aaaaaa_40x100.png deleted file mode 100644 index 5b5dab2ab7b1c50dea9cfe73dc5a269a92d2d4b4..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-bg_flat_75_ffffff_40x100.png b/pub/lib/jquery/ui/css/images/ui-bg_flat_75_ffffff_40x100.png deleted file mode 100644 index ac8b229af950c29356abf64a6c4aa894575445f0..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-bg_flat_75_ffffff_40x100.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/pub/lib/jquery/ui/css/images/ui-bg_glass_55_fbf9ee_1x400.png deleted file mode 100644 index ad3d6346e00f246102f72f2e026ed0491988b394..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-bg_glass_65_ffffff_1x400.png b/pub/lib/jquery/ui/css/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100644 index 42ccba269b6e91bef12ad0fa18be651b5ef0ee68..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-bg_glass_75_dadada_1x400.png b/pub/lib/jquery/ui/css/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index 5a46b47cb16631068aee9e0bd61269fc4e95e5cd..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/pub/lib/jquery/ui/css/images/ui-bg_glass_75_e6e6e6_1x400.png deleted file mode 100644 index 86c2baa655eac8539db34f8d9adb69ec1226201c..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-bg_glass_95_fef1ec_1x400.png b/pub/lib/jquery/ui/css/images/ui-bg_glass_95_fef1ec_1x400.png deleted file mode 100644 index 4443fdc1a156babad4336f004eaf5ca5dfa0f9ab..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-bg_glass_95_fef1ec_1x400.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/pub/lib/jquery/ui/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png deleted file mode 100644 index 7c9fa6c6edcfcdd3e5b77e6f547b719e6fc66e30..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-icons_222222_256x240.png b/pub/lib/jquery/ui/css/images/ui-icons_222222_256x240.png deleted file mode 100644 index b273ff111d219c9b9a8b96d57683d0075fb7871a..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-icons_2e83ff_256x240.png b/pub/lib/jquery/ui/css/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 09d1cdc856c292c4ab6dd818c7543ac0828bd616..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-icons_454545_256x240.png b/pub/lib/jquery/ui/css/images/ui-icons_454545_256x240.png deleted file mode 100644 index b7571021ffcf096664325b2793d8742bbe0da855..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-icons_454545_256x240.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-icons_888888_256x240.png b/pub/lib/jquery/ui/css/images/ui-icons_888888_256x240.png deleted file mode 100644 index 6d02426c114be4b57aabc0a80b8a63d9e56b9eb6..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-icons_888888_256x240.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/images/ui-icons_cd0a0a_256x240.png b/pub/lib/jquery/ui/css/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index 2ab019b73ec11a485fa09378f3a0e155194f6a5d..0000000000000000000000000000000000000000 Binary files a/pub/lib/jquery/ui/css/images/ui-icons_cd0a0a_256x240.png and /dev/null differ diff --git a/pub/lib/jquery/ui/css/jquery-ui.css b/pub/lib/jquery/ui/css/jquery-ui.css deleted file mode 100644 index e9a1a66ebc21bc6a261d305668f082dd1c41d579..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/css/jquery-ui.css +++ /dev/null @@ -1,563 +0,0 @@ -/*! - * jQuery UI CSS Framework 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } -.ui-helper-clearfix:after { clear: both; } -.ui-helper-clearfix { zoom: 1; } -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/*! - * jQuery UI CSS Framework 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } -.ui-widget-content a { color: #222222; } -.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } -.ui-widget-header a { color: #222222; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } -.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*! - * jQuery UI Resizable 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizable#theming - */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*! - * jQuery UI Selectable 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectable#theming - */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } -/*! - * jQuery UI Accordion 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Accordion#theming - */ -/* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; } -/*! - * jQuery UI Autocomplete 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.22 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -/*! - * jQuery UI Button 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Button#theming - */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ -/*! - * jQuery UI Dialog 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog#theming - */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/*! - * jQuery UI Slider 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider#theming - */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/*! - * jQuery UI Tabs 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs#theming - */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/*! - * jQuery UI Datepicker 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker#theming - */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/*! - * jQuery UI Progressbar 1.8.22 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar#theming - */ -.ui-progressbar { height:2em; text-align: left; overflow: hidden; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-af.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-af.js deleted file mode 100644 index 0922ef7a1c020367faf0e8e394850afaddc3f57b..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-af.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Afrikaans initialisation for the jQuery UI date picker plugin. */ -/* Written by Renier Pretorius. */ -jQuery(function($){ - $.datepicker.regional['af'] = { - closeText: 'Selekteer', - prevText: 'Vorige', - nextText: 'Volgende', - currentText: 'Vandag', - monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie', - 'Julie','Augustus','September','Oktober','November','Desember'], - monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', - 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], - dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], - dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'], - dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['af']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ar-DZ.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ar-DZ.js deleted file mode 100644 index e0e1685d845be6ed1eb739968cfb17bf17cf1daa..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ar-DZ.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/ -/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */ - -jQuery(function($){ - $.datepicker.regional['ar-DZ'] = { - closeText: 'إغلاق', - prevText: '<السابق', - nextText: 'التالي>', - currentText: 'اليوم', - monthNames: ['جانÙÙŠ', 'ÙÙŠÙØ±ÙŠ', 'مارس', 'Ø£ÙØ±ÙŠÙ„', 'ماي', 'جوان', - 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوÙمبر', 'ديسمبر'], - monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], - dayNames: ['Ø§Ù„Ø£ØØ¯', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - dayNamesShort: ['Ø§Ù„Ø£ØØ¯', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - dayNamesMin: ['Ø§Ù„Ø£ØØ¯', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - weekHeader: 'أسبوع', - dateFormat: 'dd/mm/yy', - firstDay: 6, - isRTL: true, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ar-DZ']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ar.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ar.js deleted file mode 100644 index 8a9218d8b13542a5d7b63b429703599193d85d0d..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ar.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Arabic Translation for jQuery UI date picker plugin. */ -/* Khaled Alhourani -- me@khaledalhourani.com */ -/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name ÙØ¨Ø±Ø§ÙŠØ± - يناير and there isn't any Arabic roots for these months */ -jQuery(function($){ - $.datepicker.regional['ar'] = { - closeText: 'إغلاق', - prevText: '<السابق', - nextText: 'التالي>', - currentText: 'اليوم', - monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'ØØ²ÙŠØ±Ø§Ù†', - 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], - dayNames: ['Ø§Ù„Ø£ØØ¯', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - dayNamesShort: ['Ø§Ù„Ø£ØØ¯', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - dayNamesMin: ['Ø', 'Ù†', 'Ø«', 'ر', 'Ø®', 'ج', 'س'], - weekHeader: 'أسبوع', - dateFormat: 'dd/mm/yy', - firstDay: 6, - isRTL: true, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ar']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-az.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-az.js deleted file mode 100644 index 57802a40bafb54bd616c7cbcc173e71b6988c8bc..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-az.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Jamil Najafov (necefov33@gmail.com). */ -jQuery(function($) { - $.datepicker.regional['az'] = { - closeText: 'BaÄŸla', - prevText: '<Geri', - nextText: 'İrÉ™li>', - currentText: 'Bugün', - monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun', - 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'], - monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun', - 'İyul','Avq','Sen','Okt','Noy','Dek'], - dayNames: ['Bazar','Bazar ertÉ™si','ÇərÅŸÉ™nbÉ™ axÅŸamı','ÇərÅŸÉ™nbÉ™','CümÉ™ axÅŸamı','CümÉ™','ŞənbÉ™'], - dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Åž'], - dayNamesMin: ['B','B','Ç','С','Ç','C','Åž'], - weekHeader: 'Hf', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['az']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-bg.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-bg.js deleted file mode 100644 index c19d20fb1f4530b87654ed412147a82d994435a2..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-bg.js +++ /dev/null @@ -1,24 +0,0 @@ -/* Bulgarian initialisation for the jQuery UI date picker plugin. */ -/* Written by Stoyan Kyosev (http://svest.org). */ -jQuery(function($){ - $.datepicker.regional['bg'] = { - closeText: 'затвори', - prevText: '<назад', - nextText: 'напред>', - nextBigText: '>>', - currentText: 'днеÑ', - monthNames: ['Януари','Февруари','Март','Ðприл','Май','Юни', - 'Юли','ÐвгуÑÑ‚','Септември','Октомври','Ðоември','Декември'], - monthNamesShort: ['Яну','Фев','Мар','Ðпр','Май','Юни', - 'Юли','Ðвг','Сеп','Окт','Ðов','Дек'], - dayNames: ['ÐеделÑ','Понеделник','Вторник','СрÑда','Четвъртък','Петък','Събота'], - dayNamesShort: ['Ðед','Пон','Вто','СрÑ','Чет','Пет','Съб'], - dayNamesMin: ['Ðе','По','Ð’Ñ‚','Ср','Че','Пе','Съ'], - weekHeader: 'Wk', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['bg']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-bs.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-bs.js deleted file mode 100644 index d4dc8b0ec27623179bf16c6072c9db5905184839..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-bs.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Bosnian i18n for the jQuery UI date picker plugin. */ -/* Written by Kenan Konjo. */ -jQuery(function($){ - $.datepicker.regional['bs'] = { - closeText: 'Zatvori', - prevText: '<', - nextText: '>', - currentText: 'Danas', - monthNames: ['Januar','Februar','Mart','April','Maj','Juni', - 'Juli','August','Septembar','Oktobar','Novembar','Decembar'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Aug','Sep','Okt','Nov','Dec'], - dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','ÄŒetvrtak','Petak','Subota'], - dayNamesShort: ['Ned','Pon','Uto','Sri','ÄŒet','Pet','Sub'], - dayNamesMin: ['Ne','Po','Ut','Sr','ÄŒe','Pe','Su'], - weekHeader: 'Wk', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['bs']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ca.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ca.js deleted file mode 100644 index b128e699efde4f6086924d2942040fb50b34432c..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ca.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Inicialització en català per a l'extenció 'calendar' per jQuery. */ -/* Writers: (joan.leon@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['ca'] = { - closeText: 'Tancar', - prevText: '<Ant', - nextText: 'Seg>', - currentText: 'Avui', - monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny', - 'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'], - monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun', - 'Jul','Ago','Set','Oct','Nov','Des'], - dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'], - dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'], - dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ca']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-cs.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-cs.js deleted file mode 100644 index 9805bcdb826ee5d526b937a80babc2e754d381b6..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-cs.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Czech initialisation for the jQuery UI date picker plugin. */ -/* Written by Tomas Muller (tomas@tomas-muller.net). */ -jQuery(function($){ - $.datepicker.regional['cs'] = { - closeText: 'ZavÅ™Ãt', - prevText: '<DÅ™Ãve', - nextText: 'PozdÄ›ji>', - currentText: 'NynÃ', - monthNames: ['leden','únor','bÅ™ezen','duben','kvÄ›ten','Äerven', - 'Äervenec','srpen','zářÃ','Å™Ãjen','listopad','prosinec'], - monthNamesShort: ['led','úno','bÅ™e','dub','kvÄ›','Äer', - 'Ävc','srp','zář','Å™Ãj','lis','pro'], - dayNames: ['nedÄ›le', 'pondÄ›lÃ', 'úterý', 'stÅ™eda', 'Ätvrtek', 'pátek', 'sobota'], - dayNamesShort: ['ne', 'po', 'út', 'st', 'Ät', 'pá', 'so'], - dayNamesMin: ['ne','po','út','st','Ät','pá','so'], - weekHeader: 'Týd', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['cs']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-cy-GB.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-cy-GB.js deleted file mode 100644 index dfee2f9d4cd0043be2e625cfdee0bf80cbb16672..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-cy-GB.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Welsh/UK initialisation for the jQuery UI date picker plugin. */ -/* Written by William Griffiths. */ -jQuery(function($){ - $.datepicker.regional['cy-GB'] = { - closeText: 'Done', - prevText: 'Prev', - nextText: 'Next', - currentText: 'Today', - monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin', - 'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'], - monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh', - 'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'], - dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'], - dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'], - dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'], - weekHeader: 'Wy', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['cy-GB']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-da.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-da.js deleted file mode 100644 index 176044e18606dae7d048702aae6578bc20ea923a..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-da.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Danish initialisation for the jQuery UI date picker plugin. */ -/* Written by Jan Christensen ( deletestuff@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['da'] = { - closeText: 'Luk', - prevText: '<Forrige', - nextText: 'Næste>', - currentText: 'Idag', - monthNames: ['Januar','Februar','Marts','April','Maj','Juni', - 'Juli','August','September','Oktober','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Aug','Sep','Okt','Nov','Dec'], - dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], - dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], - dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], - weekHeader: 'Uge', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['da']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-de.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-de.js deleted file mode 100644 index f3ef9e82c6de1e330aeaaaf552e3e6d02955c7f6..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-de.js +++ /dev/null @@ -1,23 +0,0 @@ -/* German initialisation for the jQuery UI date picker plugin. */ -/* Written by Milian Wolff (mail@milianw.de). */ -jQuery(function($){ - $.datepicker.regional['de'] = { - closeText: 'schließen', - prevText: '<zurück', - nextText: 'Vor>', - currentText: 'heute', - monthNames: ['Januar','Februar','März','April','Mai','Juni', - 'Juli','August','September','Oktober','November','Dezember'], - monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', - 'Jul','Aug','Sep','Okt','Nov','Dez'], - dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], - dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], - dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], - weekHeader: 'KW', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['de']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-el.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-el.js deleted file mode 100644 index 6d775f995f94680d1371c71f383e291a65d272b3..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-el.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Greek (el) initialisation for the jQuery UI date picker plugin. */ -/* Written by Alex Cicovic (http://www.alexcicovic.com) */ -jQuery(function($){ - $.datepicker.regional['el'] = { - closeText: 'Κλείσιμο', - prevText: 'Î ÏοηγοÏμενος', - nextText: 'Επόμενος', - currentText: 'ΤÏÎχων Μήνας', - monthNames: ['ΙανουάÏιος','ΦεβÏουάÏιος','ΜάÏτιος','ΑπÏίλιος','Μάιος','ΙοÏνιος', - 'ΙοÏλιος','ΑÏγουστος','ΣεπτÎμβÏιος','ΟκτώβÏιος','ÎοÎμβÏιος','ΔεκÎμβÏιος'], - monthNamesShort: ['Ιαν','Φεβ','ΜαÏ','ΑπÏ','Μαι','Ιουν', - 'Ιουλ','Αυγ','Σεπ','Οκτ','Îοε','Δεκ'], - dayNames: ['ΚυÏιακή','ΔευτÎÏα','ΤÏίτη','ΤετάÏτη','Î Îμπτη','ΠαÏασκευή','Σάββατο'], - dayNamesShort: ['ΚυÏ','Δευ','ΤÏι','Τετ','Πεμ','ΠαÏ','Σαβ'], - dayNamesMin: ['Κυ','Δε','ΤÏ','Τε','Πε','Πα','Σα'], - weekHeader: 'Εβδ', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['el']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-AU.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-AU.js deleted file mode 100644 index c1a1020a1406be78ceaaf9b44a798c1df1404fc0..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-AU.js +++ /dev/null @@ -1,23 +0,0 @@ -/* English/Australia initialisation for the jQuery UI date picker plugin. */ -/* Based on the en-GB initialisation. */ -jQuery(function($){ - $.datepicker.regional['en-AU'] = { - closeText: 'Done', - prevText: 'Prev', - nextText: 'Next', - currentText: 'Today', - monthNames: ['January','February','March','April','May','June', - 'July','August','September','October','November','December'], - monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['en-AU']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-GB.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-GB.js deleted file mode 100644 index 16a096e758aac16da7004b5e02dbb7c53e9a4e6c..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-GB.js +++ /dev/null @@ -1,23 +0,0 @@ -/* English/UK initialisation for the jQuery UI date picker plugin. */ -/* Written by Stuart. */ -jQuery(function($){ - $.datepicker.regional['en-GB'] = { - closeText: 'Done', - prevText: 'Prev', - nextText: 'Next', - currentText: 'Today', - monthNames: ['January','February','March','April','May','June', - 'July','August','September','October','November','December'], - monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['en-GB']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-NZ.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-NZ.js deleted file mode 100644 index 7819df0528600323db8e0c252c1840fc7b3ceb85..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-en-NZ.js +++ /dev/null @@ -1,23 +0,0 @@ -/* English/New Zealand initialisation for the jQuery UI date picker plugin. */ -/* Based on the en-GB initialisation. */ -jQuery(function($){ - $.datepicker.regional['en-NZ'] = { - closeText: 'Done', - prevText: 'Prev', - nextText: 'Next', - currentText: 'Today', - monthNames: ['January','February','March','April','May','June', - 'July','August','September','October','November','December'], - monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['en-NZ']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-eo.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-eo.js deleted file mode 100644 index 6cabc2c468ed2d3269b6b704c4d913807e3c1b97..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-eo.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Esperanto initialisation for the jQuery UI date picker plugin. */ -/* Written by Olivier M. (olivierweb@ifrance.com). */ -jQuery(function($){ - $.datepicker.regional['eo'] = { - closeText: 'Fermi', - prevText: '<Anta', - nextText: 'Sekv>', - currentText: 'Nuna', - monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio', - 'Julio','AÅgusto','Septembro','Oktobro','Novembro','Decembro'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','AÅg','Sep','Okt','Nov','Dec'], - dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ä´aÅdo','Vendredo','Sabato'], - dayNamesShort: ['Dim','Lun','Mar','Mer','Ä´aÅ','Ven','Sab'], - dayNamesMin: ['Di','Lu','Ma','Me','Ä´a','Ve','Sa'], - weekHeader: 'Sb', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['eo']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-es.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-es.js deleted file mode 100644 index a02133de3ff48e56bf9305b0e5d921ab1fc91228..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-es.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Inicialización en español para la extensión 'UI date picker' para jQuery. */ -/* Traducido por Vester (xvester@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['es'] = { - closeText: 'Cerrar', - prevText: '<Ant', - nextText: 'Sig>', - currentText: 'Hoy', - monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', - 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], - monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', - 'Jul','Ago','Sep','Oct','Nov','Dic'], - dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], - dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], - dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['es']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-et.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-et.js deleted file mode 100644 index 32702b2430224eebc06b4dce1619e9e412003b48..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-et.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Estonian initialisation for the jQuery UI date picker plugin. */ -/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */ -jQuery(function($){ - $.datepicker.regional['et'] = { - closeText: 'Sulge', - prevText: 'Eelnev', - nextText: 'Järgnev', - currentText: 'Täna', - monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni', - 'Juuli','August','September','Oktoober','November','Detsember'], - monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni', - 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'], - dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'], - dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'], - dayNamesMin: ['P','E','T','K','N','R','L'], - weekHeader: 'näd', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['et']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-eu.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-eu.js deleted file mode 100644 index ff66e494cb384dccd62acf0257f612eda1cec48e..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-eu.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */ -/* Karrikas-ek itzulia (karrikas@karrikas.com) */ -jQuery(function($){ - $.datepicker.regional['eu'] = { - closeText: 'Egina', - prevText: '<Aur', - nextText: 'Hur>', - currentText: 'Gaur', - monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina', - 'uztaila','abuztua','iraila','urria','azaroa','abendua'], - monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.', - 'uzt.','abu.','ira.','urr.','aza.','abe.'], - dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'], - dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'], - dayNamesMin: ['ig','al','ar','az','og','ol','lr'], - weekHeader: 'As', - dateFormat: 'yy-mm-dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['eu']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fa.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fa.js deleted file mode 100644 index be8acd2a5aa5c7a39a9c0e4c448d21bcd939c025..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fa.js +++ /dev/null @@ -1,59 +0,0 @@ -/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */ -/* Javad Mowlanezhad -- jmowla@gmail.com */ -/* Jalali calendar should supported soon! (Its implemented but I have to test it) */ -jQuery(function($) { - $.datepicker.regional['fa'] = { - closeText: 'بستن', - prevText: '<قبلی', - nextText: 'بعدی>', - currentText: 'امروز', - monthNames: [ - 'ÙØ±ÙˆØ±Ø¯ÙŠÙ†', - 'ارديبهشت', - 'خرداد', - 'تير', - 'مرداد', - 'شهريور', - 'مهر', - 'آبان', - 'آذر', - 'دی', - 'بهمن', - 'اسÙند' - ], - monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], - dayNames: [ - 'يکشنبه', - 'دوشنبه', - 'سه‌شنبه', - 'چهارشنبه', - 'پنجشنبه', - 'جمعه', - 'شنبه' - ], - dayNamesShort: [ - 'ÛŒ', - 'د', - 'س', - 'Ú†', - 'Ù¾', - 'ج', - 'Ø´' - ], - dayNamesMin: [ - 'ÛŒ', - 'د', - 'س', - 'Ú†', - 'Ù¾', - 'ج', - 'Ø´' - ], - weekHeader: 'Ù‡Ù', - dateFormat: 'yy/mm/dd', - firstDay: 6, - isRTL: true, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['fa']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fi.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fi.js deleted file mode 100644 index 4c5adda35ea5d322899bd6d96d5d56f9b560b910..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fi.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Finnish initialisation for the jQuery UI date picker plugin. */ -/* Written by Harri Kilpiö (harrikilpio@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['fi'] = { - closeText: 'Sulje', - prevText: '«Edellinen', - nextText: 'Seuraava»', - currentText: 'Tänään', - monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', - 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'], - monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä', - 'Heinä','Elo','Syys','Loka','Marras','Joulu'], - dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'], - dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'], - dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'], - weekHeader: 'Vk', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['fi']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fo.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fo.js deleted file mode 100644 index 8a6cb99cbc7f95780979d50f5d2969c465ca79f7..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fo.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Faroese initialisation for the jQuery UI date picker plugin */ -/* Written by Sverri Mohr Olsen, sverrimo@gmail.com */ -jQuery(function($){ - $.datepicker.regional['fo'] = { - closeText: 'Lat aftur', - prevText: '<Fyrra', - nextText: 'Næsta>', - currentText: 'à dag', - monthNames: ['Januar','Februar','Mars','AprÃl','Mei','Juni', - 'Juli','August','September','Oktober','November','Desember'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', - 'Jul','Aug','Sep','Okt','Nov','Des'], - dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','FrÃggjadagur','Leyardagur'], - dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','FrÃ','Ley'], - dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'], - weekHeader: 'Vk', - dateFormat: 'dd-mm-yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['fo']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fr-CH.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fr-CH.js deleted file mode 100644 index 244eacff44af40ce60a45b6669cb0ff2fa49bb51..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fr-CH.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Swiss-French initialisation for the jQuery UI date picker plugin. */ -/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */ -jQuery(function($){ - $.datepicker.regional['fr-CH'] = { - closeText: 'Fermer', - prevText: '<Préc', - nextText: 'Suiv>', - currentText: 'Courant', - monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', - 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], - monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun', - 'Jul','Aoû','Sep','Oct','Nov','Déc'], - dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], - dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], - dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], - weekHeader: 'Sm', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['fr-CH']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fr.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fr.js deleted file mode 100644 index 7e793639f5f0f2f623e3623658603cd0d4175177..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-fr.js +++ /dev/null @@ -1,25 +0,0 @@ -/* French initialisation for the jQuery UI date picker plugin. */ -/* Written by Keith Wood (kbwood{at}iinet.com.au), - Stéphane Nahmani (sholby@sholby.net), - Stéphane Raimbault <stephane.raimbault@gmail.com> */ -jQuery(function($){ - $.datepicker.regional['fr'] = { - closeText: 'Fermer', - prevText: 'Précédent', - nextText: 'Suivant', - currentText: 'Aujourd\'hui', - monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', - 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], - monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin', - 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'], - dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], - dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'], - dayNamesMin: ['D','L','M','M','J','V','S'], - weekHeader: 'Sem.', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['fr']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-gl.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-gl.js deleted file mode 100644 index 278403e8f17e676a8fa74d65483badfd9a350dfa..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-gl.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Galician localization for 'UI date picker' jQuery extension. */ -/* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */ -jQuery(function($){ - $.datepicker.regional['gl'] = { - closeText: 'Pechar', - prevText: '<Ant', - nextText: 'Seg>', - currentText: 'Hoxe', - monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño', - 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'], - monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ', - 'Xul','Ago','Set','Out','Nov','Dec'], - dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'], - dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'], - dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['gl']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-he.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-he.js deleted file mode 100644 index 135cdec1d015be113f7d4c5f1cab8452086c5f82..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-he.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Hebrew initialisation for the UI Datepicker extension. */ -/* Written by Amir Hardon (ahardon at gmail dot com). */ -jQuery(function($){ - $.datepicker.regional['he'] = { - closeText: 'סגור', - prevText: '<הקוד×', - nextText: 'הב×>', - currentText: 'היו×', - monthNames: ['×™× ×•×ר','פברו×ר','מרץ','×פריל','מ××™','×™×•× ×™', - 'יולי','×וגוסט','ספטמבר','×וקטובר','× ×•×‘×ž×‘×¨','דצמבר'], - monthNamesShort: ['×™× ×•','פבר','מרץ','×פר','מ××™','×™×•× ×™', - 'יולי','×וג','ספט','×וק','× ×•×‘','דצמ'], - dayNames: ['ר×שון','×©× ×™','שלישי','רביעי','חמישי','שישי','שבת'], - dayNamesShort: ['×\'','ב\'','×’\'','ד\'','×”\'','ו\'','שבת'], - dayNamesMin: ['×\'','ב\'','×’\'','ד\'','×”\'','ו\'','שבת'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: true, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['he']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hi.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hi.js deleted file mode 100644 index 6c563b997516908cbd9e700aa7021b3407fc7ced..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hi.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Hindi initialisation for the jQuery UI date picker plugin. */ -/* Written by Michael Dawart. */ -jQuery(function($){ - $.datepicker.regional['hi'] = { - closeText: 'बंद', - prevText: 'पिछला', - nextText: 'अगला', - currentText: 'आज', - monthNames: ['जनवरी ','फरवरी','मारà¥à¤š','अपà¥à¤°à¥‡à¤²','मई','जून', - 'जूलाई','अगसà¥à¤¤ ','सितमà¥à¤¬à¤°','अकà¥à¤Ÿà¥‚बर','नवमà¥à¤¬à¤°','दिसमà¥à¤¬à¤°'], - monthNamesShort: ['जन', 'फर', 'मारà¥à¤š', 'अपà¥à¤°à¥‡à¤²', 'मई', 'जून', - 'जूलाई', 'अग', 'सित', 'अकà¥à¤Ÿ', 'नव', 'दि'], - dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बà¥à¤§à¤µà¤¾à¤°', 'गà¥à¤°à¥à¤µà¤¾à¤°', 'शà¥à¤•à¥à¤°à¤µà¤¾à¤°', 'शनिवार'], - dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बà¥à¤§', 'गà¥à¤°à¥', 'शà¥à¤•à¥à¤°', 'शनि'], - dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बà¥à¤§', 'गà¥à¤°à¥', 'शà¥à¤•à¥à¤°', 'शनि'], - weekHeader: 'हफà¥à¤¤à¤¾', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['hi']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hr.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hr.js deleted file mode 100644 index 1eb3dd926f96a2f6f666ddfdb19efbeef8ab651b..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hr.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Croatian i18n for the jQuery UI date picker plugin. */ -/* Written by Vjekoslav Nesek. */ -jQuery(function($){ - $.datepicker.regional['hr'] = { - closeText: 'Zatvori', - prevText: '<', - nextText: '>', - currentText: 'Danas', - monthNames: ['SijeÄanj','VeljaÄa','Ožujak','Travanj','Svibanj','Lipanj', - 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'], - monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip', - 'Srp','Kol','Ruj','Lis','Stu','Pro'], - dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','ÄŒetvrtak','Petak','Subota'], - dayNamesShort: ['Ned','Pon','Uto','Sri','ÄŒet','Pet','Sub'], - dayNamesMin: ['Ne','Po','Ut','Sr','ÄŒe','Pe','Su'], - weekHeader: 'Tje', - dateFormat: 'dd.mm.yy.', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['hr']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hu.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hu.js deleted file mode 100644 index b28c268c1c445911bd24e6a6497648ded808e059..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hu.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Hungarian initialisation for the jQuery UI date picker plugin. */ -/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */ -jQuery(function($){ - $.datepicker.regional['hu'] = { - closeText: 'bezár', - prevText: 'vissza', - nextText: 'elÅ‘re', - currentText: 'ma', - monthNames: ['Január', 'Február', 'Március', 'Ãprilis', 'Május', 'Június', - 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'], - monthNamesShort: ['Jan', 'Feb', 'Már', 'Ãpr', 'Máj', 'Jún', - 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'], - dayNames: ['Vasárnap', 'HétfÅ‘', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], - dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'], - dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'], - weekHeader: 'Hét', - dateFormat: 'yy.mm.dd.', - firstDay: 1, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['hu']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hy.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hy.js deleted file mode 100644 index c6cc1946c47e60bd35a1b18111e49ef8583f1820..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-hy.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/ -jQuery(function($){ - $.datepicker.regional['hy'] = { - closeText: 'Õ“Õ¡Õ¯Õ¥Õ¬', - prevText: '<Õ†Õ¡Õ.', - nextText: 'Õ€Õ¡Õ».>', - currentText: 'Ô±ÕµÕ½Ö…Ö€', - monthNames: ['Õ€Õ¸Ö‚Õ¶Õ¾Õ¡Ö€','Õ“Õ¥Õ¿Ö€Õ¾Õ¡Ö€','Õ„Õ¡Ö€Õ¿','Ô±ÕºÖ€Õ«Õ¬','Õ„Õ¡ÕµÕ«Õ½','Õ€Õ¸Ö‚Õ¶Õ«Õ½', - 'Õ€Õ¸Ö‚Õ¬Õ«Õ½','Õ•Õ£Õ¸Õ½Õ¿Õ¸Õ½','ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö€','Õ€Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€','Õ†Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö€','Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€'], - monthNamesShort: ['Õ€Õ¸Ö‚Õ¶Õ¾','Õ“Õ¥Õ¿Ö€','Õ„Õ¡Ö€Õ¿','Ô±ÕºÖ€','Õ„Õ¡ÕµÕ«Õ½','Õ€Õ¸Ö‚Õ¶Õ«Õ½', - 'Õ€Õ¸Ö‚Õ¬','Õ•Õ£Õ½','ÕÕ¥Õº','Õ€Õ¸Õ¯','Õ†Õ¸Õµ','Ô´Õ¥Õ¯'], - dayNames: ['Õ¯Õ«Ö€Õ¡Õ¯Õ«','Õ¥Õ¯Õ¸Ö‚Õ·Õ¡Õ¢Õ©Õ«','Õ¥Ö€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«','Õ¹Õ¸Ö€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«','Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«','Õ¸Ö‚Ö€Õ¢Õ¡Õ©','Õ·Õ¡Õ¢Õ¡Õ©'], - dayNamesShort: ['Õ¯Õ«Ö€','Õ¥Ö€Õ¯','Õ¥Ö€Ö„','Õ¹Ö€Ö„','Õ°Õ¶Õ£','Õ¸Ö‚Ö€Õ¢','Õ·Õ¢Õ©'], - dayNamesMin: ['Õ¯Õ«Ö€','Õ¥Ö€Õ¯','Õ¥Ö€Ö„','Õ¹Ö€Ö„','Õ°Õ¶Õ£','Õ¸Ö‚Ö€Õ¢','Õ·Õ¢Õ©'], - weekHeader: 'Õ‡Ô²Õ', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['hy']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-id.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-id.js deleted file mode 100644 index c626fbb7b83cc72f99323d790dd3657bb186930a..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-id.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Indonesian initialisation for the jQuery UI date picker plugin. */ -/* Written by Deden Fathurahman (dedenf@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['id'] = { - closeText: 'Tutup', - prevText: '<mundur', - nextText: 'maju>', - currentText: 'hari ini', - monthNames: ['Januari','Februari','Maret','April','Mei','Juni', - 'Juli','Agustus','September','Oktober','Nopember','Desember'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', - 'Jul','Agus','Sep','Okt','Nop','Des'], - dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'], - dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'], - dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'], - weekHeader: 'Mg', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['id']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-is.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-is.js deleted file mode 100644 index c53235a49e166a13ca29bb47e856d4aad62db380..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-is.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Icelandic initialisation for the jQuery UI date picker plugin. */ -/* Written by Haukur H. Thorsson (haukur@eskill.is). */ -jQuery(function($){ - $.datepicker.regional['is'] = { - closeText: 'Loka', - prevText: '< Fyrri', - nextText: 'Næsti >', - currentText: 'Í dag', - monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní', - 'Júlí','Ágúst','September','Október','Nóvember','Desember'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún', - 'Júl','Ágú','Sep','Okt','Nóv','Des'], - dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'], - dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'], - dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'], - weekHeader: 'Vika', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['is']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-it.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-it.js deleted file mode 100644 index 59da2df671e88099229fb100950493c93e724808..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-it.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Italian initialisation for the jQuery UI date picker plugin. */ -/* Written by Antonello Pasella (antonello.pasella@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['it'] = { - closeText: 'Chiudi', - prevText: '<Prec', - nextText: 'Succ>', - currentText: 'Oggi', - monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno', - 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], - monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu', - 'Lug','Ago','Set','Ott','Nov','Dic'], - dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], - dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], - dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['it']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ja.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ja.js deleted file mode 100644 index 7eb4268d41e1acbb4c94304c688c6dd6bf69a9a7..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ja.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Japanese initialisation for the jQuery UI date picker plugin. */ -/* Written by Kentaro SATO (kentaro@ranvis.com). */ -jQuery(function($){ - $.datepicker.regional['ja'] = { - closeText: 'é–‰ã˜ã‚‹', - prevText: '<å‰', - nextText: '次>', - currentText: '今日', - monthNames: ['1月','2月','3月','4月','5月','6月', - '7月','8月','9月','10月','11月','12月'], - monthNamesShort: ['1月','2月','3月','4月','5月','6月', - '7月','8月','9月','10月','11月','12月'], - dayNames: ['日曜日','月曜日','ç«æ›œæ—¥','水曜日','木曜日','金曜日','土曜日'], - dayNamesShort: ['æ—¥','月','ç«','æ°´','木','金','土'], - dayNamesMin: ['æ—¥','月','ç«','æ°´','木','金','土'], - weekHeader: '週', - dateFormat: 'yy/mm/dd', - firstDay: 0, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: 'å¹´'}; - $.datepicker.setDefaults($.datepicker.regional['ja']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ka.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ka.js deleted file mode 100644 index c10658d79bf3fbebdc6180d64266938cc9388a11..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ka.js +++ /dev/null @@ -1,21 +0,0 @@ -/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Lado Lomidze (lado.lomidze@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['ka'] = { - closeText: 'დáƒáƒ®áƒ£áƒ ვáƒ', - prevText: '< წინáƒ', - nextText: 'შემდეგი >', - currentText: 'დღეს', - monthNames: ['იáƒáƒœáƒ•áƒáƒ ი','თებერვáƒáƒšáƒ˜','მáƒáƒ ტი','áƒáƒžáƒ ილი','მáƒáƒ˜áƒ¡áƒ˜','ივნისი', 'ივლისი','áƒáƒ’ვისტáƒ','სექტემბერი','áƒáƒ¥áƒ¢áƒáƒ›áƒ‘ერი','ნáƒáƒ”მბერი','დეკემბერი'], - monthNamesShort: ['იáƒáƒœ','თებ','მáƒáƒ ','áƒáƒžáƒ ','მáƒáƒ˜','ივნ', 'ივლ','áƒáƒ’ვ','სექ','áƒáƒ¥áƒ¢','ნáƒáƒ”','დეკ'], - dayNames: ['კვირáƒ','áƒáƒ შáƒáƒ‘áƒáƒ—ი','სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი','áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი','ხუთშáƒáƒ‘áƒáƒ—ი','პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი','შáƒáƒ‘áƒáƒ—ი'], - dayNamesShort: ['კვ','áƒáƒ შ','სáƒáƒ›','áƒáƒ—ხ','ხუთ','პáƒáƒ ','შáƒáƒ‘'], - dayNamesMin: ['კვ','áƒáƒ შ','სáƒáƒ›','áƒáƒ—ხ','ხუთ','პáƒáƒ ','შáƒáƒ‘'], - weekHeader: 'კვირáƒ', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ka']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-kk.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-kk.js deleted file mode 100644 index 79e3f248158a89e4f59ad443762b75609a191ae3..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-kk.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['kk'] = { - closeText: 'Жабу', - prevText: '<Ðлдыңғы', - nextText: 'КелеÑÑ–>', - currentText: 'Бүгін', - monthNames: ['Қаңтар','Ðқпан','Ðаурыз','Сәуір','Мамыр','МауÑым', - 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','ЖелтоқÑан'], - monthNamesShort: ['Қаң','Ðқп','Ðау','Сәу','Мам','Мау', - 'Шіл','Там','Қыр','Қаз','Қар','Жел'], - dayNames: ['ЖекÑенбі','ДүйÑенбі','СейÑенбі','СәрÑенбі','БейÑенбі','Жұма','Сенбі'], - dayNamesShort: ['жкÑ','дÑн','ÑÑн','ÑÑ€Ñ','бÑн','жма','Ñнб'], - dayNamesMin: ['Жк','ДÑ','СÑ','Ср','БÑ','Жм','Сн'], - weekHeader: 'Ðе', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['kk']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-km.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-km.js deleted file mode 100644 index f9c4e3a02d92a330c603f8e1dffe0c965769c5fb..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-km.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Khmer initialisation for the jQuery calendar extension. */ -/* Written by Chandara Om (chandara.teacher@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['km'] = { - closeText: 'ធ្វើ​រួច', - prevText: 'មុន', - nextText: 'បន្ទាប់', - currentText: 'ážáŸ’ងៃ​នáŸáŸ‡', - monthNames: ['មករា','កុម្ភៈ','មីនា','មáŸážŸáž¶','ឧសភា','មិážáž»áž“áž¶', - 'កក្កដា','សីហា','កញ្ញា','ážáž»áž›áž¶','វិច្ឆិកា','ធ្នូ'], - monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មáŸážŸáž¶','ឧសភា','មិážáž»áž“áž¶', - 'កក្កដា','សីហា','កញ្ញា','ážáž»áž›áž¶','វិច្ឆិកា','ធ្នូ'], - dayNames: ['អាទិážáŸ’áž™', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បážáž·áŸ', 'សុក្រ', 'សៅរáŸ'], - dayNamesShort: ['អា', 'áž…', 'អ', 'áž–áž»', 'ព្រហ', 'សុ', 'សៅ'], - dayNamesMin: ['អា', 'áž…', 'អ', 'áž–áž»', 'ព្រហ', 'សុ', 'សៅ'], - weekHeader: 'សប្ដាហáŸ', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['km']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ko.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ko.js deleted file mode 100644 index 04112424dac8dfe41db0d7254f29133a76080a6b..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ko.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Korean initialisation for the jQuery calendar extension. */ -/* Written by DaeKwon Kang (ncrash.dk@gmail.com), Edited by Genie. */ -jQuery(function($){ - $.datepicker.regional['ko'] = { - closeText: '닫기', - prevText: 'ì´ì „달', - nextText: '다ìŒë‹¬', - currentText: '오늘', - monthNames: ['1ì›”','2ì›”','3ì›”','4ì›”','5ì›”','6ì›”', - '7ì›”','8ì›”','9ì›”','10ì›”','11ì›”','12ì›”'], - monthNamesShort: ['1ì›”','2ì›”','3ì›”','4ì›”','5ì›”','6ì›”', - '7ì›”','8ì›”','9ì›”','10ì›”','11ì›”','12ì›”'], - dayNames: ['ì¼ìš”ì¼','월요ì¼','화요ì¼','수요ì¼','목요ì¼','금요ì¼','í† ìš”ì¼'], - dayNamesShort: ['ì¼','ì›”','í™”','수','목','금','í† '], - dayNamesMin: ['ì¼','ì›”','í™”','수','목','금','í† '], - weekHeader: 'Wk', - dateFormat: 'yy-mm-dd', - firstDay: 0, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: 'ë…„'}; - $.datepicker.setDefaults($.datepicker.regional['ko']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lb.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lb.js deleted file mode 100644 index 87c79d594eb3ffe204615437e8a70086f66f364c..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lb.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Luxembourgish initialisation for the jQuery UI date picker plugin. */ -/* Written by Michel Weimerskirch <michel@weimerskirch.net> */ -jQuery(function($){ - $.datepicker.regional['lb'] = { - closeText: 'Fäerdeg', - prevText: 'Zréck', - nextText: 'Weider', - currentText: 'Haut', - monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni', - 'Juli','August','September','Oktober','November','Dezember'], - monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun', - 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], - dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'], - dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'], - dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'], - weekHeader: 'W', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['lb']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lt.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lt.js deleted file mode 100644 index 67d5119ca70ff6ba5403882d3e8bdc83e108490b..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lt.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* @author Arturas Paleicikas <arturas@avalon.lt> */ -jQuery(function($){ - $.datepicker.regional['lt'] = { - closeText: 'Uždaryti', - prevText: '<Atgal', - nextText: 'Pirmyn>', - currentText: 'Å iandien', - monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis', - 'Liepa','RugpjÅ«tis','RugsÄ—jis','Spalis','Lapkritis','Gruodis'], - monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir', - 'Lie','Rugp','Rugs','Spa','Lap','Gru'], - dayNames: ['sekmadienis','pirmadienis','antradienis','treÄiadienis','ketvirtadienis','penktadienis','Å¡eÅ¡tadienis'], - dayNamesShort: ['sek','pir','ant','tre','ket','pen','Å¡eÅ¡'], - dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Å e'], - weekHeader: 'Wk', - dateFormat: 'yy-mm-dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['lt']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lv.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lv.js deleted file mode 100644 index 003934e7212b0375ea562c9af87d6c8d2d71097f..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-lv.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */ -jQuery(function($){ - $.datepicker.regional['lv'] = { - closeText: 'AizvÄ“rt', - prevText: 'Iepr', - nextText: 'NÄka', - currentText: 'Å odien', - monthNames: ['JanvÄris','FebruÄris','Marts','AprÄ«lis','Maijs','JÅ«nijs', - 'JÅ«lijs','Augusts','Septembris','Oktobris','Novembris','Decembris'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','JÅ«n', - 'JÅ«l','Aug','Sep','Okt','Nov','Dec'], - dayNames: ['svÄ“tdiena','pirmdiena','otrdiena','treÅ¡diena','ceturtdiena','piektdiena','sestdiena'], - dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'], - dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'], - weekHeader: 'Nav', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['lv']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-mk.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-mk.js deleted file mode 100644 index 0285325519f82c3657b54897ec50800226c2b38d..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-mk.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Macedonian i18n for the jQuery UI date picker plugin. */ -/* Written by Stojce Slavkovski. */ -jQuery(function($){ - $.datepicker.regional['mk'] = { - closeText: 'Затвори', - prevText: '<', - nextText: '>', - currentText: 'ДенеÑ', - monthNames: ['Јануари','Февруари','Март','Ðприл','Мај','Јуни', - 'Јули','ÐвгуÑÑ‚','Септември','Октомври','Ðоември','Декември'], - monthNamesShort: ['Јан','Фев','Мар','Ðпр','Мај','Јун', - 'Јул','Ðвг','Сеп','Окт','Ðое','Дек'], - dayNames: ['Ðедела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'], - dayNamesShort: ['Ðед','Пон','Вто','Сре','Чет','Пет','Саб'], - dayNamesMin: ['Ðе','По','Ð’Ñ‚','Ср','Че','Пе','Са'], - weekHeader: 'Сед', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['mk']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ml.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ml.js deleted file mode 100644 index 1e3432c0a8f2b1f90dae879c2fde36d164e21acd..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ml.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Saji Nediyanchath (saji89@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['ml'] = { - closeText: 'à´¶à´°à´¿', - prevText: 'à´®àµà´¨àµà´¨à´¤àµà´¤àµ†', - nextText: 'à´…à´Ÿàµà´¤àµà´¤à´¤àµ ', - currentText: 'ഇനàµà´¨àµ', - monthNames: ['ജനàµà´µà´°à´¿','ഫെബàµà´°àµà´µà´°à´¿','മാരàµâ€à´šàµà´šàµ','à´à´ªàµà´°à´¿à´²àµâ€','മേയàµ','ജൂണàµâ€', - 'ജൂലൈ','ആഗസàµà´±àµà´±àµ','സെപàµà´±àµà´±à´‚ബരàµâ€','à´’à´•àµà´Ÿàµ‹à´¬à´°àµâ€','നവംബരàµâ€','ഡിസംബരàµâ€'], - monthNamesShort: ['ജനàµ', 'ഫെബàµ', 'മാരàµâ€', 'à´à´ªàµà´°à´¿', 'മേയàµ', 'ജൂണàµâ€', - 'ജൂലാ', 'ആഗ', 'സെപàµ', 'à´’à´•àµà´Ÿàµ‹', 'നവം', 'à´¡à´¿à´¸'], - dayNames: ['ഞായരàµâ€', 'തിങàµà´•à´³àµâ€', 'ചൊവàµà´µ', 'à´¬àµà´§à´¨àµâ€', 'à´µàµà´¯à´¾à´´à´‚', 'വെളàµà´³à´¿', 'ശനി'], - dayNamesShort: ['ഞായ', 'തിങàµà´•', 'ചൊവàµà´µ', 'à´¬àµà´§', 'à´µàµà´¯à´¾à´´à´‚', 'വെളàµà´³à´¿', 'ശനി'], - dayNamesMin: ['à´žà´¾','തി','ചൊ','à´¬àµ','à´µàµà´¯à´¾','വെ','à´¶'], - weekHeader: 'à´†', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ml']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ms.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ms.js deleted file mode 100644 index e953ac04f19874aef2e1508c7edca1aeb09b220d..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ms.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Malaysian initialisation for the jQuery UI date picker plugin. */ -/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */ -jQuery(function($){ - $.datepicker.regional['ms'] = { - closeText: 'Tutup', - prevText: '<Sebelum', - nextText: 'Selepas>', - currentText: 'hari ini', - monthNames: ['Januari','Februari','Mac','April','Mei','Jun', - 'Julai','Ogos','September','Oktober','November','Disember'], - monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun', - 'Jul','Ogo','Sep','Okt','Nov','Dis'], - dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'], - dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'], - dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'], - weekHeader: 'Mg', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ms']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-nl-BE.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-nl-BE.js deleted file mode 100644 index 7b3cdf425b35f575418fa9267a0114dba8d62b36..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-nl-BE.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */ -/* David De Sloovere @DavidDeSloovere */ -jQuery(function($){ - $.datepicker.regional['nl-BE'] = { - closeText: 'Sluiten', - prevText: 'â†', - nextText: '→', - currentText: 'Vandaag', - monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', - 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], - monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', - 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], - dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], - dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['nl-BE']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-nl.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-nl.js deleted file mode 100644 index 781fe6191761d89f4bcc410588b396db3b4be82f..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-nl.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Mathias Bynens <http://mathiasbynens.be/> */ -jQuery(function($){ - $.datepicker.regional.nl = { - closeText: 'Sluiten', - prevText: 'â†', - nextText: '→', - currentText: 'Vandaag', - monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', - 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], - monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', - 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], - dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], - dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - weekHeader: 'Wk', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional.nl); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-no.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-no.js deleted file mode 100644 index 2507043a3f26b16ec7f2f64ae762a22f7a191f08..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-no.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Norwegian initialisation for the jQuery UI date picker plugin. */ -/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */ - -jQuery(function($){ - $.datepicker.regional['no'] = { - closeText: 'Lukk', - prevText: '«Forrige', - nextText: 'Neste»', - currentText: 'I dag', - monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'], - monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'], - dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'], - dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'], - dayNamesMin: ['sø','ma','ti','on','to','fr','lø'], - weekHeader: 'Uke', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: '' - }; - $.datepicker.setDefaults($.datepicker.regional['no']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pl.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pl.js deleted file mode 100644 index 61fa29ccd83a2e7c10126943327054b458f19d6f..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pl.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Polish initialisation for the jQuery UI date picker plugin. */ -/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['pl'] = { - closeText: 'Zamknij', - prevText: '<Poprzedni', - nextText: 'NastÄ™pny>', - currentText: 'DziÅ›', - monthNames: ['StyczeÅ„','Luty','Marzec','KwiecieÅ„','Maj','Czerwiec', - 'Lipiec','SierpieÅ„','WrzesieÅ„','Październik','Listopad','GrudzieÅ„'], - monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze', - 'Lip','Sie','Wrz','Pa','Lis','Gru'], - dayNames: ['Niedziela','PoniedziaÅ‚ek','Wtorek','Åšroda','Czwartek','PiÄ…tek','Sobota'], - dayNamesShort: ['Nie','Pn','Wt','Åšr','Czw','Pt','So'], - dayNamesMin: ['N','Pn','Wt','Åšr','Cz','Pt','So'], - weekHeader: 'Tydz', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['pl']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pt-BR.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pt-BR.js deleted file mode 100644 index 3cc8c796c87ac640decc13d72ee584b986e1f819..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pt-BR.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Brazilian initialisation for the jQuery UI date picker plugin. */ -/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['pt-BR'] = { - closeText: 'Fechar', - prevText: '<Anterior', - nextText: 'Próximo>', - currentText: 'Hoje', - monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', - 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], - monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', - 'Jul','Ago','Set','Out','Nov','Dez'], - dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], - dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], - dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['pt-BR']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pt.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pt.js deleted file mode 100644 index f09f5aeb00dfad5a97325e79b0227cc730dbde9d..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-pt.js +++ /dev/null @@ -1,22 +0,0 @@ -/* Portuguese initialisation for the jQuery UI date picker plugin. */ -jQuery(function($){ - $.datepicker.regional['pt'] = { - closeText: 'Fechar', - prevText: '<Anterior', - nextText: 'Seguinte', - currentText: 'Hoje', - monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', - 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], - monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', - 'Jul','Ago','Set','Out','Nov','Dez'], - dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], - dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], - dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], - weekHeader: 'Sem', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['pt']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-rm.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-rm.js deleted file mode 100644 index cf03cd4c1afa1d2bd2d76ad2eb54b629bed7663b..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-rm.js +++ /dev/null @@ -1,21 +0,0 @@ -/* Romansh initialisation for the jQuery UI date picker plugin. */ -/* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */ -jQuery(function($){ - $.datepicker.regional['rm'] = { - closeText: 'Serrar', - prevText: '<Suandant', - nextText: 'Precedent>', - currentText: 'Actual', - monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'], - monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'], - dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'], - dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'], - dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'], - weekHeader: 'emna', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['rm']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ro.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ro.js deleted file mode 100644 index 6b140aff615f840b98fa56756030d5679487774d..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ro.js +++ /dev/null @@ -1,26 +0,0 @@ -/* Romanian initialisation for the jQuery UI date picker plugin. - * - * Written by Edmond L. (ll_edmond@walla.com) - * and Ionut G. Stan (ionut.g.stan@gmail.com) - */ -jQuery(function($){ - $.datepicker.regional['ro'] = { - closeText: 'ÃŽnchide', - prevText: '« Luna precedentă', - nextText: 'Luna următoare »', - currentText: 'Azi', - monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie', - 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'], - monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', - 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - dayNames: ['Duminică', 'Luni', 'MarÅ£i', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'], - dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], - dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'], - weekHeader: 'Săpt', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ro']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ru.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ru.js deleted file mode 100644 index 50a4613523c3e5a7a76a8642c4ecf6fde221ecf9..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ru.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Andrew Stromnov (stromnov@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['ru'] = { - closeText: 'Закрыть', - prevText: '<Пред', - nextText: 'След>', - currentText: 'СегоднÑ', - monthNames: ['Январь','Февраль','Март','Ðпрель','Май','Июнь', - 'Июль','ÐвгуÑÑ‚','СентÑбрь','ОктÑбрь','ÐоÑбрь','Декабрь'], - monthNamesShort: ['Янв','Фев','Мар','Ðпр','Май','Июн', - 'Июл','Ðвг','Сен','Окт','ÐоÑ','Дек'], - dayNames: ['воÑкреÑенье','понедельник','вторник','Ñреда','четверг','пÑтница','Ñуббота'], - dayNamesShort: ['вÑк','пнд','втр','Ñрд','чтв','птн','Ñбт'], - dayNamesMin: ['Ð’Ñ','Пн','Ð’Ñ‚','Ср','Чт','Пт','Сб'], - weekHeader: 'Ðед', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ru']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sk.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sk.js deleted file mode 100644 index 078d1b0fa8a60eb67e8c2eaa5498568039d62002..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sk.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Slovak initialisation for the jQuery UI date picker plugin. */ -/* Written by Vojtech Rinik (vojto@hmm.sk). */ -jQuery(function($){ - $.datepicker.regional['sk'] = { - closeText: 'ZavrieÅ¥', - prevText: '<Predchádzajúci', - nextText: 'Nasledujúci>', - currentText: 'Dnes', - monthNames: ['Január','Február','Marec','AprÃl','Máj','Jún', - 'Júl','August','September','Október','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún', - 'Júl','Aug','Sep','Okt','Nov','Dec'], - dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Å tvrtok','Piatok','Sobota'], - dayNamesShort: ['Ned','Pon','Uto','Str','Å tv','Pia','Sob'], - dayNamesMin: ['Ne','Po','Ut','St','Å t','Pia','So'], - weekHeader: 'Ty', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sk']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sl.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sl.js deleted file mode 100644 index 516550192a7129df4f3edb06c0f7f90e576f684e..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sl.js +++ /dev/null @@ -1,24 +0,0 @@ -/* Slovenian initialisation for the jQuery UI date picker plugin. */ -/* Written by Jaka Jancar (jaka@kubje.org). */ -/* c = č, s = š z = ž C = Č S = Š Z = Ž */ -jQuery(function($){ - $.datepicker.regional['sl'] = { - closeText: 'Zapri', - prevText: '<Prejšnji', - nextText: 'Naslednji>', - currentText: 'Trenutni', - monthNames: ['Januar','Februar','Marec','April','Maj','Junij', - 'Julij','Avgust','September','Oktober','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Avg','Sep','Okt','Nov','Dec'], - dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'], - dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'], - dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'], - weekHeader: 'Teden', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sl']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sq.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sq.js deleted file mode 100644 index 21974c56cd702f2fe1b920244be7c1785edc7dec..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sq.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Albanian initialisation for the jQuery UI date picker plugin. */ -/* Written by Flakron Bytyqi (flakron@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['sq'] = { - closeText: 'mbylle', - prevText: '<mbrapa', - nextText: 'Përpara>', - currentText: 'sot', - monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor', - 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'], - monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer', - 'Kor','Gus','Sht','Tet','Nën','Dhj'], - dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'], - dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'], - dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'], - weekHeader: 'Ja', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sq']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sr-SR.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sr-SR.js deleted file mode 100644 index e7a8683e48de50bc20b8cb378adc56138eac586a..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sr-SR.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Serbian i18n for the jQuery UI date picker plugin. */ -/* Written by Dejan Dimić. */ -jQuery(function($){ - $.datepicker.regional['sr-SR'] = { - closeText: 'Zatvori', - prevText: '<', - nextText: '>', - currentText: 'Danas', - monthNames: ['Januar','Februar','Mart','April','Maj','Jun', - 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Avg','Sep','Okt','Nov','Dec'], - dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','ÄŒetvrtak','Petak','Subota'], - dayNamesShort: ['Ned','Pon','Uto','Sre','ÄŒet','Pet','Sub'], - dayNamesMin: ['Ne','Po','Ut','Sr','ÄŒe','Pe','Su'], - weekHeader: 'Sed', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sr-SR']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sr.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sr.js deleted file mode 100644 index 0bd240e69df85b1266373183b94bb09f4f1c3ec2..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sr.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Serbian i18n for the jQuery UI date picker plugin. */ -/* Written by Dejan Dimić. */ -jQuery(function($){ - $.datepicker.regional['sr'] = { - closeText: 'Затвори', - prevText: '<', - nextText: '>', - currentText: 'ДанаÑ', - monthNames: ['Јануар','Фебруар','Март','Ðприл','Мај','Јун', - 'Јул','ÐвгуÑÑ‚','Септембар','Октобар','Ðовембар','Децембар'], - monthNamesShort: ['Јан','Феб','Мар','Ðпр','Мај','Јун', - 'Јул','Ðвг','Сеп','Окт','Ðов','Дец'], - dayNames: ['Ðедеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'], - dayNamesShort: ['Ðед','Пон','Уто','Сре','Чет','Пет','Суб'], - dayNamesMin: ['Ðе','По','Ут','Ср','Че','Пе','Су'], - weekHeader: 'Сед', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sr']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sv.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sv.js deleted file mode 100644 index e5f549fbf22860f5f44d502d57ed8f235b8dce50..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-sv.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Swedish initialisation for the jQuery UI date picker plugin. */ -/* Written by Anders Ekdahl ( anders@nomadiz.se). */ -jQuery(function($){ - $.datepicker.regional['sv'] = { - closeText: 'Stäng', - prevText: '«Förra', - nextText: 'Nästa»', - currentText: 'Idag', - monthNames: ['Januari','Februari','Mars','April','Maj','Juni', - 'Juli','Augusti','September','Oktober','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Aug','Sep','Okt','Nov','Dec'], - dayNamesShort: ['Sön','MÃ¥n','Tis','Ons','Tor','Fre','Lör'], - dayNames: ['Söndag','MÃ¥ndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'], - dayNamesMin: ['Sö','MÃ¥','Ti','On','To','Fr','Lö'], - weekHeader: 'Ve', - dateFormat: 'yy-mm-dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sv']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ta.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ta.js deleted file mode 100644 index 40431ed8ec7f9897d912b9442349ab882232f55c..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-ta.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by S A Sureshkumar (saskumar@live.com). */ -jQuery(function($){ - $.datepicker.regional['ta'] = { - closeText: 'மூடà¯', - prevText: 'à®®à¯à®©à¯à®©à¯ˆà®¯à®¤à¯', - nextText: 'அடà¯à®¤à¯à®¤à®¤à¯', - currentText: 'இனà¯à®±à¯', - monthNames: ['தை','மாசி','பஙà¯à®•à¯à®©à®¿','சிதà¯à®¤à®¿à®°à¯ˆ','வைகாசி','ஆனி', - 'ஆடி','ஆவணி','பà¯à®°à®Ÿà¯à®Ÿà®¾à®šà®¿','à®à®ªà¯à®ªà®šà®¿','காரà¯à®¤à¯à®¤à®¿à®•ை','மாரà¯à®•ழி'], - monthNamesShort: ['தை','மாசி','பஙà¯','சிதà¯','வைகா','ஆனி', - 'ஆடி','ஆவ','பà¯à®°','à®à®ªà¯','காரà¯','மாரà¯'], - dayNames: ['ஞாயிறà¯à®±à¯à®•à¯à®•ிழமை','திஙà¯à®•டà¯à®•ிழமை','செவà¯à®µà®¾à®¯à¯à®•à¯à®•ிழமை','பà¯à®¤à®©à¯à®•ிழமை','வியாழகà¯à®•ிழமை','வெளà¯à®³à®¿à®•à¯à®•ிழமை','சனிகà¯à®•ிழமை'], - dayNamesShort: ['ஞாயிறà¯','திஙà¯à®•ளà¯','செவà¯à®µà®¾à®¯à¯','பà¯à®¤à®©à¯','வியாழனà¯','வெளà¯à®³à®¿','சனி'], - dayNamesMin: ['ஞா','தி','செ','பà¯','வி','வெ','ச'], - weekHeader: 'Ðе', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ta']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-th.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-th.js deleted file mode 100644 index 2e5300cfd4a69cad54f1b6b855069f17cfac8475..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-th.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Thai initialisation for the jQuery UI date picker plugin. */ -/* Written by pipo (pipo@sixhead.com). */ -jQuery(function($){ - $.datepicker.regional['th'] = { - closeText: 'ปิด', - prevText: '« ย้à¸à¸™', - nextText: 'ถัดไป »', - currentText: 'วันนี้', - monthNames: ['มà¸à¸£à¸²à¸„ม','à¸à¸¸à¸¡à¸ าพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน', - 'à¸à¸£à¸à¸Žà¸²à¸„ม','สิงหาคม','à¸à¸±à¸™à¸¢à¸²à¸¢à¸™','ตุลาคม','พฤศจิà¸à¸²à¸¢à¸™','ธันวาคม'], - monthNamesShort: ['ม.ค.','à¸.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.', - 'à¸.ค.','ส.ค.','à¸.ย.','ต.ค.','พ.ย.','ธ.ค.'], - dayNames: ['à¸à¸²à¸—ิตย์','จันทร์','à¸à¸±à¸‡à¸„าร','พุธ','พฤหัสบดี','ศุà¸à¸£à¹Œ','เสาร์'], - dayNamesShort: ['à¸à¸².','จ.','à¸.','พ.','พฤ.','ศ.','ส.'], - dayNamesMin: ['à¸à¸².','จ.','à¸.','พ.','พฤ.','ศ.','ส.'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['th']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-tj.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-tj.js deleted file mode 100644 index ed662392c5390a2845ba2ad7704d8e7192c297d6..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-tj.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Abdurahmon Saidov (saidovab@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['tj'] = { - closeText: 'Идома', - prevText: '<Қафо', - nextText: 'Пеш>', - currentText: 'Имрӯз', - monthNames: ['Январ','Феврал','Март','Ðпрел','Май','Июн', - 'Июл','ÐвгуÑÑ‚','СентÑбр','ОктÑбр','ÐоÑбр','Декабр'], - monthNamesShort: ['Янв','Фев','Мар','Ðпр','Май','Июн', - 'Июл','Ðвг','Сен','Окт','ÐоÑ','Дек'], - dayNames: ['Ñкшанбе','душанбе','Ñешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'], - dayNamesShort: ['Ñкш','душ','Ñеш','чор','пан','ҷум','шан'], - dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'], - weekHeader: 'Хф', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['tj']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-tr.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-tr.js deleted file mode 100644 index dedfc7ff99b2bcd3947e991a2448fc67d8519f66..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-tr.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Turkish initialisation for the jQuery UI date picker plugin. */ -/* Written by Izzet Emre Erkan (kara@karalamalar.net). */ -jQuery(function($){ - $.datepicker.regional['tr'] = { - closeText: 'kapat', - prevText: '<geri', - nextText: 'ileri>', - currentText: 'bugün', - monthNames: ['Ocak','Åžubat','Mart','Nisan','Mayıs','Haziran', - 'Temmuz','AÄŸustos','Eylül','Ekim','Kasım','Aralık'], - monthNamesShort: ['Oca','Åžub','Mar','Nis','May','Haz', - 'Tem','AÄŸu','Eyl','Eki','Kas','Ara'], - dayNames: ['Pazar','Pazartesi','Salı','ÇarÅŸamba','PerÅŸembe','Cuma','Cumartesi'], - dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], - dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], - weekHeader: 'Hf', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['tr']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-uk.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-uk.js deleted file mode 100644 index 2718f5d1ccc935701ecdb410e70d668323ff412e..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-uk.js +++ /dev/null @@ -1,24 +0,0 @@ -/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */ -/* Corrected by Igor Milla (igor.fsp.milla@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['uk'] = { - closeText: 'Закрити', - prevText: '<', - nextText: '>', - currentText: 'Сьогодні', - monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень', - 'Липень','Серпень','ВереÑень','Жовтень','ЛиÑтопад','Грудень'], - monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер', - 'Лип','Сер','Вер','Жов','ЛиÑ','Гру'], - dayNames: ['неділÑ','понеділок','вівторок','Ñереда','четвер','п’ÑтницÑ','Ñубота'], - dayNamesShort: ['нед','пнд','вів','Ñрд','чтв','птн','Ñбт'], - dayNamesMin: ['Ðд','Пн','Ð’Ñ‚','Ср','Чт','Пт','Сб'], - weekHeader: 'Тиж', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['uk']); -}); \ No newline at end of file diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-vi.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-vi.js deleted file mode 100644 index 1d8f7bbd9cbd07a4d4b9a8315987c695afbb25a2..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-vi.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Vietnamese initialisation for the jQuery UI date picker plugin. */ -/* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */ -jQuery(function($){ - $.datepicker.regional['vi'] = { - closeText: 'Äóng', - prevText: '<Trước', - nextText: 'Tiếp>', - currentText: 'Hôm nay', - monthNames: ['Tháng Má»™t', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu', - 'Tháng Bảy', 'Tháng Tám', 'Tháng ChÃn', 'Tháng Mưá»i', 'Tháng Mưá»i Má»™t', 'Tháng Mưá»i Hai'], - monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6', - 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'], - dayNames: ['Chá»§ Nháºt', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'], - dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], - dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], - weekHeader: 'Tu', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['vi']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-CN.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-CN.js deleted file mode 100644 index 6c4883f536d5334a660f8ca380bde3a0fc35f485..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-CN.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Chinese initialisation for the jQuery UI date picker plugin. */ -/* Written by Cloudream (cloudream@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['zh-CN'] = { - closeText: 'å…³é—', - prevText: '<上月', - nextText: '下月>', - currentText: '今天', - monthNames: ['一月','二月','三月','四月','五月','å…æœˆ', - '七月','八月','乿œˆ','åæœˆ','å一月','å二月'], - monthNamesShort: ['一','二','三','å››','五','å…', - '七','å…«','ä¹','å','å一','å二'], - dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期å…'], - dayNamesShort: ['周日','周一','周二','周三','周四','周五','周å…'], - dayNamesMin: ['æ—¥','一','二','三','å››','五','å…'], - weekHeader: '周', - dateFormat: 'yy-mm-dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: 'å¹´'}; - $.datepicker.setDefaults($.datepicker.regional['zh-CN']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-HK.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-HK.js deleted file mode 100644 index 06c4c628c4066d0a1dc1e9f257e2bf25cf2d69d0..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-HK.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Chinese initialisation for the jQuery UI date picker plugin. */ -/* Written by SCCY (samuelcychan@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['zh-HK'] = { - closeText: '關閉', - prevText: '<上月', - nextText: '下月>', - currentText: '今天', - monthNames: ['一月','二月','三月','四月','五月','å…æœˆ', - '七月','八月','乿œˆ','åæœˆ','å一月','å二月'], - monthNamesShort: ['一','二','三','å››','五','å…', - '七','å…«','ä¹','å','å一','å二'], - dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期å…'], - dayNamesShort: ['周日','周一','周二','周三','周四','周五','周å…'], - dayNamesMin: ['æ—¥','一','二','三','å››','五','å…'], - weekHeader: '周', - dateFormat: 'dd-mm-yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: 'å¹´'}; - $.datepicker.setDefaults($.datepicker.regional['zh-HK']); -}); diff --git a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-TW.js b/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-TW.js deleted file mode 100644 index dd51e359c35b468fab45c0326f93013deedd176c..0000000000000000000000000000000000000000 --- a/pub/lib/jquery/ui/i18n/jquery.ui.datepicker-zh-TW.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Chinese initialisation for the jQuery UI date picker plugin. */ -/* Written by Ressol (ressol@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['zh-TW'] = { - closeText: '關閉', - prevText: '<上月', - nextText: '下月>', - currentText: '今天', - monthNames: ['一月','二月','三月','四月','五月','å…æœˆ', - '七月','八月','乿œˆ','åæœˆ','å一月','å二月'], - monthNamesShort: ['一','二','三','å››','五','å…', - '七','å…«','ä¹','å','å一','å二'], - dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期å…'], - dayNamesShort: ['周日','周一','周二','周三','周四','周五','周å…'], - dayNamesMin: ['æ—¥','一','二','三','å››','五','å…'], - weekHeader: '周', - dateFormat: 'yy/mm/dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: 'å¹´'}; - $.datepicker.setDefaults($.datepicker.regional['zh-TW']); -}); diff --git a/pub/lib/json2.js b/pub/lib/json2.js new file mode 100644 index 0000000000000000000000000000000000000000..148746f17ee9feba705a7921d6cde94cafc28ece --- /dev/null +++ b/pub/lib/json2.js @@ -0,0 +1,24 @@ +/* json2.js + * 2008-01-17 + * Public Domain + * No warranty expressed or implied. Use at your own risk. + * See http://www.JSON.org/js.html + */ +if(!this.JSON){JSON=function(){function f(n){return n<10?'0'+n:n;} + Date.prototype.toJSON=function(){return this.getUTCFullYear()+'-'+ + f(this.getUTCMonth()+1)+'-'+ + f(this.getUTCDate())+'T'+ + f(this.getUTCHours())+':'+ + f(this.getUTCMinutes())+':'+ + f(this.getUTCSeconds())+'Z';};var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};function stringify(value,whitelist){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case'string':return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c;} + c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+ + (c%16).toString(16);})+'"':'"'+value+'"';case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';} + if(typeof value.toJSON==='function'){return stringify(value.toJSON());} + a=[];if(typeof value.length==='number'&&!(value.propertyIsEnumerable('length'))){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i],whitelist)||'null');} + return'['+a.join(',')+']';} + if(whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==='string'){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+':'+v);}}}}else{for(k in value){if(typeof k==='string'){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+':'+v);}}}} + return'{'+a.join(',')+'}';}} + return{stringify:stringify,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==='object'){for(i in v){if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n;}}}} + return filter(k,v);} + if(/^[\],:{}\s]*$/.test(text.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof filter==='function'?walk('',j):j;} + throw new SyntaxError('parseJSON');}};}();} \ No newline at end of file diff --git a/pub/lib/mage/adminhtml/tools.js b/pub/lib/mage/adminhtml/tools.js index 025c8b1925bca0ab835fb37d3548c93eee293bcf..d904c32851a793a339cc153a3eb5a52eddb75bf8 100644 --- a/pub/lib/mage/adminhtml/tools.js +++ b/pub/lib/mage/adminhtml/tools.js @@ -269,234 +269,6 @@ function enableElements(search){ $$('.' + search).each(enableElement); } -/********** Toolbar toggle object to manage normal/floating toolbar toggle during vertical scroll ***********/ -var toolbarToggle = { - // Properties - header: null, // Normal toolbar - headerOffset: null, // Normal toolbar offset - calculated once - headerCopy: null, // Floating toolbar - eventsAdded: false, // We're listening to scroll/resize - compatible: !navigator.appVersion.match('MSIE 6.'), // Whether object is compatible with browser (do not support old browsers, legacy code) - - // Inits object and pushes it into work. Can be used to init/reset(update) object by current DOM. - reset: function () { - // Maybe we are already using floating toolbar - just remove it to update from html - if (this.headerCopy) { - this.headerCopy.remove(); - } - this.createToolbar(); - this.updateForScroll(); - }, - - // Creates toolbar and inits all needed properties - createToolbar: function () { - if (!this.compatible) { - return; - } - - // Extract header that we will use as toolbar - var headers = $$('.content-header'); - for (var i = headers.length - 1; i >= 0; i--) { - if (!headers[i].hasClassName('skip-header')) { - this.header = headers[i]; - break; - } - } - if (!this.header) { - return; - } - - // Calculate header offset once - for optimization - this.headerOffset = Element.cumulativeOffset(this.header)[1]; - - // Toolbar buttons - var buttons = $$('.content-buttons')[0]; - if (buttons) { - // Wrap buttons with 'placeholder' div - to serve as container for buttons - Element.insert(buttons, {before: '<div class="content-buttons-placeholder"></div>'}); - buttons.placeholder = buttons.previous('.content-buttons-placeholder'); - buttons.remove(); - buttons.placeholder.appendChild(buttons); - - this.headerOffset = Element.cumulativeOffset(buttons)[1]; - } - - // Create copy of header, that will serve as floating toolbar docked to top of window - this.headerCopy = $(document.createElement('div')); - var clone = this.header.clone(true); - clone.select('script').invoke('remove'); - this.headerCopy.appendChild(clone); - document.body.insertBefore(this.headerCopy, document.body.lastChild) - this.headerCopy.addClassName('content-header-floating'); - - // Remove duplicated buttons and their container - var placeholder = this.headerCopy.down('.content-buttons-placeholder'); - if (placeholder) { - placeholder.remove(); - } - }, - - // Checks whether object properties are ready and valid - ready: function () { - // Return definitely boolean value - return (this.compatible && this.header && this.headerCopy && this.headerCopy.parentNode) ? true : false; - }, - - // Updates toolbars for current scroll - shows/hides normal and floating toolbar - updateForScroll: function () { - if (!this.ready()) { - return; - } - - // scrolling offset calculation via www.quirksmode.org - var s; - if (self.pageYOffset){ - s = self.pageYOffset; - } else if (document.documentElement && document.documentElement.scrollTop) { - s = document.documentElement.scrollTop; - } else if (document.body) { - s = document.body.scrollTop; - } - - // Show floating or normal toolbar - if (s > this.headerOffset) { - // Page offset is more than header offset, switch to floating toolbar - this.showFloatingToolbar(); - } else { - // Page offset is less than header offset, switch to normal toolbar - this.showNormalToolbar(); - } - }, - - // Shows normal toolbar (and hides floating one) - showNormalToolbar: function () { - if (!this.ready()) { - return; - } - - var buttons = $$('.content-buttons')[0]; - if (buttons && buttons.oldParent && buttons.oldParent != buttons.parentNode) { - buttons.remove(); - if(buttons.oldBefore) { - buttons.oldParent.insertBefore(buttons, buttons.oldBefore); - } else { - buttons.oldParent.appendChild(buttons); - } - } - - this.headerCopy.style.display = 'none'; - }, - - // Shows floating toolbar (and hides normal one) - // Notice that buttons could had changed in html by setting new inner html, - // so our added custom properties (placeholder, oldParent) can be not present in them any more - showFloatingToolbar: function () { - if (!this.ready()) { - return; - } - - var buttons = $$('.content-buttons')[0]; - - if (buttons) { - // Remember original parent in normal toolbar to which these buttons belong - if (!buttons.oldParent) { - buttons.oldParent = buttons.parentNode; - buttons.oldBefore = buttons.previous(); - } - - // Move buttons from normal to floating toolbar - if (buttons.oldParent == buttons.parentNode) { - // Make static dimensions for placeholder, so it's not collapsed when buttons are removed - if (buttons.placeholder) { - var dimensions = buttons.placeholder.getDimensions() - buttons.placeholder.style.width = dimensions.width + 'px'; - buttons.placeholder.style.height = dimensions.height + 'px'; - } - - // Move to floating - var target = this.headerCopy.down('div'); - if (target) { - buttons.hide(); - buttons.remove(); - - target.appendChild(buttons); - buttons.show(); - } - } - } - - this.headerCopy.style.display = 'block'; - }, - - // Starts object on window load - startOnLoad: function () { - if (!this.compatible) { - return; - } - - if (!this.funcOnWindowLoad) { - this.funcOnWindowLoad = this.start.bind(this); - } - Event.observe(window, 'load', this.funcOnWindowLoad); - }, - - // Removes object start on window load - removeOnLoad: function () { - if (!this.funcOnWindowLoad) { - return; - } - Event.stopObserving(window, 'load', this.funcOnWindowLoad); - }, - - // Starts object by creating toolbar and enabling scroll/resize events - start: function () { - if (!this.compatible) { - return; - } - - this.reset(); - this.startListening(); - }, - - // Stops object by removing toolbar and stopping listening to events - stop: function () { - this.stopListening(); - this.removeOnLoad(); - this.showNormalToolbar(); - }, - - // Addes events on scroll/resize - startListening: function () { - if (this.eventsAdded) { - return; - } - - if (!this.funcUpdateForViewport) { - this.funcUpdateForViewport = this.updateForScroll.bind(this); - } - - Event.observe(window, 'scroll', this.funcUpdateForViewport); - Event.observe(window, 'resize', this.funcUpdateForViewport); - - this.eventsAdded = true; - }, - - // Removes listening to events on resize/update - stopListening: function () { - if (!this.eventsAdded) { - return; - } - Event.stopObserving(window, 'scroll', this.funcUpdateForViewport); - Event.stopObserving(window, 'resize', this.funcUpdateForViewport); - - this.eventsAdded = false; - } -} - -// Start toolbar on window load -toolbarToggle.startOnLoad(); - - /** Cookie Reading And Writing **/ var Cookie = { diff --git a/pub/lib/mage/adminhtml/varienLoader.js b/pub/lib/mage/adminhtml/varienLoader.js index 800d937f90aeac12681b00a883c9a0a22db0c0f1..33bffd49c9fb8f89e023cd034e955b90cfb26979 100644 --- a/pub/lib/mage/adminhtml/varienLoader.js +++ b/pub/lib/mage/adminhtml/varienLoader.js @@ -209,9 +209,12 @@ varienLoaderHandler.handler = { //Element.show('loading-process'); } }, - + onException : function(transport) { + toggleSelectsUnderBlock($('loading-mask'), true); + Element.hide('loading-mask'); + }, onComplete: function(transport) { - if(Ajax.activeRequestCount == 0) { + if (Ajax.activeRequestCount == 0) { //Element.hide('loading-process'); toggleSelectsUnderBlock($('loading-mask'), true); Element.hide('loading-mask'); diff --git a/pub/lib/mage/adminhtml/wysiwyg/widget.js b/pub/lib/mage/adminhtml/wysiwyg/widget.js index 827971ff794239dd2f1dcd56425e49e0726d79ce..4d461700af8f0f453f1635b41ef0ca7411aed5b2 100644 --- a/pub/lib/mage/adminhtml/wysiwyg/widget.js +++ b/pub/lib/mage/adminhtml/wysiwyg/widget.js @@ -82,6 +82,10 @@ WysiwygWidget.Widget.prototype = { initialize: function(formEl, widgetEl, widgetOptionsEl, optionsSourceUrl, widgetTargetId) { $(formEl).insert({bottom: widgetTools.getDivHtml(widgetOptionsEl)}); + jQuery('#' + formEl).mage('validation', { + ignore: ".skip-submit", + errorClass: 'mage-error' + }); this.formEl = formEl; this.widgetEl = $(widgetEl); this.widgetOptionsEl = $(widgetOptionsEl); @@ -210,11 +214,12 @@ WysiwygWidget.Widget.prototype = { }, insertWidget: function() { - var validationResult = jQuery('#' + this.formEl).validate({ + jQuery('#' + this.formEl).validate({ ignore: ".skip-submit", errorClass: 'mage-error' - }).valid(); + }); + var validationResult = jQuery('#' + this.formEl).valid(); if (validationResult) { var formElements = []; var i = 0; diff --git a/pub/lib/mage/backend/action-link.js b/pub/lib/mage/backend/action-link.js new file mode 100644 index 0000000000000000000000000000000000000000..821c7d4c7cddcdc4cb149d034993a86759cbf216 --- /dev/null +++ b/pub/lib/mage/backend/action-link.js @@ -0,0 +1,59 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true*/ +(function($) { + $.widget('mage.actionLink', { + /** + * Button creation + * @protected + */ + _create: function() { + this._bind(); + }, + + /** + * Bind handler on button click + * @protected + */ + _bind: function() { + this._on({ + mousedown: function(e){ + e.stopImmediatePropagation(); + e.preventDefault(); + }, + mouseup: function(e){ + e.stopImmediatePropagation(); + e.preventDefault(); + }, + click: function(e) { + e.preventDefault(); + e.stopImmediatePropagation(); + $(this.options.related || this.element) + .trigger(this.options.event, this.options.eventData ? [this.options.eventData] : [{}]); + } + }); + } + }); +})(jQuery); \ No newline at end of file diff --git a/pub/lib/mage/backend/bootstrap.js b/pub/lib/mage/backend/bootstrap.js index 4fe903f690776cc8046e33d74fb8f35ca61488ee..875827a00c65add29b2ab3758cbef2e5349d298b 100644 --- a/pub/lib/mage/backend/bootstrap.js +++ b/pub/lib/mage/backend/bootstrap.js @@ -26,18 +26,6 @@ /*global FORM_KEY:true*/ jQuery(function ($) { 'use strict'; - // @TODO move isJSON method inside file with utility functions - $.extend(true, $, { - mage: { - isJSON : function(json){ - json = json.replace(/\\["\\\/bfnrtu]/g, '@'); - json = json.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'); - json = json.replace(/(?:^|:|,)(?:\s*\[)+/g, ''); - return (/^[\],:{}\s]*$/.test(json)); - } - } - }); - $.ajaxSetup({ /* * @type {string} @@ -50,27 +38,24 @@ jQuery(function ($) { * @param {Object} */ beforeSend: function(jqXHR, settings) { + var form_key = typeof FORM_KEY !== 'undefined' ? FORM_KEY : null; if (!settings.url.match(new RegExp('[?&]isAjax=true',''))) { settings.url = settings.url.match( new RegExp('\\?',"g")) ? settings.url + '&isAjax=true' : settings.url + '?isAjax=true'; } - if ($.type(settings.data) === "string" && - settings.data.indexOf('form_key=') === -1 - ) { + if (!settings.data) { + settings.data = { + form_key: form_key + }; + } else if ($.type(settings.data) === "string" && + settings.data.indexOf('form_key=') === -1) { settings.data += '&' + $.param({ - form_key: FORM_KEY + form_key: form_key }); - } else { - if (!settings.data) { - settings.data = { - form_key: FORM_KEY - }; - } - if (!settings.data.form_key) { - settings.data.form_key = FORM_KEY; - } + } else if($.isPlainObject(settings.data) && !settings.data.form_key) { + settings.data.form_key = form_key; } }, @@ -81,40 +66,42 @@ jQuery(function ($) { */ complete: function(jqXHR) { if (jqXHR.readyState === 4) { - if($.mage.isJSON(jqXHR.responseText)) { + try { var jsonObject = jQuery.parseJSON(jqXHR.responseText); if (jsonObject.ajaxExpired && jsonObject.ajaxRedirect) { window.location.replace(jsonObject.ajaxRedirect); } - } + } catch(e) {} } } }); var bootstrap = function() { - /* - * Initialization of button widgets + /** + * Init all components defined via data-mage-init attribute + * and subscribe init action on contentUpdated event */ - $('*[data-widget-button]').button(); + $.mage.init(); /* * Show loader on ajax send */ $('body').on('ajaxSend processStart', function(e, jqxhr, settings) { - if (settings && settings.showLoader) { - $(e.target).loader({ - icon: $('#loading_mask_loader img').attr('src') - }).loader('show'); + if (settings && settings.showLoader || e.type === 'processStart') { + $(e.target).mage('loader', { + icon: $('#loading_mask_loader img').attr('src'), + showOnInit: true + }); } }); /* * Initialization of notification widget */ - if ($('#messages').length) { - $('#messages').notification(); - } + $('#messages').mage('notification'); + + $('.content-header:not(.skip-header)').mage('floatingHeader'); }; - $(document).ready(bootstrap); + $(bootstrap); }); diff --git a/app/code/core/Mage/Catalog/view/frontend/js/grid.js b/pub/lib/mage/backend/button.js similarity index 57% rename from app/code/core/Mage/Catalog/view/frontend/js/grid.js rename to pub/lib/mage/backend/button.js index 483ab0389eef554bf9ed5cde0205b0387062a689..890605cb81793cc7050b3008863cd092aa3076aa 100644 --- a/app/code/core/Mage/Catalog/view/frontend/js/grid.js +++ b/pub/lib/mage/backend/button.js @@ -17,31 +17,38 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category frontend grid + * @category mage * @package mage * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/*jshint browser:true jquery:true*/ -(function ($) { - var gridInit = { - listId: undefined, - decoratorParams: undefined, - genericSelector: undefined - }; +/*jshint jquery:true*/ +(function($) { + "use strict"; + $.widget('ui.button', $.ui.button, { + options: { + eventData: {} + }, - $(document).ready(function () { - $.mage.event.trigger("mage.grid.initialize", gridInit); - if (gridInit.listId) { - $(gridInit.listId).decorate('list'); - } - if (gridInit.genericSelector) { - if (gridInit.decoratorParams) { - $(gridInit.genericSelector).decorate('generic', gridInit.decoratorParams); - } - else { - $(gridInit.genericSelector).decorate('generic'); - } + /** + * Button creation + * @protected + */ + _create: function() { + this._bind(); + this._super(); + }, + + /** + * Bind handler on button click + * @protected + */ + _bind: function() { + this.element + .off('click.button') + .on('click.button', $.proxy(function() { + $(this.target).trigger(this.event, [this.eventData]); + }, this.options)); } }); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/pub/lib/mage/backend/floating-header.js b/pub/lib/mage/backend/floating-header.js new file mode 100644 index 0000000000000000000000000000000000000000..8ee64e1ceb5d33d31c750f0bcc6ea8319d7680ae --- /dev/null +++ b/pub/lib/mage/backend/floating-header.js @@ -0,0 +1,87 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Mage_Adminhtml + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true */ +(function($) { + "use strict"; + $.widget('mage.floatingHeader', { + options: { + placeholderAttrs: { + 'class': 'content-header-placeholder' + }, + fixedClass: 'fixed' + }, + + /** + * Widget initialization + * @private + */ + _create: function() { + this._setVars(); + this._bind(); + }, + + /** + * Set privat variables on load, for performance purposes + * @private + */ + _setVars: function() { + this._placeholder = this.element.before($('<div/>', this.options.placeholderAttrs)).prev(); + this._offsetTop = this._placeholder.offset().top; + this._height = this.element.outerHeight(true); + }, + + /** + * Event binding, will monitor scroll and resize events (resize events left for backward compat) + * @private + */ + _bind: function() { + this._on(window, { + scroll: this._handlePageScroll, + resize: this._handlePageScroll + }); + }, + + /** + * Event handler for setting fixed positioning + * @event + * @private + */ + _handlePageScroll: function() { + var isActive = ($(window).scrollTop() > this._offsetTop); + this.element + [isActive ? 'addClass': 'removeClass'](this.options.fixedClass); + this._placeholder.height(isActive ? this._height: ''); + }, + + /** + * Widget destroy functionality + * @private + */ + _destroy: function() { + this._placeholder.remove(); + this._off($(window)); + } + }); +})(jQuery); diff --git a/pub/lib/mage/backend/form.js b/pub/lib/mage/backend/form.js index 9775c6146c1560df64239f536695294132fd2b5c..d59a5f178424b478e494ed9e4e166b9c6cf7b676 100644 --- a/pub/lib/mage/backend/form.js +++ b/pub/lib/mage/backend/form.js @@ -24,6 +24,7 @@ */ /*jshint jquery:true*/ (function($) { + "use strict"; $.widget("mage.form", { options: { handlersData: { @@ -33,6 +34,11 @@ args: {back: 'edit'} } }, + saveAndNew: { + action: { + args: {back: 'new'} + } + }, preview: { target: '_blank' } @@ -195,36 +201,4 @@ this.element.trigger('submit'); } }); - - $.widget('ui.button', $.ui.button, { - /** - * Button creation - * @protected - */ - _create: function() { - this._processDataAttr(); - this._bind(); - this._super("_create"); - }, - - /** - * Get additional options from data attribute and merge it in this.options - * @protected - */ - _processDataAttr: function() { - var data = this.element.data().widgetButton; - $.extend(true, this.options, $.type(data) === 'object' ? data : {}); - }, - - /** - * Bind handler on button click - * @protected - */ - _bind: function() { - this.element.on('click', $.proxy(function() { - $(this.options.related) - .trigger(this.options.event, this.options.eventData ? [this.options.eventData] : [{}]); - }, this)); - } - }); })(jQuery); diff --git a/pub/lib/mage/backend/notification.js b/pub/lib/mage/backend/notification.js index 5f6a68979bbfe3308561e44ed13e36ceeebe9f77..5097fb479dbe1f302046a59db0c0c81fb66b1054 100644 --- a/pub/lib/mage/backend/notification.js +++ b/pub/lib/mage/backend/notification.js @@ -46,16 +46,16 @@ * Add new message * @protected * @param {Object} event object - * @param {Object} The jQuery XMLHttpRequest object returned by $.ajax() + * @param {Object} jqXHR The jQuery XMLHttpRequest object returned by $.ajax() * @param {Object} */ - _add: function(e, jqXHR) { - if($.mage.isJSON(jqXHR.responseText)) { + _add: function(event, jqXHR) { + try { var response = $.parseJSON(jqXHR.responseText); - if (response.error) { + if (response && response.error) { this.element.append($.tmpl('globalNotification', response)); } - } + } catch(e) {} } }); })(jQuery); diff --git a/pub/lib/mage/backend/suggest.js b/pub/lib/mage/backend/suggest.js new file mode 100644 index 0000000000000000000000000000000000000000..d4d7f2cdc5540d9bbf0dd0a764b5b464abc5169c --- /dev/null +++ b/pub/lib/mage/backend/suggest.js @@ -0,0 +1,517 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true browser:true*/ + +(function($) { + 'use strict'; + /** + * Implement base functionality + */ + $.widget('mage.suggest', { + options: { + template: '', + minLength: 1, + /** + * @type {(string|Array)} + */ + source: null, + delay: 500, + events: {}, + appendMethod: 'after', + control: 'menu', + controls: { + menu: { + selector: ':ui-menu', + eventsMap: { + focus: 'menufocus', + blur: 'menublur', + select: 'menuselect' + } + } + }, + wrapperAttributes: { + 'class': 'mage-suggest' + }, + attributes: { + 'class': 'mage-suggest-dropdown' + } + }, + + /** + * Component's constructor + * @private + */ + _create: function() { + this._setTemplate(); + this._term = ''; + this._selectedItem = {value: '', label: ''}; + this.dropdown = $('<div/>', this.options.attributes).hide(); + this.element + .wrap($('<div><div class="mage-suggest-inner"></div></div>') + .prop(this.options.wrapperAttributes)) + [this.options.appendMethod](this.dropdown) + .attr('autocomplete', 'off'); + this.hiddenInput = $('<input/>', { + type: 'hidden', + name: this.element.attr('name') + }).insertBefore(this.element); + this.element.removeAttr('name'); + this._control = this.options.controls[this.options.control] || {}; + this._bind(); + }, + + /** + * Component's destructor + * @private + */ + _destroy: function() { + this.element.removeAttr('autocomplete') + .unwrap() + .attr('name', this.hiddenInput.attr('name')); + this.dropdown.remove(); + this.hiddenInput.remove(); + this._off(this.element, 'keydown keyup blur'); + }, + + /** + * Return actual value of an "input"-element + * @return {string} + * @private + */ + _value: function() { + return $.trim(this.element[this.element.is(':input') ? 'val' : 'text']()); + }, + + /** + * Pass original event to a control component for handling it as it's own event + * @param {Object} event + * @private + */ + _proxyEvents: function(event) { + this.dropdown.find(this._control.selector).triggerHandler(event); + }, + + /** + * Bind handlers on specific events + * @private + */ + _bind: function() { + this._on($.extend({ + keydown: function(event) { + var keyCode = $.ui.keyCode; + switch (event.keyCode) { + case keyCode.HOME: + case keyCode.END: + case keyCode.PAGE_UP: + case keyCode.PAGE_DOWN: + case keyCode.UP: + case keyCode.DOWN: + case keyCode.LEFT: + case keyCode.RIGHT: + if (!event.shiftKey) { + this._proxyEvents(event); + } + break; + case keyCode.TAB: + if (this.isDropdownShown()) { + this._selectItem(); + event.preventDefault(); + } + break; + case keyCode.ENTER: + case keyCode.NUMPAD_ENTER: + if (this.isDropdownShown()) { + this._proxyEvents(event); + event.preventDefault(); + } + break; + case keyCode.ESCAPE: + this._hideDropdown(); + break; + } + }, + keyup: function(event) { + var keyCode = $.ui.keyCode; + switch (event.keyCode) { + case keyCode.HOME: + case keyCode.END: + case keyCode.PAGE_UP: + case keyCode.PAGE_DOWN: + case keyCode.ESCAPE: + case keyCode.UP: + case keyCode.DOWN: + case keyCode.LEFT: + case keyCode.RIGHT: + break; + case keyCode.ENTER: + case keyCode.NUMPAD_ENTER: + if (this.isDropdownShown()) { + event.preventDefault(); + } + break; + default: + this.search(); + } + }, + blur: this._hideDropdown, + cut: this.search, + paste: this.search, + input: this.search + }, this.options.events)); + + this._bindDropdown(); + }, + + /** + * Bind handlers for dropdown element on specific events + * @private + */ + _bindDropdown: function() { + var events = { + click: this._selectItem, + mousedown: function(e) { + e.preventDefault(); + } + }; + events[this._control.eventsMap.select] = this._selectItem; + events[this._control.eventsMap.focus] = function(e, ui) { + this.element.val(ui.item.text()); + }; + events[this._control.eventsMap.blur] = function() { + this.element.val(this._term); + }; + this._on(this.dropdown, events); + }, + + /** + * Save selected item and hide dropdown + * @private + */ + _selectItem: function() { + var term = this._value(); + if (this.isDropdownShown() && term) { + /** + * @type {(Object|null)} - label+value object of selected item + * @private + */ + this._selectedItem = $.grep(this._items, $.proxy(function(v) { + return v.label === term; + }, this))[0] || {value: '', label: ''}; + if (this._selectedItem.value) { + this._term = this._selectedItem.label; + this.hiddenInput.val(this._selectedItem.value); + this._hideDropdown(); + } + } + }, + + /** + * Check if dropdown is shown + * @return {boolean} + */ + isDropdownShown: function() { + return this.dropdown.is(':visible'); + }, + + /** + * Open dropdown + * @private + */ + _showDropdown: function() { + if (!this.isDropdownShown()) { + this.dropdown.show(); + } + }, + + /** + * Close and clear dropdown content + * @private + */ + _hideDropdown: function() { + this.element.val(this._selectedItem.label); + this.dropdown.hide().empty(); + }, + + /** + * Acquire content template + * @private + */ + _setTemplate: function() { + this.template = $(this.options.template).length ? + $(this.options.template).template() : + $.template('suggestTemplate', this.options.template); + }, + + /** + * Execute search process + * @public + */ + search: function() { + var term = this._value(); + if (this._term !== term) { + this._term = term; + if (term) { + this._search(term); + } else { + this._selectedItem = {value: '', label: ''}; + this.hiddenInput.val(this._selectedItem.value); + } + } + }, + + /** + * Actual search method, can be overridden in descendants + * @param {string} term - search phrase + * @param {Object} context - search context + * @private + */ + _search: function(term, context) { + var renderer = $.proxy(function(items) { + return this._renderDropdown(items, context || {}); + }, this); + this.element.addClass('ui-autocomplete-loading'); + if (this.options.delay) { + clearTimeout(this._searchTimeout); + this._searchTimeout = this._delay(function() { + this._source(term, renderer); + }, this.options.delay); + } else { + this._source(term, renderer); + } + }, + + /** + * Extend basic context with additional data (search results, search term) + * @param {Object} context + * @return {Object} + * @private + */ + _prepareDropdownContext: function(context) { + return $.extend(context, { + items: this._items, + term: this._term + }); + }, + + /** + * Render content of suggest's dropdown + * @param {Array} items - list of label+value objects + * @param {Object} context - template's context + * @private + */ + _renderDropdown: function(items, context) { + this._items = items; + $.tmpl(this.template, this._prepareDropdownContext(context)) + .appendTo(this.dropdown.empty()); + this.dropdown.trigger('contentUpdated'); + this._showDropdown(); + }, + + /** + * Implement search process via spesific source + * @param {string} term - search phrase + * @param {Function} renderer - search results handler, display search result + * @private + */ + _source: function(term, renderer) { + if ($.isArray(this.options.source)) { + renderer(this.filter(this.options.source, term)); + + } else if ($.type(this.options.source) === 'string') { + if (this._xhr) { + this._xhr.abort(); + } + this._xhr = $.ajax($.extend({ + url: this.options.source, + type: 'POST', + dataType: 'json', + data: {q: term}, + success: renderer, + showLoader: true + }, this.options.ajaxOptions || {})); + } + }, + + /** + * Perform filtering in advance loaded items and returns search result + * @param {Array} items - all available items + * @param {string} term - search phrase + * @return {Object} + */ + filter: function(items, term) { + var matcher = new RegExp(term, 'i'); + return $.grep(items, function(value) { + return matcher.test(value.label || value.value || value); + }); + } + }); + + /** + * Implements height prediction functionality to dropdown item + */ + $.widget('mage.suggest', $.mage.suggest, { + /** + * Extension specific options + */ + options: { + bottomMargin: 35 + }, + + /** + * @override + * @private + */ + _renderDropdown: function() { + this._superApply(arguments); + this._recalculateDropdownHeight(); + }, + + /** + * Recalculates height of dropdown and cut it if needed + * @private + */ + _recalculateDropdownHeight: function() { + var dropdown = this.dropdown.css('visibility', 'hidden'), + fromTop = dropdown.offset().top, + winHeight = $(window).height(), + isOverflowApplied = (fromTop + dropdown.outerHeight()) > winHeight; + + dropdown + .css('visibility', '') + [isOverflowApplied ? 'addClass':'removeClass']('overflow-y') + .height(isOverflowApplied ? winHeight - fromTop - this.options.bottomMargin : ''); + } + }); + + /** + * Implement storing search history and display recent searches + */ + $.widget('mage.suggest', $.mage.suggest, { + options: { + showRecent: true, + storageKey: 'suggest', + storageLimit: 10 + }, + + /** + * @override + * @private + */ + _create: function() { + if (this.options.showRecent && window.localStorage) { + var recentItems = JSON.parse(localStorage.getItem(this.options.storageKey)); + /** + * @type {Array} - list of recently searched items + * @private + */ + this._recentItems = $.isArray(recentItems) ? recentItems : []; + } + this._super(); + }, + + /** + * @override + * @private + */ + _bind: function() { + this._super(); + this._on({ + focus: function() { + if (!this._value()) { + this._renderDropdown(this._recentItems); + } + } + }); + }, + + /** + * @override + */ + search: function() { + this._super(); + if (!this._term) { + clearTimeout(this._searchTimeout); + if (this._xhr) { + this._xhr.abort(); + } + this._renderDropdown(this._recentItems); + } + }, + + /** + * @override + * @private + */ + _selectItem: function() { + this._super(); + if (this._selectedItem.value) { + this._addRecent(this._selectedItem); + } + }, + + /** + * Add selected item of search result into storage of recents + * @param {Object} item - label+value object + * @private + */ + _addRecent: function(item) { + this._recentItems = $.grep(this._recentItems, function(obj){ + return obj.value !== item.value; + }); + this._recentItems.unshift(item); + this._recentItems = this._recentItems.slice(0, this.options.storageLimit); + localStorage.setItem(this.options.storageKey, JSON.stringify(this._recentItems)); + } + }); + + /** + * Implement show all functionality + */ + $.widget('mage.suggest', $.mage.suggest, { + /** + * @override + * @private + */ + _bind: function() { + this._super(); + this._on(this.dropdown, { + showAll: function() { + this._search('', {_allSown: true}); + } + }); + }, + + /** + * @override + * @private + */ + _prepareDropdownContext: function() { + var context = this._superApply(arguments); + return $.extend(context, {allShown: function(){ + return !!context._allSown; + }}); + } + }); +})(jQuery); diff --git a/pub/lib/mage/backend/tabs.js b/pub/lib/mage/backend/tabs.js index c8267a94da2ea2a05020eb99ea7ca7c938b3a68a..81063931c9aaaba10ff93fa5fefe79e106129914 100644 --- a/pub/lib/mage/backend/tabs.js +++ b/pub/lib/mage/backend/tabs.js @@ -29,7 +29,8 @@ // mage.tabs base functionality $.widget('mage.tabs', $.ui.tabs, { options: { - spinner: false + spinner: false, + groups: null }, /** @@ -42,6 +43,19 @@ this._super(); }, + /** + * @override + * @private + * @return {Array} Array of DOM-elements + */ + _getList: function() { + if(this.options.groups) { + return this.element.find(this.options.groups); + } else { + return this._super(); + } + }, + /** * Get active anchor * @return {Element} @@ -148,17 +162,11 @@ }, /** - * Trigger event 'processStart' before tab is loaded - */ - beforeLoad: function() {$('body').trigger('processStart');}, - - /** - * Trigger event 'processStop' after tab is loaded + * Replacing href attribute with loaded panel id * @param {Object} event - event object * @param {Object} */ load: function(event, ui) { - $('body').trigger('processStop'); $(ui.tab).prop('href', '#' + $(ui.panel).prop('id')); } } diff --git a/pub/lib/mage/backend/validation.js b/pub/lib/mage/backend/validation.js index b7c16fd60d303e695a74eb9a5d5ebe5076d2b785..0fdc51455e51006ea8be59bc9efe596ebd9c2878 100644 --- a/pub/lib/mage/backend/validation.js +++ b/pub/lib/mage/backend/validation.js @@ -107,11 +107,18 @@ * @param {Object} The jQuery XMLHttpRequest object returned by $.ajax() */ _onSuccess: function(response) { + var attributes = response.attributes || {}; if (response.attribute) { - $('#' + response.attribute) - .addClass('validate-ajax-error') - .data('msg-validate-ajax-error', response.message); - this.validate.element( "#" + response.attribute); + attributes[response.attribute] = response.message; + } + + for (var attributeCode in attributes) { + if (attributes.hasOwnProperty(attributeCode)) { + $('#' + attributeCode) + .addClass('validate-ajax-error') + .data('msg-validate-ajax-error', attributes[attributeCode]); + this.validate.element("#" + attributeCode); + } } if (!response.error) { this.element[0].submit(); diff --git a/app/code/core/Mage/Page/view/frontend/js/cookies.js b/pub/lib/mage/cookies.js similarity index 50% rename from app/code/core/Mage/Page/view/frontend/js/cookies.js rename to pub/lib/mage/cookies.js index 2e8ebf30639b64781f413d823f292916ef0a42fc..96454da61261cb58e0b601db6a61c33809e64908 100644 --- a/app/code/core/Mage/Page/view/frontend/js/cookies.js +++ b/pub/lib/mage/cookies.js @@ -27,17 +27,55 @@ $.extend(true, $, { mage: { cookies: (function() { - this.set = function(name, value) { - var expires = arguments[2] || $.cookie.defaults.expires; - var path = arguments[3] || $.cookie.defaults.path; - var domain = arguments[4] || $.cookie.defaults.domain; - var secure = arguments[5] || $.cookie.defaults.secure; + /** + * Cookie default values. + * @type {Object} + */ + this.defaults = { + expires: null, + path: '/', + domain: null, + secure: false + }; + + /** + * Calculate cookie expiration date based on its lifetime. + * @param {Object} options Cookie option values + * @return {(null|Date)} Calculated cookie expiration date or null if no lifetime provided. + * @private + */ + this._lifetimeToExpires = function(options) { + if (options.lifetime && (options.lifetime > 0)) { + var expires = options.expires || new Date(); + return new Date(expires.getTime() + options.lifetime * 1000); + } + return null; + }; + + /** + * Set a cookie's value by cookie name based on optional cookie options. + * @param {string} name The name of the cookie. + * @param {string} value The cookie's value. + * @param {Object} options Optional options (e.g. lifetime, expires, path, etc.) + */ + this.set = function(name, value, options) { + options = $.extend({}, this.defaults, options || {}); + var expires = this._lifetimeToExpires(options) || options.expires; + var path = options.path; + var domain = options.domain; + var secure = options.secure; document.cookie = name + "=" + encodeURIComponent(value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : ""); }; + + /** + * Get a cookie's value by cookie name. + * @param {string} name The name of the cookie. + * @return {(null|string)} + */ this.get = function(name) { var arg = name + "="; var alen = arg.length; @@ -47,7 +85,7 @@ while (i < clen) { j = i + alen; if (document.cookie.substring(i, j) === arg) { - return $.mage.cookies.getCookieVal(j); + return this.getCookieVal(j); } i = document.cookie.indexOf(" ", i) + 1; if (i === 0) { @@ -56,11 +94,23 @@ } return null; }; + + /** + * Clear a cookie's value by name. + * @param {string} name The name of the cookie being cleared. + */ this.clear = function(name) { - if($.mage.cookies.get(name)) { - $.mage.cookies.set(name, "", new Date("Jan 01 1970 00:00:01 GMT")); + if (this.get(name)) { + this.set(name, "", {expires: new Date("Jan 01 1970 00:00:01 GMT")}); } }; + + /** + * Return URI decoded cookie component value (e.g. expires, path, etc.) based on a + * numeric offset in the document's cookie value. + * @param {number} offset Offset into the document's cookie value. + * @return {string} + */ this.getCookieVal = function(offset) { var endstr = document.cookie.indexOf(";", offset); if(endstr === -1){ diff --git a/pub/lib/mage/jquery-no-conflict.js b/pub/lib/mage/jquery-no-conflict.js index 62d0996f7b974df08c58218ba86669c775db0a91..60157e2229b35b26b7610439a2d24e997fc18f4b 100644 --- a/pub/lib/mage/jquery-no-conflict.js +++ b/pub/lib/mage/jquery-no-conflict.js @@ -24,4 +24,3 @@ */ jQuery.noConflict(); -jQuery.mage = jQuery.mage || {}; diff --git a/pub/lib/mage/loader.js b/pub/lib/mage/loader.js index a824372ea06c3fc3f65bc72906077c608a06652d..5469e34f58162f8c8772ec68fcafe837d10f3f41 100644 --- a/pub/lib/mage/loader.js +++ b/pub/lib/mage/loader.js @@ -45,6 +45,16 @@ this._bind(); }, + /** + * Loader initialisation + * @private + */ + _init: function() { + if (this.options.showOnInit) { + this.show(); + } + }, + /** * Bind on ajax complete event * @protected diff --git a/pub/lib/mage/localization/localize.js b/pub/lib/mage/localization/localize.js deleted file mode 100644 index 0a6942b98c258bbfebf0bdba6cf91f04e17ed555..0000000000000000000000000000000000000000 --- a/pub/lib/mage/localization/localize.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category localization - * @package mage - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -/*jshint eqnull:true browser:true jquery:true*/ -/*global Globalize:true */ -(function ($) { - //closure localize object - var localize = function (locale) { - this.localize = Globalize; - if (locale == null) { - this.localize.culture('en'); - } else { - this.localize.culture(locale); - } - this.dateFormat = ['d', 'D', 'f', 'F', 'M', 'S', 't', 'T', 'Y']; - this.numberFormat = ['n', 'n1', 'n3', 'd', 'd2', 'd3', 'p', 'p1', 'p3', 'c', 'c0']; - }; - localize.prototype.name = function () { - return this.localize.culture().name; - }; - localize.prototype.date = function (dateParam, format) { - if ($.inArray(format.toString(), this.dateFormat) < 0) { - return 'Invalid date formatter'; - } - if (dateParam instanceof Date) { - return this.localize.format(dateParam, format); - } - var d = new Date(dateParam.toString()); - if (d == null || d.toString === 'Invalid Date') { - return d.toString; - } else { - return this.localize.format(d, format); - } - }; - localize.prototype.number = function (numberParam, format) { - if ($.inArray(format.toString(), this.numberFormat)) { - return 'Invalid number formatter'; - } - if (typeof numberParam === 'number') { - return this.localize.format(numberParam, format); - } - var num = Number(numberParam); - if (num == null || isNaN(num)) { - return numberParam; - } else { - return this.localize.format(num, format); - } - }; - localize.prototype.currency = function (currencyParam) { - if (typeof currencyParam === 'number') { - return this.localize.format(currencyParam, 'c'); - } - var num = Number(currencyParam); - if (num == null || isNaN(num)) { - return currencyParam; - } else { - return this.localize.format(num, 'c'); - } - }; - - $.extend(true, $, { - mage: { - localize: function() {}, - locale: function (locale) { - if (locale != null && locale.length > 0) { - $.mage.localize = new localize(locale); - } else { - $.mage.localize = new localize(); - } - } - } - }); - - $.mage.locale($.mage.language.code); -})(jQuery); - - diff --git a/pub/lib/mage/mage.js b/pub/lib/mage/mage.js index 2654b39593f025f5b35adf26e54f0c775346a691..a4ec587480fc4fe7b5944fb4c1c93b453318dfd2 100644 --- a/pub/lib/mage/mage.js +++ b/pub/lib/mage/mage.js @@ -25,75 +25,213 @@ /*jshint eqnull:true browser:true jquery:true*/ /*global head:true */ (function($) { + "use strict"; + /** + * Main namespace for Magento extansions + * @type {Object} + */ + $.mage = {}; +})(jQuery); - var _syncQueue = []; - var _asyncQueue = []; - var _cssQueue = []; - - // Add add arr to queue make sure elements are unique - function _addToQueue(files, queue) { - for (var i = 0; i < files.length; i++) { - if (typeof files[i] === 'string' && $.inArray(files[i], queue) === -1) { - queue.push(files[i]); +/** + * Plugin mage and group of heplers for it + */ +(function($) { + "use strict"; + /** + * Plugin mage, initialize components on elements + * @param {string} name - component name + * @param {} + * @return {Object} + */ + $.fn.mage = function() { + var name = arguments[0], + args = Array.prototype.slice.call(arguments, 1); + return this.each(function(){ + var inits = _getInitData(this); + if (name) { + inits[name] = args; } + $.each(inits, $.proxy(_initComponent, this)); + }); + }; + + /** + * Storage of declared resources + * @type {Object} + * @private + */ + var _resources = {}; + + /** + * Execute initialization callback when all resources are loaded + * @param {Array} args - list of resources + * @param {Function} handler - initialization callback + * @private + */ + function _onload(args, handler) { + args.push(handler); + head.js.apply(head, args); + } + + /** + * Run initialization of a component + * @param {Object} init - setting for a component in format + * {name: {string}[, options: {Object}][, args: {Array}][, resources: {Array}]} + * @private + */ + function _initComponent(name, args) { + /*jshint validthis: true */ + // create a complete copy of arguments + args = $.map($.makeArray(args), function(arg) { + return $.isArray(arg) ? [arg.slice()] : + $.isPlainObject(arg) ? $.extend(true, {}, arg) : arg; + }); + var init = { + name: name, + args: args, + resources: (_resources[name] || []).slice() + }; + // Through event-listener 3-rd party developer can modify options and list of resources + $($.mage).trigger($.Event(name + 'init', {target: this}), init); + // Component name was deleted, so there's nothing else to do + if (!init.name) { + return; + } + // Build an initialization handler + var handler = $.proxy(function() { + this[init.name].apply(this, init.args); + }, $(this)); + if (init.resources.length) { + _onload(init.resources, handler); + } else { + handler(); } } - function _unique(arr) { - var uniqueArr = []; - for (var i = arr.length; i--;) { - var val = arr[i]; - if ($.inArray(val, uniqueArr) === -1) { - uniqueArr.unshift(val); + /** + * Define init-data from an element, + * if JSON is not well-formed then evaluate init-data by manually + * @param {Element} elem + * @return {Object} + * @private + */ + function _getInitData(elem) { + /*jshint evil:true*/ + var inits = $(elem).data('mage-init') || {}; + // in case it's not well-formed JSON inside data attribute, evaluate it manually + if (typeof inits === 'string') { + try { + inits = eval('(' + inits + ')'); + } catch (e) { + inits = {}; } } - return uniqueArr; + return inits; } - function _asyncLoad() { - var x, s, i; - head.js.apply({}, _unique(_asyncQueue)); - x = document.getElementsByTagName('script')[0]; - for (i = 0; i < _cssQueue.length; i++) { - s = document.createElement('link'); - s.type = 'text/css'; - s.rel = 'stylesheet'; - s.href = _cssQueue[i]; - x.parentNode.appendChild(s); - } + /** + * Find all elements with data attribute and initialize them + * @param {Element} elem - context + * @private + */ + function _init(elem) { + $(elem).add('[data-mage-init]', elem).mage(); } - function _loadScript() { - if (_syncQueue.length === 0) { - _asyncLoad(); - return; + $.extend($.mage, { + /** + * Handle all components declared via data attribute + * @return {Object} $.mage + */ + init: function() { + _init(document); + /** + * Init components inside of dynamically updated elements + */ + $('body').on('contentUpdated', function(e) { + _init(e.target); + }); + return this; + }, + + /** + * Declare a new component based on already declared one in the mage widget + * @param {string} component - name of a new component + * (can be the same as a name of super component) + * @param {string} from - name of super component + * @param {(undefined|Object|Array)} resources - list of resources + * @return {Object} $.mage + */ + extend: function(component, from, resources) { + resources = $.merge( + (_resources[from] || []).slice(), + $.makeArray(resources) + ); + this.component(component, resources); + return this; + }, + + /** + * Declare a new component or several components at a time in the mage widget + * @param {(string|Object)} component - name of component + * or several componets with lists of required resources + * {component1: {Array}, component2: {Array}} + * @param {(string|Array)} resources - URL of one resource or list of URLs + * @return {Object} $.mage + */ + component: function(component) { + if ($.isPlainObject(component)) { + $.extend(_resources, component); + } else if (typeof component === 'string' && arguments[1]) { + _resources[component] = $.makeArray(arguments[1]); + } + return this; + }, + + /** + * Helper allows easily bind handler with component's initialisation + * @param {string} component - name of a component + * which initialization shold be customized + * @param {(string|Function)} selector [optional]- filter of component's elements + * or a handler function if selector is not defined + * @param {Function} handler - handler function + * @return {Object} $.mage + */ + onInit: function(component, selector, handler) { + if (!handler) { + handler = selector; + selector = null; + } + $(this).on(component + 'init', function(e, init) { + if (!selector || $(e.target).is(selector)) { + handler.apply(init, init.args); + } + }); + return this; + }, + + /** + * Load all resource for certain component or several components + * @param {string} component - name of a component + * (several components may be passed also as separate arguments) + * @return {Object} $.mage + */ + load: function() { + $.each(arguments, function(i, component) { + if (_resources[component] && _resources[component].length) { + head.js.apply(head, _resources[component]); + } + }); + return this; } - _syncQueue = _unique(_syncQueue); - _syncQueue.push(_asyncLoad); - head.js.apply({}, _syncQueue); - } + }); +})(jQuery); +(function($) { + "use strict"; $.extend(true, $, { mage: { - language: { - cookieKey: 'language', - en: 'en', - code: 'en' - }, - - event: (function() { - this.trigger = function (customEvent, data) { - $(document).triggerHandler(customEvent.toString(), data); - }; - this.observe = function (customEvent, func) { - $(document).on(customEvent.toString(), func); - }; - this.removeObserver = function (customEvent, func) { - $(document).unbind(customEvent, func); - }; - return this; - }()), - constant: { KEY_BACKSPACE: 8, KEY_TAB: 9, @@ -108,33 +246,7 @@ KEY_END: 35, KEY_PAGEUP: 33, KEY_PAGEDOWN: 34 - }, - - load: (function() { - this.jsSync = function () { - _addToQueue(arguments, _syncQueue); - return _syncQueue.length; - }; - this.js = function () { - _addToQueue(arguments, _asyncQueue); - return _asyncQueue.length; - }; - this.css = function () { - _addToQueue(arguments, _cssQueue); - return _cssQueue.length; - }; - this.language = function (lang, jsMapping) { - var language = $.mage.language.code = lang; - if (language != null && language !== $.mage.language.en) { - _addToQueue(jsMapping.localize, _syncQueue); - } - return _syncQueue.length; - }; - return this; - }()) + } } }); - - $(window).on('load', _loadScript); - -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/pub/lib/mage/validation.js b/pub/lib/mage/validation.js index 2518c83d11cdf671b8815abebb7ac96b7731d869..8906c55a4afdca9d3d722b40256510b7d41de4cf 100644 --- a/pub/lib/mage/validation.js +++ b/pub/lib/mage/validation.js @@ -24,8 +24,9 @@ */ /*jshint regexdash:true eqnull:true browser:true jquery:true*/ (function ($) { + "use strict"; $.extend(true, $, { - //@TODO: Move methods 'isEmpty', 'isEmptyNoTrim', 'parseNumber' in file with utility functions + // @TODO: Move methods 'isEmpty', 'isEmptyNoTrim', 'parseNumber', 'stripHtml' in file with utility functions mage: { /** * Check if string is empty with trim @@ -63,15 +64,270 @@ value = value.replace(',', '.'); } return parseFloat(value); + }, + + /** + * Removes HTML tags and space characters, numbers and punctuation. + * @param value Value being stripped. + * @return {*} + */ + stripHtml: function(value) { + return value.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' ') + .replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,''); } } }); /** - * Collection of validation rules + * Collection of validation rules including rules from additional-methods.js * @type {Object} */ var rules = { + "max-words": [ + function(value, element, params) { + return this.optional(element) || $.mage.stripHtml(value).match(/\b\w+\b/g).length < params; + }, + 'Please enter {0} words or less.' + ], + "min-words": [ + function(value, element, params) { + return this.optional(element) || $.mage.stripHtml(value).match(/\b\w+\b/g).length >= params; + }, + 'Please enter at least {0} words.' + ], + "range-words": [ + function(value, element, params) { + return this.optional(element) || + $.mage.stripHtml(value).match(/\b\w+\b/g).length >= params[0] && + value.match(/bw+b/g).length < params[1]; + }, + 'Please enter between {0} and {1} words.' + ], + "letters-with-basic-punc": [ + function(value, element) { + return this.optional(element) || /^[a-z\-.,()'\"\s]+$/i.test(value); + }, + 'Letters or punctuation only please' + ], + "alphanumeric": [ + function(value, element) { + return this.optional(element) || /^\w+$/i.test(value); + }, + 'Letters, numbers, spaces or underscores only please' + ], + "letters-only": [ + function(value, element) { + return this.optional(element) || /^[a-z]+$/i.test(value); + }, + 'Letters only please' + ], + "no-whitespace": [ + function(value, element) { + return this.optional(element) || /^\S+$/i.test(value); + }, + 'No white space please' + ], + "zip-range": [ + function(value, element) { + return this.optional(element) || /^90[2-5]-\d{2}-\d{4}$/.test(value); + }, + 'Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx' + ], + "integer": [ + function(value, element) { + return this.optional(element) || /^-?\d+$/.test(value); + }, + 'A positive or negative non-decimal number please' + ], + "vinUS": [ + function(v) { + if (v.length !== 17) { + return false; + } + var i, n, d, f, cd, cdv; + var LL = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"]; + var VL = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9]; + var FL = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2]; + var rs = 0; + for (i = 0; i < 17; i++) { + f = FL[i]; + d = v.slice(i,i+1); + if (i === 8) { + cdv = d; + } + if (!isNaN(d)) { + d *= f; + } else { + for (n = 0; n < LL.length; n++) { + if (d.toUpperCase() === LL[n]) { + d = VL[n]; + d *= f; + if (isNaN(cdv) && n === 8) { + cdv = LL[n]; + } + break; + } + } + } + rs += d; + } + cd = rs % 11; + if (cd === 10) { cd = "X"; } + if (cd === cdv) { return true; } + return false; + }, + 'The specified vehicle identification number (VIN) is invalid.' + ], + "dateITA": [ + function(value, element) { + var check = false; + var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/; + if (re.test(value)) { + var adata = value.split('/'); + var gg = parseInt(adata[0], 10); + var mm = parseInt(adata[1], 10); + var aaaa = parseInt(adata[2], 10); + var xdata = new Date(aaaa, mm-1, gg); + if ((xdata.getFullYear() === aaaa) && + (xdata.getMonth() === mm - 1) && (xdata.getDate() === gg )) { + check = true; + } else { + check = false; + } + } else { + check = false; + } + return this.optional(element) || check; + }, + 'Please enter a correct date' + ], + "dateNL": [ + function(value, element) { + return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value); + }, + 'Vul hier een geldige datum in.' + ], + "time": [ + function(value, element) { + return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(value); + }, + 'Please enter a valid time, between 00:00 and 23:59' + ], + "time12h": [ + function(value, element) { + return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(value); + }, + 'Please enter a valid time, between 00:00 am and 12:00 pm' + ], + "phoneUS": [ + function(phone_number, element) { + phone_number = phone_number.replace(/\s+/g, ""); + return this.optional(element) || phone_number.length > 9 && + phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/); + }, + 'Please specify a valid phone number' + ], + "phoneUK": [ + function(phone_number, element) { + return this.optional(element) || phone_number.length > 9 && + phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/); + }, + 'Please specify a valid phone number' + ], + "mobileUK": [ + function(phone_number, element) { + return this.optional(element) || phone_number.length > 9 && + phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/); + }, + 'Please specify a valid mobile number' + ], + "stripped-min-length": [ + function(value, element, param) { + return jQuery(value).text().length >= param; + }, + 'Please enter at least {0} characters' + ], + "email2": [ + function(value, element) { + return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); + }, + jQuery.validator.messages.email + ], + "url2": [ + function(value, element) { + return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); + }, + jQuery.validator.messages.url + ], + "credit-card-types": [ + function(value, element, param) { + if (/[^0-9-]+/.test(value)) { + return false; + } + value = value.replace(/\D/g, ""); + + var validTypes = 0x0000; + + if (param.mastercard) { validTypes |= 0x0001; } + if (param.visa) { validTypes |= 0x0002; } + if (param.amex) { validTypes |= 0x0004; } + if (param.dinersclub) { validTypes |= 0x0008; } + if (param.enroute) { validTypes |= 0x0010; } + if (param.discover) { validTypes |= 0x0020; } + if (param.jcb) { validTypes |= 0x0040; } + if (param.unknown) { validTypes |= 0x0080; } + if (param.all) { + validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080; + } + if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard + return value.length === 16; + } + if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa + return value.length === 16; + } + if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex + return value.length === 15; + } + if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub + return value.length === 14; + } + if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute + return value.length === 15; + } + if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover + return value.length === 16; + } + if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb + return value.length === 16; + } + if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb + return value.length === 15; + } + if (validTypes & 0x0080) { //unknown + return true; + } + return false; + }, + 'Please enter a valid credit card number.' + ], + "ipv4": [ + function(value, element) { + return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value); + }, + 'Please enter a valid IP v4 address.' + ], + "ipv6": [ + function(value, element) { + return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value); + }, + 'Please enter a valid IP v6 address.' + ], + "pattern": [ + function(value, element, param) { + return this.optional(element) || param.test(value); + }, + 'Invalid format.' + ], "allow-container-className": [ function(element) { if (element.type === 'radio' || element.type === 'checkbox') { @@ -92,8 +348,10 @@ }, 'Please select an option' ], - "is-empty": [ - $.mage.isEmpty, + "validate-no-empty": [ + function(value) { + return !$.mage.isEmpty(value); + }, 'Empty Value' ], "validate-alphanum-with-spaces": [ @@ -252,6 +510,18 @@ }, 'Please select one of the above options.' ], + // validate-not-negative-number should be replaced in all places with this one and then removed + "validate-zero-or-greater": [ + function(v) { + if ($.mage.isEmptyNoTrim(v)) { + return true; + } + v = $.mage.parseNumber(v); + return !isNaN(v) && v >= 0; + + }, + 'Please enter a number 0 or greater in this field.' + ], "validate-greater-than-zero": [ function(v) { if ($.mage.isEmptyNoTrim(v)) { @@ -531,6 +801,72 @@ return !element.hasClass('validate-ajax-error'); }, '' + ], + "validate-optional-datetime": [ + function(v, elm, param) { + var dateTimeParts =$('.datetime-picker[id^="options_' + param + '"]'), + hasWithValue = false, hasWithNoValue = false, + pattern = /day_part$/i; + for (var i=0; i < dateTimeParts.length; i++) { + if (! pattern.test($(dateTimeParts[i]).attr('id'))) { + if ($(dateTimeParts[i]).val() === "") { + hasWithValue = true; + } else { + hasWithNoValue = true; + } + } + } + return hasWithValue ^ hasWithNoValue; + }, + 'Field is not complete' + ], + "validate-required-datetime": [ + function(v, elm, param) { + var dateTimeParts = $('.datetime-picker[id^="options_' + param + '"]'); + for (var i = 0; i < dateTimeParts.length; i++) { + if (dateTimeParts[i].value === "") { + return false; + } + } + return true; + }, + 'This field is required' + ], + "validate-one-required-by-name": [ + function (v,elm) { + var result = false; + $('input[name="' + elm.name.replace(/([\\"])/g, '\\$1') + '"]:checked').each(function() { + if($.inArray($(this).prop('type'), ['checkbox', 'radio']) >= 0) { + result = true; + } + }); + return result; + }, + 'Please select one of the options.' + ], + "less-than-equals-to": [ + function(value, element, params) { + if ($.isNumeric($(params).val()) && $.isNumeric(value)) { + this.lteToVal = $(params).val(); + return value <= $(params).val(); + } + return true; + }, + function() { + return $.mage.__('Please enter a value less than or equal to %s').replace('%s', this.lteToVal); + } + ], + "greater-than-equals-to": [ + function(value, element, params) { + if ($.isNumeric($(params).val()) && $.isNumeric(value)) { + this.gteToVal = $(params).val(); + return value >= $(params).val(); + } + return true; + }, + function() { + return $.mage.__('Please enter a value greater than or equal to %s').replace('%s', this.gteToVal); + } ] }; @@ -545,6 +881,11 @@ required: true }); + if ($.metadata) { + // Setting the type as html5 to enable data-validate attribute + $.metadata.setType("html5"); + } + var showLabel = $.validator.prototype.showLabel; $.extend(true, $.validator.prototype, { showLabel: function(element, message) { @@ -566,7 +907,7 @@ * Validation creation * @protected */ - _create: function(){ + _create: function() { this.validate = this.element.validate(this.options); } }); @@ -576,8 +917,7 @@ Not implemented ==================== validate-both-passwords - validate-one-required-by-name validate-new-password validate-cc-number - */ +*/ diff --git a/pub/lib/mage/validation/dob-rule.js b/pub/lib/mage/validation/dob-rule.js new file mode 100644 index 0000000000000000000000000000000000000000..73eeaedba1885e03080f807ceeabd4a641226634 --- /dev/null +++ b/pub/lib/mage/validation/dob-rule.js @@ -0,0 +1,69 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category validation - dob rule + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true*/ +(function($) { + "use strict"; + $.validator.addMethod( + 'validate-dob', + function (val, element, params) { + $('.customer-dob').find('.' + this.settings.errorClass).removeClass(this.settings.errorClass); + var dayVal = $(params[0]).find('input:text').val(), + monthVal = $(params[1]).find('input:text').val(), + yearVal = $(params[2]).find('input:text').val(); + if (params[3] && dayVal.length + monthVal.length + yearVal.length === 0) { + this.dobErrorMessage = 'This is a required field.'; + return false; + } + var day = parseInt(dayVal, 10) || 0, + month = parseInt(monthVal, 10) || 0, + year = parseInt(yearVal, 10) || 0, + curYear = (new Date()).getFullYear(); + if (!day || !month || !year) { + this.dobErrorMessage = 'Please enter a valid full date.'; + return false; + } + if (month < 1 || month > 12) { + this.dobErrorMessage = 'Please enter a valid month (1-12).'; + return false; + } + if (year < 1900 || year > curYear) { + this.dobErrorMessage = $.mage.__('Please enter a valid year (1900-%d).').replace('%d', curYear); + return false; + } + var validateDayInMonth = new Date(year, month, 0).getDate(); + if (day < 1 || day > validateDayInMonth) { + this.dobErrorMessage = $.mage.__('Please enter a valid day (1-%d).').replace('%d', validateDayInMonth); + return false; + } + day = day % 10 === day ? '0' + day : day; + month = month % 10 === month ? '0' + month : month; + $(element).val(month + '/' + day + '/' + year); + return true; + }, + function(){ + return this.dobErrorMessage; + } + ); +})(jQuery); diff --git a/pub/lib/mage/validation/validate.js b/pub/lib/mage/validation/validate.js deleted file mode 100644 index e455931f7c4cffc38bfa6271b474f8031b55e905..0000000000000000000000000000000000000000 --- a/pub/lib/mage/validation/validate.js +++ /dev/null @@ -1,269 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category validation - * @package mage - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -/*jshint regexdash:true eqnull:true browser:true jquery:true*/ -(function ($) { - $.validator.addMethod("allowContainerClassName", function (element) { - if (element.type === 'radio' || element.type === 'checkbox') { - return $(element).hasClass('change-container-classname'); - } - }, ''); - - $.validator.addMethod("validateNoHtmlTags", function (value) { - return !/<(\/)?\w+/.test(value); - }, $.mage.__('HTML tags are not allowed')); - - $.validator.addMethod("validateSelect", function (value) { - return ((value !== "none") && (value != null) && (value.length !== 0)); - }, $.mage.__('Please select an option')); - - $.validator.addMethod("isEmpty", function (value) { - return (value === '' || (value == null) || (value.length === 0) || /^\s+$/.test(value)); - }, $.mage.__('Empty Value')); - - //(function () { - function isEmpty(value) { - return (value === '' || (value == null) || (value.length === 0) || /^\s+$/.test(value)); - } - - function isEmptyNoTrim(value) { - return (value === '' || (value == null) || (value.length === 0)); - } - - function parseNumber(value) { - if (typeof value !== 'string') { - return parseFloat(value); - } - var isDot = value.indexOf('.'); - var isComa = value.indexOf(','); - if (isDot !== -1 && isComa !== -1) { - if (isComa > isDot) { - value = value.replace('.', '').replace(',', '.'); - } - else { - value = value.replace(',', ''); - } - } - else if (isComa !== -1) { - value = value.replace(',', '.'); - } - return parseFloat(value); - } - - $.validator.addMethod("validateAlphanumWithSpaces", function (v) { - return isEmptyNoTrim(v) || /^[a-zA-Z0-9 ]+$/.test(v); - }, $.mage.__('Please use only letters (a-z or A-Z), numbers (0-9) or spaces only in this field')); - - $.validator.addMethod("validateData", function (v) { - return isEmptyNoTrim(v) || /^[A-Za-z]+[A-Za-z0-9_]+$/.test(v); - }, $.mage.__('Please use only letters (a-z or A-Z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')); - - $.validator.addMethod("validateStreet", function (v) { - return isEmptyNoTrim(v) || /^[ \w]{3,}([A-Za-z]\.)?([ \w]*\#\d+)?(\r\n| )[ \w]{3,}/.test(v); - }, $.mage.__('Please use only letters (a-z or A-Z) or numbers (0-9) or spaces and # only in this field')); - - $.validator.addMethod("validatePhoneStrict", function (v) { - return isEmptyNoTrim(v) || /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/.test(v); - }, $.mage.__('Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.')); - - $.validator.addMethod("validatePhoneLax", function (v) { - return isEmptyNoTrim(v) || /^((\d[\-. ]?)?((\(\d{3}\))|\d{3}))?[\-. ]?\d{3}[\-. ]?\d{4}$/.test(v); - }, $.mage.__('Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.')); - - $.validator.addMethod("validateFax", function (v) { - return isEmptyNoTrim(v) || /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/.test(v); - }, $.mage.__('Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.')); - - $.validator.addMethod("validateEmail", function (v) { - return isEmptyNoTrim(v) || /^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(v); - }, $.mage.__('Please enter a valid email address. For example johndoe@domain.com.')); - - $.validator.addMethod("validateEmailSender", function (v) { - return isEmptyNoTrim(v) || /^[\S ]+$/.test(v); - }, $.mage.__('Please enter a valid email address. For example johndoe@domain.com.')); - - $.validator.addMethod("validatePassword", function (v) { - if (v == null) { - return false; - } - var pass = $.trim(v); - /*strip leading and trailing spaces*/ - if (0 === pass.length) { - return true; - } - /*strip leading and trailing spaces*/ - return !(pass.length > 0 && pass.length < 6); - }, $.mage.__('Please enter 6 or more characters. Leading or trailing spaces will be ignored.')); - - $.validator.addMethod("validateAdminPassword", function (v) { - if (v == null) { - return false; - } - var pass = $.trim(v); - /*strip leading and trailing spaces*/ - if (0 === pass.length) { - return true; - } - if (!(/[a-z]/i.test(v)) || !(/[0-9]/.test(v))) { - return false; - } - if (pass.length < 7) { - return false; - } - return true; - }, $.mage.__('Please enter 7 or more characters. Password should contain both numeric and alphabetic characters.')); - - $.validator.addMethod("validateUrl", function (v) { - if (isEmptyNoTrim(v)) { - return true; - } - v = (v || '').replace(/^\s+/, '').replace(/\s+$/, ''); - return (/^(http|https|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i).test(v); - - }, $.mage.__('Please enter a valid URL. Protocol is required (http://, https:// or ftp://).')); - - $.validator.addMethod("validateCleanUrl", function (v) { - return isEmptyNoTrim(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+.(com|org|net|dk|at|us|tv|info|uk|co.uk|biz|se)$)(:(\d+))?\/?/i.test(v) || /^(www)((\.[A-Z0-9][A-Z0-9_-]*)+.(com|org|net|dk|at|us|tv|info|uk|co.uk|biz|se)$)(:(\d+))?\/?/i.test(v); - - }, $.mage.__('Please enter a valid URL. For example http://www.example.com or www.example.com')); - - $.validator.addMethod("validateXmlIdentifier", function (v) { - return isEmptyNoTrim(v) || /^[A-Z][A-Z0-9_\/-]*$/i.test(v); - - }, $.mage.__('Please enter a valid URL. For example http://www.example.com or www.example.com')); - - $.validator.addMethod("validateSsn", function (v) { - return isEmptyNoTrim(v) || /^\d{3}-?\d{2}-?\d{4}$/.test(v); - - }, $.mage.__('Please enter a valid social security number. For example 123-45-6789.')); - - $.validator.addMethod("validateZip", function (v) { - return isEmptyNoTrim(v) || /(^\d{5}$)|(^\d{5}-\d{4}$)/.test(v); - - }, $.mage.__('Please enter a valid zip code. For example 90602 or 90602-1234.')); - - $.validator.addMethod("validateDateAu", function (v) { - if (isEmptyNoTrim(v)) return true; - var regex = /^(\d{2})\/(\d{2})\/(\d{4})$/; - if (isEmpty(v) || !regex.test(v)) return false; - var d = new Date(v.replace(regex, '$2/$1/$3')); - return ( parseInt(RegExp.$2, 10) === (1 + d.getMonth()) ) && - (parseInt(RegExp.$1, 10) === d.getDate()) && - (parseInt(RegExp.$3, 10) === d.getFullYear() ); - - }, $.mage.__('Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.')); - - $.validator.addMethod("validateCurrencyDollar", function (v) { - return isEmptyNoTrim(v) || /^\$?\-?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}\d*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/.test(v); - - }, $.mage.__('Please enter a valid $ amount. For example $100.00.')); - - $.validator.addMethod("validateNotNegativeNumber", function (v) { - if (isEmptyNoTrim(v)) { - return true; - } - v = parseNumber(v); - return !isNaN(v) && v >= 0; - - }, $.mage.__('Please select one of the above options.')); - - $.validator.addMethod("validateGreaterThanZero", function (v) { - if (isEmptyNoTrim(v)) { - return true; - } - v = parseNumber(v); - return !isNaN(v) && v > 0; - }, $.mage.__('Please enter a number greater than 0 in this field')); - - $.validator.addMethod("validateCssLength", function (v) { - if (isEmptyNoTrim(v)) { - return true; - } - v = parseNumber(v); - return !isNaN(v) && v > 0; - }, $.mage.__("Please enter a number greater than 0 in this field")); - // })($); - - $.extend($.validator.messages, { - required: $.mage.__("This is a required field."), - remote: $.mage.__("Please fix this field."), - email: $.mage.__("Please enter a valid email address."), - url: $.mage.__("Please enter a valid URL."), - date: $.mage.__("Please enter a valid date."), - dateISO: $.mage.__("Please enter a valid date (ISO)."), - number: $.mage.__("Please enter a valid number."), - digits: $.mage.__("Please enter only digits."), - creditcard: $.mage.__("Please enter a valid credit card number."), - equalTo: $.mage.__("Please make sure your passwords match."), - accept: $.mage.__("Please enter a value with a valid extension."), - maxlength: $.validator.format($.mage.__("Please enter no more than {0} characters.")), - minlength: $.validator.format($.mage.__("Please enter at least {0} characters.")), - rangelength: $.validator.format($.mage.__("Please enter a value between {0} and {1} characters long.")), - range: $.validator.format($.mage.__("Please enter a value between {0} and {1}.")), - max: $.validator.format($.mage.__("Please enter a value less than or equal to {0}.")), - min: $.validator.format($.mage.__("Please enter a value greater than or equal to {0}.")) - }); - -// Setting the type as html5 to enable data-validate - $.metadata.setType("html5"); - - /* - $ plugin for validator - eg:$("#formId").mage().validate() - */ - $.fn.mage = function () { - var jq = this; - return { - validate: function (options) { - var defaultOptions = $.extend({ - meta: "validate", - onfocusout: false, - onkeyup: false, - onclick: false, - ignoreTitle: true, - errorClass: 'mage-error', - errorElement: 'div' - }, options); - return jq.each(function () { - $(this).validate(defaultOptions); - $(this).mageEventFormValidate(); - }); - } - }; - }; - -})(jQuery); - -/** - Not implemented - ==================== - validate-date-range - validate-both-passwords - validate-one-required - validate-one-required-by-name - validate-state - validate-new-password - validate-cc-number - */ - diff --git a/pub/lib/mage/validation/validation.js b/pub/lib/mage/validation/validation.js new file mode 100644 index 0000000000000000000000000000000000000000..f7a8aebe21abab18eba10566ddf978bc8a2e40d0 --- /dev/null +++ b/pub/lib/mage/validation/validation.js @@ -0,0 +1,106 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category validation + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true*/ +(function($) { + "use strict"; + + /** + * Validation rule for grouped product, with multiple qty fields, + * only one qty needs to have a positive integer + */ + $.validator.addMethod( + "validate-grouped-qty", + function(value, element, params) { + var result = false; + var total = 0; + $(params).find('input[data-validate*="validate-grouped-qty"]').each(function(i, e) { + var val = $(e).val(); + if (val && val.length > 0) { + result = true; + var valInt = parseInt(val, 10) || 0; + if (valInt >= 0) { + total += valInt; + } else { + result = false; + return result; + } + } + }); + return result && total > 0; + }, + 'Please specify the quantity of product(s).' + ); + + $.validator.addMethod( + "validate-one-checkbox-required-by-name", + function(value, element, params) { + var checkedCount = 0; + if (element.type === 'checkbox') { + $('[name="' + element.name + '"]').each(function() { + if ($(this).is(':checked')) { + checkedCount += 1; + return false; + } + }); + } + var container = '#' + params; + if (checkedCount > 0) { + $(container).removeClass('validation-failed'); + $(container).addClass('validation-passed'); + return true; + } else { + $(container).addClass('validation-failed'); + $(container).removeClass('validation-passed'); + return false; + } + }, + 'Please select one of the options.' + ); + + $.widget("mage.validation", $.mage.validation, { + /** + * Check if form pass validation rules without submit + * @return boolean + */ + isValid: function() { + return this.element.valid(); + }, + + /** + * Remove validation error messages + */ + clearError: function() { + if (arguments.length) { + $.each(arguments, $.proxy(function(index, item) { + this.element.find(item).removeClass(this.options.errorClass) + .siblings(this.options.errorElement + '.' + this.options.errorClass).remove(); + }, this)); + } else { + this.element.find(this.options.errorElement + '.' + this.options.errorClass).remove().end() + .find('.' + this.options.errorClass).removeClass(this.options.errorClass); + } + } + }); +})(jQuery); diff --git a/pub/lib/varien/js.js b/pub/lib/varien/js.js index c706f21e8960a1b8303a7b9d161c58a4f5488718..6e0b31dcbdb336343f2f8a153118550cef944673 100644 --- a/pub/lib/varien/js.js +++ b/pub/lib/varien/js.js @@ -370,7 +370,11 @@ Varien.searchForm.prototype = { this.form.submit(); } } - +/* Varien.Tabs is depricated. + IK: 12/17/12 + Only one usage left in /app/code/core/Mage/Install/view/install/download.phtml - Questionable becuase that page does not have the markup using CSS class "tabs" + Need further investigation + */ Varien.Tabs = Class.create(); Varien.Tabs.prototype = { initialize: function(selector) {