Пример #1
0
 public function getGalleryImages()
 {
     try {
         $model = new Model_Admin_SecondaryItems();
         return Model_Admin::getSharedModelUploads($model, $this->id, 'Галерея');
     } catch (Exception $e) {
         return [];
     }
 }
Пример #2
0
?>
_load').remove();
                                                     },
                                                     afterUploadAll: function () {
                                                         $('#<?php 
echo $uid;
?>
_load').remove();
                                                         var url = "<?php 
echo AdminHREF::getDefaultAdminRouteUri('ajaxUploadsContent', $model->getShortName(), $params['primary']) . '/?directoryIndex=' . urlencode($directoryIndex);
?>
";
                                                         $.post(url, {ref: document.location.href}, function (data) {
                                                             $('#<?php 
echo $uid;
?>
_content').children().replaceWith(data);
                                                         });
                                                     },
                                                 });
        });
    </script>
    <div id="<?php 
echo $uid;
?>
_content">
        <?php 
echo View::factory('Admin/Data/Edit/Upload/List', ['files' => Model_Admin::getSharedModelUploads($model, $params['primary'], $directoryIndex), 'model' => $model, 'params' => $params, 'query' => $query, 'directoryIndex' => $directoryIndex]);
?>
    </div>
</div>
Пример #3
0
 public function getGalleryImages()
 {
     $model = new Model_Admin_MainItems();
     return Model_Admin::getSharedModelUploads($model, $this->id, 'Галерея');
 }
Пример #4
0
 public function action_ajaxUploadsContent()
 {
     if ($this->check(['isAllowed', 'isModifyingAllowed'], ['getEditData'], ['primary'], ['directoryIndex']) === true) {
         $ref = false;
         if (!empty($_POST) && !empty($_POST['ref'])) {
             $ref = $_POST['ref'];
         }
         echo View::factory('Admin/Data/Edit/Upload/List', ['files' => Model_Admin::getSharedModelUploads($this->model, $this->params['primary'], $this->query['directoryIndex']), 'model' => $this->model, 'ref' => $ref, 'directoryIndex' => $this->query['directoryIndex'], 'params' => $this->params, 'query' => $this->query]);
     }
     die;
 }