2012-04-26 22 views
7

私は間違って何をしているのか分からないので、うまくいけばそれを投げ捨てることで、誰かが私に明白に何かを明かすことができるはずです。GUI拡張 - リソースが読み込めません

Tridionリボンバーの新しい[イベント]タブにボタンとして表示される新しいGUI拡張機能が作成されています。私はボタンを表示することができますが、ボタンのアイコンは表示されず常に無効になっていますので、拡張機能のスタイルシートと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 for GUIは次のようになります:

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とまだ何も間違っていますか?

+1

こんにちはリチャード、SOにTridionのコミュニティに手を差し伸べるための感謝を。私はあなたがArea 51のアカウントを持っているのを見ていますが、http://area51.stackexchange.com/proposals/38335/tridion?referrer=eo63snjNlUWNn9xqeeO2NA2でTridionイニシアチブにコミットしていないように見えます。それの一部である –

+1

はい残念これを回避する意味は、今行うだろう –

答えて

5

ファイルが含まれているかどうかは、CMEに?mode = jsおよび?mode = cssパラメータをロードすることで確認できます。

これらのファイルが大量にキャッシュされていることを忘れないでください。構成を変更してもキャッシュが無効になるわけではありません。 System.configの@modification属性を増やす(すべてのクライアントのキャッシュを無効にする)か、ブラウザのキャッシュを手動でクリアするだけです(開発中は最も簡単です)。

これらのファイルに変更が加えられていない場合は、エディタの設定に問題がある可能性があります。 Chrisが指摘したように、ファイルには依存関係のあるものが含まれている場合にのみファイルが含まれます。トレースを有効にすると、結果のログファイル(Tridion.Web.trace)にファイルが含まれていない理由がわかります。

それを行う方法の詳細については、この記事のセクション6をチェックアウト:http://www.sdltridionworld.com/articles/sdltridion2011/tutorials/debugging_the_tridion_2011_cme.aspx

+0

あなたは伝説です....変更属性を更新すると、これまではTridionサービスとCOMコンポーネントを再起動していました –

3

拡張機能で何が間違っているかは分かりませんが、既存のGUI拡張機能(実際にはいくつかの拡張機能)を見ることができますし、あなたの間違いを比較することもできます。 PowerToolsをご覧ください。http://code.google.com/p/tridion-2011-power-tools/

http://www.sdltridionworld.comのいくつかの良い例もあります。 http://www.sdltridionworld.com/articles/sdltridion2011/tutorials/GUIextensionIn8steps.aspx

+0

私はこのガイドを使用してきた、それはこの男によって書かれたと思う、非常に良いです、彼はあまりにもhttp://の他の良い例があるようですyoavniran.wordpress.com/2011/03/03/setting-up-a-tridion-gui-2011-extension-in-8-steps/ –

1

configのcomandsetノード内で使用されて参照されていない限り、依存関係は実際にロードされないと思います。あなたの完全なeditor.configを抽出物だけではなく含めることができますか?

関連する問題