Package org.olat.core.gui.components.htmlheader.jscss

Examples of org.olat.core.gui.components.htmlheader.jscss.JSAndCSSComponent


   
    boolean ajaxOn = getWindowControl().getWindowBackOffice().getWindowManager().isAjaxEnabled();
    chatContent.contextPut("isAjaxMode", Boolean.valueOf(ajaxOn));
   
    //  checks with the given intervall if dirty components are available to rerender
    jsc = new JSAndCSSComponent("intervall", this.getClass(), null, null, false, null, InstantMessagingModule.getIDLE_POLLTIME());
    main.put("updatecontrol", jsc);
   
    // configure new message sound
    newMsgIcon.contextPut("iconsHolder", showNewMessageHolder);
   
View Full Code Here


    }
    vcDisplay.put("displayer", controller.getInitialComponent());

    // Add html header with css definitions to this velocity container
    if (previewBackground) {
      JSAndCSSComponent jsAndCss = new JSAndCSSComponent("previewcss", this.getClass(), null, "olat-preview.css", true);
      vcDisplay.put("previewcss", jsAndCss);
    }

    setInitialComponent(vcDisplay);
  }
View Full Code Here

    // display image via css
    // - put the image under _static/css/img
    // - put the css file under _static/css
    // - add to css file: .your_css_class { background: url(img/your_image.png) }
    // - add to your velocity-template: <div class="your_css_class"></div>
    JSAndCSSComponent demoext = new JSAndCSSComponent("demoext", this.getClass(), null, "demoext.css", true);
    startPage.put("demoext", demoext);
   
    // our velocity contrainer will be the first component to display
    // when somebody decieds to render the GUI of this controller.
    helloWorldPanel.setContent(startPage);
View Full Code Here

    wikiEditForm = new WikiEditArticleForm("wikieditform", getTranslator(), page);
    wikiEditForm.addListener(this);
    editContent.contextPut("editformid", "ofo_"+wikiEditForm.hashCode());

    editContent.put("editForm", wikiEditForm);
    JSAndCSSComponent js = new JSAndCSSComponent("js", this.getClass(), new String[] { "wiki-script.js" }, null, false);
    content.put("js", js);
    // FIXME:gs:a FileUploadCtr should accept vfsContainers instead of
    // OLATrootfolderimpl. Refactor it!!!!!!!
    fileUplCtr = new FileUploadController(getWindowControl(), WikiManager.getInstance().getMediaFolder(ores), ureq, (int)FolderConfig.getLimitULKB(), Quota.UNLIMITED, null, false);
    fileUplCtr.addControllerListener(this);
View Full Code Here

    super(ureq, wControl);
    mainVc = createVelocityContainer("cssjsdemo");
   
    // the first demo has a css (which must be removed if not used) and a js lib
    modalVc1 = createVelocityContainer("modal1");
    JSAndCSSComponent jscss1 = new JSAndCSSComponent("jsAndCssForDemo", this.getClass(), new String[]{"js1.js","js1b.js"}, "style1.css", true);
    modalVc1.put("jsAndCssForDemo", jscss1); // we attach it to the modalComponent, so that it is activated when this component shows up on screen.     

    // the second demo has a css (which is not removed even if not used anymore) and a js lib
    modalVc2 = createVelocityContainer("modal2");
    JSAndCSSComponent jscss2 = new JSAndCSSComponent("jsAndCssForDemo", this.getClass(), new String[]{"js2.js","js2b.js"}, "style2.css", false);
    modalVc2.put("jsAndCssForDemo", jscss2); // we attach it to the modalComponent, so that it is activated when this component shows up on screen.     
   
    // js functions override test
    linkjs1 = LinkFactory.createButtonSmall("link.js1", mainVc, this);
    jsVc1 = createVelocityContainer("jstest1");
    JSAndCSSComponent jstest1 = new JSAndCSSComponent("jstest1includes", this.getClass(), new String[]{"jsfuncdef1.js"}, null, false);
    jsVc1.put("jstest1includes", jstest1);
   
    linkjs2 = LinkFactory.createButtonSmall("link.js2", mainVc, this);
    jsVc2 = createVelocityContainer("jstest2");
    JSAndCSSComponent jstest2 = new JSAndCSSComponent("jstest1includes", this.getClass(), new String[]{"jsfuncdef2.js"}, null, false);
    jsVc2.put("jstest2includes", jstest2);
   
    jsTestP = new Panel("jstestP");
    mainVc.put("jstestpanel", jsTestP);
   
