Beispiel #1
0
    /**
     * Add javascripts and show the list of undergoing craftings.
     *
     * @return void
     */
    public function process()
    {
        $this->getTemplate()->loadJs('jquery.blueprint');
        $this->getTemplate()->loadJs('showCrafting');
        $this->getTemplate()->loadJs('jquery.addTalentPoints');
        $this->getTemplate()->loadJsReadyScript('
			$(document).tooltip({
				content: function () {
					$(this).addClass("tooltip");
					return $(this).attr("title").replace(/(?:\\r\\n|\\r|\\n)/g, "<br />");
				}
			});
			$(".addTalentPoints").addTalentPoints();
		');
        $craftingsList = \Listing\Craftings::loadList(true);
        $this->getTemplate()->assign('craftings', $craftingsList);
    }
Beispiel #2
0
    /**
     * Add javascripts, handle the removing of craftings and show the list of undergoing and done
     * craftings.
     *
     * @return void
     */
    public function process()
    {
        $this->getTemplate()->loadJs('addCrafting');
        $this->getTemplate()->loadJs('jquery.blueprint');
        $this->getTemplate()->loadJs('showCrafting');
        $this->getTemplate()->loadJs('jquery.addTalentPoints');
        $this->getTemplate()->loadJsReadyScript('
			$(document).tooltip({
				content: function () {
					$(this).addClass("tooltip");
					return $(this).attr("title").replace(/(?:\\r\\n|\\r|\\n)/g, "<br />");
				}
			});
			$(".addTalentPoints").addTalentPoints();
		');
        $craftingsList = \Listing\Craftings::loadList();
        if ($_GET['remove']) {
            $this->removeCrafting($craftingsList->getById($_GET['remove']));
        }
        $this->getTemplate()->assign('blueprints', \Listing\Blueprints::loadList());
        $this->getTemplate()->assign('characters', \Listing\Characters::loadList());
        $this->getTemplate()->assign('craftings', $craftingsList);
    }