- createLink('file', 'uploadImages', 'module=story¶ms=' . helper::safe64Encode("productID=$productID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?>
- pasteText, "data-toggle='myModal'", 'btn btn-primary')?>
-
+
+
story->batchCreate;?>
+
+ createLink('custom', 'ajaxSaveCustomFields', 'module=story§ion=custom&key=batchCreateFields')?>
+
+ config->story->create->requiredFields) as $field)
+ {
+ if($field)
+ {
+ $requiredFields[$field] = '';
+ if(strpos(",{$config->story->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
+ }
+ }
+ if($this->story->checkForceReview()) unset($visibleFields['review']);
+ ?>
+
-
+$(function()
{
- if($field) $visibleFields[$field] = '';
-}
-if($this->story->checkForceReview()) unset($visibleFields['review']);
-?>
-
-createLink('custom', 'ajaxSaveCustomFields', 'module=story§ion=custom&key=batchCreateFields')?>
-
+ $('#batchCreateForm').batchActionForm(
+ {
+ colorPicker:
+ {
+ updateBtn: function(color, $btn)
+ {
+ $btn.find('.color-bar').css('background', color || '');
+ }
+ },
+ rowCreator: function($row, index)
+ {
+ $row.find('select').each(function()
+ {
+ var $select = $(this);
+ if(index == 0) $select.find("option[value='ditto']").remove();
+ if(index > 0) $select.val('ditto');
+ $select.chosen(defaultChosenOptions);
+ setTimeout(function()
+ {
+ $select.next('.chosen-container').find('.chosen-drop').width($select.closest('td').width() + 50);
+ }, 200);
+ });
+ }
+ });
+});
+