View Full Code Here

      StringBuilder sb = new StringBuilder();
      // must be like <script type="text/javascript" src="/olat/secstatic/qti/74579818809617/_unzipped_/fibautocompl.js"></script>
      sb.append("<script type=\"text/javascript\" src=\"").append(autcompResolver.getStaticsBaseURI()).append("/").append(ImsRepositoryResolver.QTI_FIB_AUTOCOMPLETE_JS_FILE).append("\"></script>\n");
      // must be like <link rel="StyleSheet" href="/olat/secstatic/qti/74579818809617/_unzipped_/fibautocompl.css" type="text/css" media="screen, print">
      sb.append("<link rel=\"StyleSheet\" href=\"").append(autcompResolver.getStaticsBaseURI()).append("/").append(ImsRepositoryResolver.QTI_FIB_AUTOCOMPLETE_CSS_FILE).append("\" type=\"text/css\" media=\"screen\" >\n");
      JSAndCSSComponent autoCompleteJsCss = new JSAndCSSComponent("auto_complete_js_css", this.getClass(), null, null, true, sb.toString());
      myContent.put("autoCompleteJsCss", autoCompleteJsCss);
    }
    closeButton = LinkFactory.createButton("close", myContent, this);
   
    qtiscoreprogress = new ProgressBar("qtiscoreprogress", 150, 0, 0, "");
View Full Code Here

    sepValInForm = new SeparatedValueInputForm("sepvalin", trans);
    sepValInForm.addListener(this);
    wc.setWizardTitle(trans.translate("wizard.step1.title"));
    wc.setNextWizardStep(trans.translate("wizard.step1.howto"), sepValInForm);
    sepValVC.put("wc", wc.getInitialComponent());
    JSAndCSSComponent xls_eg = new JSAndCSSComponent("xls_eg", this.getClass(), null, "xls_eg.css", true);
    sepValVC.put("xls_eg", xls_eg);
    setInitialComponent(sepValVC);
  }
View Full Code Here

        if (statisticUpdateManager==null) {
          log_.info("event: UpdateStatisticsJob configured, but no StatisticManager available");
        } else {
          statisticUpdateManager.updateStatistics(true, getUpdateFinishedCallback());
          refreshUIState();
          content.put("updatecontrol", new JSAndCSSComponent("intervall", this.getClass(), null, null, false, null, 3000));
          getInitialComponent().setDirty(true);
        }
      }
    }
  }
View Full Code Here

      if (statisticUpdateManager==null) {
        log_.info("event: UpdateStatisticsJob configured, but no StatisticManager available");
      } else {
        statisticUpdateManager.updateStatistics(false, getUpdateFinishedCallback());
        refreshUIState();
        content.put("updatecontrol", new JSAndCSSComponent("intervall", this.getClass(), null, null, false, null, 3000));
        getInitialComponent().setDirty(true);
      }
    }
  }
View Full Code Here

   
    updatePanel = new Panel("updater");
    mainVC.put("updater", updatePanel);
   
    // TODO felix -> put in a factory?
    JSAndCSSComponent jsc = new JSAndCSSComponent("intervall", this.getClass(), null, null, false, null, 2000);
    mainVC.put("updatecontrol", jsc);
   
    msgLink = LinkFactory.createButton("link.message", mainVC, this);
   
    // just a no operation link
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.htmlheader.jscss.JSAndCSSComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.