Quantcast
Channel: Kodinerds.net - Deutschsprachiges Forum zum Kodi Entertainment Center
Viewing all articles
Browse latest Browse all 87137

onclick mit Condition in einem Panel (Estuary)

$
0
0
Mehrfach verwendeter Code ist eine feine Sache, das spart Platz, Lade- und Rechenzeit. Der Estuary verwendet sowas z.B. in Form eines einmal definierten Panels, welches zur Ansicht der zuletzt gesehenen Kanäle, der Aufnahmen usw. genutzt wird. Bumblebee und ich nutzen diese auch zur Anzeige der German Telecast Offers. Eigentlich eine feine Sache, wenn...

Ich bekomme es nicht hin, einen onclick mit entsprechender Condition zu formulieren. onclick (ohne condition) geht generell, auch condition="true" oder condition="false" funktioniert (oder eben auch nicht). Ich möchte den onclick aber nur auslösen, wenn eine betsimmte Bedingung erfüllt ist, die da sein könnten:

  • Panel hat die id=12350 und kann auch per Parameter an die Liste übergeben werden
  • Panel wird von einem Addon bestückt, welches ebenfalls per Parameter aus der Home.xml übergeben wird usw. usf.
Nur irgendwie funktioniert das alles nicht???

Ich habe mal den Code fürs Panel sowie die wichtigen Stellen aus der Home.xml angefügt

Includes_Home.xml:

