<?php

namespace Modules\Admin\Config\Documents\IssueDocs;

class View_Options extends \App\Mvc\View_Window_PaginatedListing_OptionsAbstract
{
	/**
	 * (non-PHPdoc)
	 * @see \App\Mvc\View_Window_PaginatedListing_OptionsAbstract::populateDefinedOptions()
	 */
	public function populateDefinedOptions(\App\Mvc\View\Utils\RowOptions\Container\Simple $options)
	{
		$options

			// add new currency type
			->append( \App\Mvc\View\Utils\RowOptions\Option\Popup::create("insert")
				->setDescription($this->lang['index']['options']['insert'])
				->setIcon('add')
				->setSection('global')
				->setAction('insert')
				->setDimensions(650, 480)
			)

			// move up
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("moveUp")
				->setDescription($this->lang['index']['options']['moveUp'])
				->setIcon("moveUp")
				->setJsCallback("MVC.listing.installedHandlers.listing.moveUpCurrentItem(this);")
			)

			// move down
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("moveDown")
				->setDescription($this->lang['index']['options']['moveDown'])
				->setIcon("moveDown")
				->setJsCallback("MVC.listing.installedHandlers.listing.moveDownCurrentItem(this);")
			)

			// move up bulk
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("moveUp")
				->setSection('bulk')
				->setDescription($this->lang['index']['options']['moveUp'])
				->setIcon("moveUp")
				->setJsCallback("MVC.listing.installedHandlers.listing.moveUpSelected(this);")
			)

			// move down bulk
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("moveDown")
				->setSection('bulk')
				->setDescription($this->lang['index']['options']['moveDown'])
				->setIcon("moveDown")
				->setJsCallback("MVC.listing.installedHandlers.listing.moveDownSelected(this);")
			)

			// separator
			->append( \App\Mvc\View\Utils\RowOptions\Option\Separator::create('separator1') )

			// update
			->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("update")
				->setDescription($this->lang['index']['options']['update'])
				->setIcon('edit')
				->setAction('update')
				->setDimensions(650, 480)
				->setKeyForCurrentRow('id')
			)

			// delete
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("delete")
				->setDescription($this->lang['index']['options']['delete'])
				->setIcon("delete")
				->setJsCallback("MVC.listing.installedHandlers.listing.deleteCurrentItemWithConfirmation(this);")
			)

			// reset
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("reset")
				->setDescription($this->lang['index']['options']['reset'])
				->setIcon("reset")
				->setSection('global')
				->setJsCallback("MVC.listing.installedHandlers.listing.resetWithConfirmation(this);")
			)

			// save
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("save")
				->setDescription($this->lang['index']['options']['save'])
				->setIcon("save")
				->setSection('global')
				->setJsCallback("MVC.listing.installedHandlers.listing.saveWithConfirmation(this);")
			)

		;
	}

}
