|
608 | 608 | ]]></clientCallback>
|
609 | 609 | </processing>
|
610 | 610 | </action>
|
| 611 | + <action name="display_enterprise"> |
| 612 | + <gui text="ajxp_conf.120" title="ajxp_conf.121" iconClass="icon-lightbulb" src="download_manager.png" hasAccessKey="false"> |
| 613 | + <context selection="false" dir="false" recycle="hidden" behaviour="hidden" |
| 614 | + actionBar="false" contextMenu="false" infoPanel="false" inZip="false"> |
| 615 | + </context> |
| 616 | + </gui> |
| 617 | + <processing> |
| 618 | + <clientCallback prepareModal="false" dialogOpenForm="enterprise_advertise_block" dialogOkButtonOnly="true" dialogSkipButtons="false"> |
| 619 | + <dialogOnOpen><![CDATA[ |
| 620 | + var lang = "en"; |
| 621 | + if(pydio && pydio.currentLanguage === "fr") lang = "fr"; |
| 622 | + else if(pydio && pydio.currentLanguage === "de") lang = "de"; |
| 623 | + $(oForm).down("iframe").src = "https://pydio.com/"+lang+"/switch-pydio-enterprise"; |
| 624 | + pydio.Controller.DISPLAY_ENTERPRISE_PING = true; |
| 625 | + ]]></dialogOnOpen> |
| 626 | + <dialogOnComplete hideDialog="true"><![CDATA[]]></dialogOnComplete> |
| 627 | + </clientCallback> |
| 628 | + <clientForm id="enterprise_advertise_block"><![CDATA[ |
| 629 | + <div id="enterprise_advertise_block" box_width="70%" box_padding="0" box_height="80%" box_resize="true" style="height:100%;" class="vertical_layout"> |
| 630 | + <iframe style="width: 100%; height: 90%; border: 0px solid #ddd;" class="vertical_fit"></iframe> |
| 631 | + <div style="padding:20px;"> </div> |
| 632 | + </div> |
| 633 | + ]]></clientForm> |
| 634 | + <clientListener name="init"><![CDATA[ |
| 635 | + var conn = new Connexion(); |
| 636 | + conn.addParameter("get_action", "display_enterprise"); |
| 637 | + conn.onComplete = function(transport){ |
| 638 | + var response = transport.responseJSON; |
| 639 | + if(response && response.display){ |
| 640 | + pydio.Controller.fireAction("display_enterprise"); |
| 641 | + }else if(response && !response.display){ |
| 642 | + pydio.Controller.DISPLAY_ENTERPRISE_PING = true; |
| 643 | + } |
| 644 | + }; |
| 645 | + window.setTimeout(function(){ |
| 646 | + if(!pydio.Controller.DISPLAY_ENTERPRISE_PING){ |
| 647 | + conn.sendAsync(); |
| 648 | + } |
| 649 | + }, 5000); |
| 650 | + ]]></clientListener> |
| 651 | + <serverCallback methodName="displayEnterprise"/> |
| 652 | + </processing> |
| 653 | + </action> |
611 | 654 | <action name="share_react" forbidOverride="true"></action>
|
612 | 655 |
|
613 | 656 | </actions>
|
|
0 commit comments