Quellcode

  1. <include name="WidgetListChannels">
  2. <param name="item_limit">15</param>
  3. <param name="icon">$INFO[ListItem.Icon]</param>
  4. <param name="label">$INFO[ListItem.Label]</param>
  5. <param name="label2">$INFO[ListItem.Title]</param>
  6. <definition>
  7. <param name="addon">$PARAM[addon_name]</param>
  8. <include content="CategoryLabel">
  9. <param name="label">$PARAM[widget_header]</param>
  10. <param name="list_id" value="$PARAM[list_id]"/>
  11. </include>
  12. <include content="BusyListSpinner">
  13. <param name="list_id" value="$PARAM[list_id]"/>
  14. <param name="posy" value="200"/>
  15. </include>
  16. <control type="panel" id="$PARAM[list_id]">
  17. <left>0</left>
  18. <top>120</top>
  19. <right>0</right>
  20. <height>430</height>
  21. <include content="WidgetListCommon">
  22. <param name="list_id" value="$PARAM[list_id]"/>
  23. </include>
  24. <visible>Integer.IsGreater(Container($PARAM[list_id]).NumItems,0) | Container($PARAM[list_id]).IsUpdating</visible>
  25. <param name="list_id" value="$PARAM[list_id]"/>
  26. <itemlayout width="310" height="500">
  27. <control type="group">
  28. <left>70</left>
  29. <control type="image">
  30. <width>319</width>
  31. <height>340</height>
  32. <texture>dialogs/dialog-bg-nobo.png</texture>
  33. <bordertexture border="21">overlays/shadow.png</bordertexture>
  34. <bordersize>20</bordersize>
  35. </control>
  36. <control type="image">
  37. <top>43</top>
  38. <left>38</left>
  39. <width>245</width>
  40. <height>200</height>
  41. <texture fallback="DefaultTVShows.png">$PARAM[icon]</texture>
  42. <aspectratio>keep</aspectratio>
  43. </control>
  44. <control type="label">
  45. <left>42</left>
  46. <top>247</top>
  47. <width>245</width>
  48. <height>70</height>
  49. <label>$PARAM[label]</label>
  50. <font>font12</font>
  51. <shadowcolor>text_shadow</shadowcolor>
  52. <align>center</align>
  53. <aligny>top</aligny>
  54. </control>
  55. <control type="label">
  56. <left>42</left>
  57. <top>277</top>
  58. <width>245</width>
  59. <height>65</height>
  60. <label>$PARAM[label2]</label>
  61. <font>font12</font>
  62. <shadowcolor>text_shadow</shadowcolor>
  63. <align>center</align>
  64. <aligny>top</aligny>
  65. </control>
  66. <control type="image">
  67. <left>260</left>
  68. <top>30</top>
  69. <width>32</width>
  70. <height>32</height>
  71. <texture>$VAR[WallWatchedIconVar]</texture>
  72. </control>
  73. </control>
  74. </itemlayout>
  75. <focusedlayout width="310" height="500">
  76. <control type="group">
  77. <depth>DepthContentPopout</depth>
  78. <left>70</left>
  79. <animation type="Focus">
  80. <effect type="zoom" start="100" end="110" time="200" tween="sine" easing="inout" center="240,100" />
  81. </animation>
  82. <animation type="Unfocus">
  83. <effect type="zoom" start="110" end="100" time="200" tween="sine" easing="inout" center="240,100" />
  84. </animation>
  85. <control type="image">
  86. <width>319</width>
  87. <height>340</height>
  88. <texture>dialogs/dialog-bg-nobo.png</texture>
  89. <bordertexture border="21">overlays/shadow.png</bordertexture>
  90. <bordersize>20</bordersize>
  91. </control>
  92. <control type="image">
  93. <width>319</width>
  94. <height>340</height>
  95. <texture colordiffuse="button_focus">colors/grey.png</texture>
  96. <bordersize>20</bordersize>
  97. <include>Animation_FocusTextureFade</include>
  98. </control>
  99. <control type="image">
  100. <top>43</top>
  101. <left>38</left>
  102. <width>245</width>
  103. <height>200</height>
  104. <texture fallback="DefaultTVShows.png">$PARAM[icon]</texture>
  105. <aspectratio>keep</aspectratio>
  106. </control>
  107. <control type="label">
  108. <left>42</left>
  109. <top>247</top>
  110. <width>245</width>
  111. <height>70</height>
  112. <label>$PARAM[label]</label>
  113. <font>font12</font>
  114. <shadowcolor>text_shadow</shadowcolor>
  115. <align>center</align>
  116. <scroll>true</scroll>
  117. <aligny>top</aligny>
  118. </control>
  119. <control type="label">
  120. <left>42</left>
  121. <top>277</top>
  122. <width>245</width>
  123. <height>65</height>
  124. <label>$PARAM[label2]</label>
  125. <font>font12</font>
  126. <shadowcolor>text_shadow</shadowcolor>
  127. <align>center</align>
  128. <scroll>true</scroll>
  129. <aligny>top</aligny>
  130. </control>
  131. <control type="image">
  132. <left>260</left>
  133. <top>30</top>
  134. <width>32</width>
  135. <height>32</height>
  136. <texture>$VAR[WallWatchedIconVar]</texture>
  137. </control>
  138. </control>
  139. </focusedlayout>
  140. <content sortby="$PARAM[sortby]" sortorder="$PARAM[sortorder]" target="$PARAM[widget_target]" limit="$PARAM[item_limit]">$PARAM[content_path]</content>
  141. <onclick condition="String.isEqual($PARAM[addon],plugin.service.gto">RunScript(plugin.service.gto,action=infopopup&blob=$INFO[ListItem.Property(BlobID)])</onclick>
  142. <!-- <onclick>RunScript(plugin.service.gto,action=infopopup&blob=$INFO[ListItem.Property(BlobID)])</onclick> -->
  143. </control>
  144. </definition>
  145. </include>
Alles anzeigen

Home.xml


Quellcode

  1. <include content="WidgetListChannels" condition="System.HasPVRAddon + System.HasAddon(plugin.service.gto)">
  2. <param name="content_path" value="plugin://plugin.service.gto?action=getcontent&ts=$INFO[Window(Home).Property(GTO.timestamp)]"/>
  3. <param name="widget_header" value="$ADDON[plugin.service.gto 30104]: $INFO[Window(Home).Property(GTO.Provider)]"/>
  4. <param name="widget_target" value="pvr"/>
  5. <param name="list_id" value="12350"/>
  6. <param name="addon" value="plugin.service.gto"/>
  7. <param name="label" value="$INFO[ListItem.label2]$INFO[ListItem.Property(StartTime), (,)]"/>
  8. <param name="label2" value="$INFO[ListItem.label]"/>
  9. </include>
Any Hints?

Viewing all articles
Browse latest Browse all 87137


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>