Esempio n. 1
0
 void OnLoadCompleted(System.Object sender, System.EventArgs args)
 {
     if (refreshingOnQuarterChange)
     {
         bTex.LoadingTexture       = refreshTex;
         refreshingOnQuarterChange = false;
     }
     bTex.forceShowLoadingTexture = false;
     if (IsSystemMessageDisplayed())
     {
         RefreshDelayed(BizSimScreen.refreshDelaySeconds);
     }
     else
     {
         SetupCallbacks();
         if (removeTitle || disableScrolling)
         {
             string jsCmd = "";
             if (removeTitle)
             {
                 jsCmd += "var elems = document.getElementsByTagName('h1'); if(elems != null && elems.length > 0){elems[0].style.display = 'none'}";
             }
             if (disableScrolling)
             {
                 jsCmd += "document.body.style.overflow = \"hidden\";";
             }
             bTex.ExecuteJavaScript(jsCmd);
         }
     }
 }
Esempio n. 2
0
    public static void HitDismissForGoogleDocOutOfDateWarning(CollabBrowserTexture bTex)
    {
        // click dismiss button for out of date browser
        string cmd = "var elemList = document.getElementsByClassName(\"docs-butterbar-link\"); if (elemList != null && elemList.length > 0 && elemList[0].parentNode != null && (elemList[0].parentNode.textContent.indexOf(\"out of date\") != -1 || elemList[0].parentNode.textContent.indexOf(\"supported\") != -1) && elemList[0].parentNode.parentNode != null) { elemList[0].parentNode.parentNode.removeChild(elemList[0].parentNode); }";

        bTex.ExecuteJavaScript(cmd);
    }
Esempio n. 3
0
 void OnLoadComplete(System.Object sender, System.EventArgs args)
 {
     SetupCallbacks();
     if (cmdToInjectOnLoadComplete != "")
     {
         bTex.ExecuteJavaScript(cmdToInjectOnLoadComplete);
     }
 }
Esempio n. 4
0
    public static void AutoPopulateGoogleForm(CollabBrowserTexture bTex, Dictionary <string, string> labelToValue)
    {
        string cmd = "";

        // build javascript associative map
        cmd += "var vals = " + DictionaryToJSON(labelToValue);
        cmd += @"var elems = document.getElementsByClassName(""ss-q-short"");
                for(var i = 0; i < elems.length; ++i){ 
	                var label = elems[i].getAttribute(""aria-label"").trim(); 
	                if( vals.hasOwnProperty(label) )
	                {
		                elems[i].value = vals[label];
	                }
                }";
        bTex.ExecuteJavaScript(cmd);
    }
Esempio n. 5
0
    public static void CloseTwiddlaSideNav(CollabBrowserTexture bTex)
    {
        string cmd = "if(slideNavSingleton != null){slideNavSingleton.slideClosed();}";

        bTex.ExecuteJavaScript(cmd);
    }
Esempio n. 6
0
    public static void EnterTwiddlaUserName(CollabBrowserTexture bTex, string name)
    {
        string cmd = "var gn = document.getElementById(\"guestName\"); if(gn != null){gn.value = \"" + name + "\";gn.focus();}";

        bTex.ExecuteJavaScript(cmd);
    }