示例#1
0
            $siteMgr->setDefaultTemplate($objectID, $defaulttemplate);
            $siteMgr->setTemplateRoot($objectID, $templateroot);
            $jsQueue->add($objectID, HISTORYTYPE_SITE, 'OBJECT_CHANGE', sGuiUS(), 'site', NULL, NULL, $objectID . '-site', 'name', $name);
            $jsQueue->add($objectID, HISTORYTYPE_SITE, 'OBJECT_CHANGE', sGuiUS(), 'page', NULL, NULL, $objectID . '-site', 'name', $name);
            $jsQueue->add($objectID, HISTORYTYPE_SITE, 'OBJECT_CHANGE', sGuiUS(), 'site', NULL, NULL, $objectID . '-site', 'pname', $pname);
            // Re-sort the list
            $koala->queueScript('if (Koala.windows[Koala.windows[\'' . $wid . '\'].boundWindow].sortList) Koala.windows[Koala.windows[\'' . $wid . '\'].boundWindow].sortList();');
            $jsQueue->add($objectID, HISTORYTYPE_SITE, 'REFRESH_WINDOW', sGuiUS(), 'name');
            // Fade all green fields
            $koala->queueScript("Koala.yg_fadeFields(\$('" . $wid . "'), 'input.changed');");
            $jsQueue->add($objectID, HISTORYTYPE_SITE, 'UNHIGHLIGHT_SITE', sGuiUS(), 'name');
        }
        break;
    case 'siteSelectNode':
        $node = $this->params['node'];
        $wid = $this->params['wid'];
        $koala->callJSFunction('Koala.yg_enable', 'tree_btn_delete', 'btn-' . $wid, 'tree_btn');
        break;
    case 'siteCalcPname':
        // Get window-ID
        $winID = $data[1]['winID'];
        // Split ObjectID and SiteID
        $siteId = explode('-', $this->reponsedata['name']->yg_id);
        $siteId = $siteId[0];
        $siteInfo = $siteMgr->get($siteId);
        if (strlen(trim($siteInfo['PNAME'])) == 0) {
            $PName = $siteMgr->calcPName($siteId, '', $this->reponsedata['name']->value);
            $koala->queueScript('$(\'' . $winID . '_site_pname\').value=\'' . $PName . '\';Koala.yg_setEdited( $(\'' . $winID . '_site_pname\') );');
        }
        break;
}