Package org.olat.core.commons.modules.bc

Examples of org.olat.core.commons.modules.bc.FileUploadController


        if (mimeType != null) {
          if (!mimeTypes.contains(mimeType)) mimeTypes.add(mimeType);
        }
      }
    }
    uploadCtr = new FileUploadController(wControl, fileUploadBase, ureq,
        (int)FolderConfig.getLimitULKB(), Quota.UNLIMITED, mimeTypes, true);
    listenTo(uploadCtr);
    // set specific upload path
    uploadCtr.setUploadRelPath(uploadRelPath);
View Full Code Here


    int remainingQuotaKB = (int) quotaKB - (int) actualUsage;
    if (quotaKB == Quota.UNLIMITED) remainingQuotaKB = (int) quotaKB;
    else if (quotaKB - actualUsage < 0) remainingQuotaKB = 0;
    else remainingQuotaKB = (int) quotaKB - (int) actualUsage;
    if (fileUploadCtr != null) fileUploadCtr.dispose();
    fileUploadCtr = new FileUploadController(getWindowControl(), currentContainer, ureq, uploadLimitKB, remainingQuotaKB, null, true, showMetadata);
    listenTo(fileUploadCtr);
    mainVC.put("fileUploadCtr", fileUploadCtr.getInitialComponent());
    mainVC.contextPut("showFieldset", Boolean.TRUE);
   
    putInitialPanel(mainVC);
View Full Code Here

    mimeTypes.add("image/gif");
    mimeTypes.add("image/jpg");
    mimeTypes.add("image/jpeg");
    mimeTypes.add("image/png");
    VFSContainer uploadContainer = new LocalFolderImpl(uploadDir);
    uploadCtr = new FileUploadController(getWindowControl(), uploadContainer, ureq, this.limitKB, this.limitKB, mimeTypes, false);
    uploadCtr.hideTitleAndFieldset();
    listenTo(uploadCtr);
    folderContainer.put("uploadCtr", uploadCtr.getInitialComponent());
    putInitialPanel(folderContainer);
  }
View Full Code Here

        doFileDelivery(ureq, selectedElement.getForumKey());
      }
    } else if (source == uploadButton){
      Forum forum = forumMgr.addAForum();
      OlatRootFolderImpl forumContainer = getForumContainer(forum.getKey());
      fileUplCtr = new FileUploadController(getWindowControl(),forumContainer, ureq, (int)FolderConfig.getLimitULKB(), Quota.UNLIMITED, null, false);
      fileUplCtr.addControllerListener(this);
      recentDialogElement = new DialogElement();
      recentDialogElement.setForumKey(forum.getKey());
      recentDialogElement.setAuthor(ureq.getIdentity().getName());
      dialogPanel.setContent(fileUplCtr.getInitialComponent());
View Full Code Here

    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);
    editContent.put("fileUplCtr", fileUplCtr.getInitialComponent());
    editContent.contextPut("fileList", wiki.getMediaFileList());
    editContent.contextPut("linkList", wiki.getListOfAllPageNames());
    tabs.addTab(translate("tab.edit"), editContent);
View Full Code Here

      main.contextPut("showcancelbutton",this.showCancelButton);
     
    } else if (source == uploadButton){
      // Delegate upload process to file upload controller
      removeAsListenerAndDispose(fileUploadCtr);
      fileUploadCtr = new FileUploadController(getWindowControl(), uploadContainer, ureq,  uploadLimitKB, Quota.UNLIMITED, null, false);
      listenTo(fileUploadCtr);
      panel.setContent(fileUploadCtr.getInitialComponent());
     
    } else if (source == cancelButton){
      notifyCanceled(ureq);
View Full Code Here

    mimeTypes.add("image/jpg");
    mimeTypes.add("image/jpeg");
    mimeTypes.add("image/png");
    File uploadDir = new File(FolderConfig.getCanonicalRoot() + FolderConfig.getRepositoryHome());
    VFSContainer uploadContainer = new LocalFolderImpl(uploadDir);
    uploadCtr = new FileUploadController(getWindowControl(), uploadContainer, ureq, limitKB, Quota.UNLIMITED, mimeTypes, false);
    uploadCtr.hideTitleAndFieldset();
    listenTo(uploadCtr);
    vContainer.put("uploadCtr", uploadCtr.getInitialComponent());
    // init the delete button
    deleteButton = LinkFactory.createButtonSmall("cmd.delete", this.vContainer, this);
View Full Code Here

        initConfigForm();
      }
    } else if (source == uploadButton) {
      Forum forum = ForumManager.getInstance().addAForum();
      OlatRootFolderImpl forumContainer = DialogElementsController.getForumContainer(forum.getKey());
      fileUplCtr = new FileUploadController(getWindowControl(),forumContainer, ureq, (int)FolderConfig.getLimitULKB(), Quota.UNLIMITED, null, false);     
      this.listenTo(fileUplCtr);
      recentElement = new DialogElement();
      recentElement.setForumKey(forum.getKey());
      recentElement.setAuthor(ureq.getIdentity().getName());
      content.contextPut("overview", Boolean.FALSE);
View Full Code Here

TOP

Related Classes of org.olat.core.commons.modules.bc.FileUploadController

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.