我有點不知道我究竟做錯了什麼,所以希望通過把它扔到那裏,有人應該能夠指出希望顯而易見的東西給我。圖形用戶界面擴展 - 資源無法加載
正在創建一個新的GUI擴展,它將作爲Tridion功能區欄的新事件選項卡上的一個按鈕。我能得到的按鈕出現,但沒有圖標出現的按鈕,始終被禁用,這使我相信,樣式表和javascript資源的擴展不加載:S
我的編輯配置如下:
<?xml version="1.0"?>
<Configuration xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge" xmlns:cfg="http://www.sdltridion.com/2009/GUI/Configuration" xmlns:ext="http://www.sdltridion.com/2009/GUI/extensions" xmlns:cmenu="http://www.sdltridion.com/2009/GUI/extensions/ContextMenu">
<resources>
<cfg:filters/>
<cfg:groups>
<cfg:group name="Events.Cvent">
<cfg:fileset>
<cfg:file type="style">/Theme/cvent.css</cfg:file>
<cfg:file type="reference">Events.Commands.Cvent</cfg:file>
</cfg:fileset>
</cfg:group>
<cfg:group name="Events.Cvent.Commandset">
<cfg:fileset>
<cfg:file type="script">/Scripts/cvent.js</cfg:file>
</cfg:fileset>
<cfg:dependencies>
<cfg:dependency>Tridion.Web.UI.Editors.CME</cfg:dependency>
<cfg:dependency>Tridion.Web.UI.Editors.CME.commands</cfg:dependency>
</cfg:dependencies>
</cfg:group>
</cfg:groups>
</resources>
<definitionfiles/>
<extensions>
<ext:dataextenders/>
<ext:editorextensions>
<ext:editorextension target="CME">
<ext:editurls/>
<ext:listdefinitions/>
<ext:taskbars/>
<ext:commands/>
<ext:commandextensions/>
<ext:contextmenus/>
<ext:lists/>
<ext:tabpages/>
<ext:toolbars/>
<ext:ribbontoolbars>
<ext:add>
<ext:extension assignid="EventsPage" name="Events">
<ext:control/>
<ext:pagetype/>
<ext:apply>
<ext:view name="DashboardView">
<ext:control id="DashboardToolbar"/>
</ext:view>
</ext:apply>
</ext:extension>
<ext:extension assignid="EventsAdministrationGroup" pageid="EventsPage" name="Administration">
<ext:group/>
<ext:apply>
<ext:view name="DashboardView">
<ext:control id="DashboardToolbar"/>
</ext:view>
</ext:apply>
</ext:extension>
<ext:extension assignid="CventBtn" groupid="EventsAdministrationGroup" name="Import Cvent Events" pageid="EventsPage">
<ext:command>Cvent</ext:command>
<ext:title>Import Cvent Events</ext:title>
<ext:dependencies>
<cfg:dependency>Events.Cvent</cfg:dependency>
</ext:dependencies>
<ext:apply>
<ext:view name="DashboardView">
<ext:control id="DashboardToolbar"/>
</ext:view>
</ext:apply>
</ext:extension>
</ext:add>
</ext:ribbontoolbars>
</ext:editorextension>
</ext:editorextensions>
<ext:modelextensions/>
</extensions>
<commands>
<cfg:commandset id="Events.Commands.Cvent">
<cfg:command name="Cvent" implementation="Events.Commands.OpenCvent"/>
<cfg:dependencies>
<cfg:dependency>Events.Cvent.Commandset</cfg:dependency>
</cfg:dependencies>
</cfg:commandset>
</commands>
<contextmenus/>
<localization/>
<settings>
<defaultpage/>
<editurls/>
<listdefinitions/>
<theme>
<path>/Theme/</path>
</theme>
<customconfiguration>
<clientconfiguration xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge">
<Cventurl xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge">/Cvent/Cvent.aspx</Cventurl>
</clientconfiguration>
</customconfiguration>
</settings>
</Configuration>
我需要的所有資源文件(javascript和css)都在根據配置的目錄中。我的用於圖形用戶界面的JS如下所示:
Type.registerNamespace("Events.Commands");
Events.Commands.OpenCvent = function Commands$OpenCvent(name)
{
Type.enableInterface(this, "Events.Commands.OpenCvent");
this.addInterface("Tridion.Cme.Command", ["Cvent"]);
this.properties.url;
};
Events.Commands.OpenCvent.prototype._isAvailable = function OpenCvent$_isAvailable(selection, pipeline)
{
return true;
};
Events.Commands.OpenCvent.prototype._isEnabled = function OpenCvent$_isEnabled(selection, pipeline)
{
return true;
};
Events.Commands.OpenCvent.prototype._execute = function OpenCvent$_execute(selection, pipeline)
{
window.open('www.google.com');
};
重新開始的Tridion仍然沒有,我做錯了什麼?
理查德·您好,感謝深入到社區外表套上SO上。我看到你在51區有一個帳戶,但看起來你並沒有致力於http://area51.stackexchange.com/proposals/38335/tridion?referrer=eo63snjNlUWNn9xqeeO2NA2的Tridion倡議,如果你想要成爲其中的一部分 – 2012-04-26 18:46:15
是的抱歉意味着要解決這個問題,現在就做 – 2012-04-27 08:49:09