Package org.cast.cwm.components

Examples of org.cast.cwm.components.ClassAttributeModifier


            responseItem.add(new WebMarkupContainer("removeLink")
            .setVisible(mUser.getObject().getRole().equals(Role.STUDENT) && mUser.getObject().equals(response.getUser()))
            .add(removeModal.getClickToOpenBehavior()));

            if(mUser.getObject().equals(response.getUser()))
              responseItem.add(new ClassAttributeModifier("responseRemoveable"));
          }
        }
      }
    }
  }
View Full Code Here


      Icon envelopImage;
      if (page.equals(currentPage)) {
        envelopImage = new EnvelopImageWithStatusUpdate("icon", new Model<ISIXmlSection>(page));
        link.setEnabled(false);
        link.add(new ClassAttributeModifier("current"));
      } else {
        envelopImage = new EnvelopeImage("icon", new Model<ISIXmlSection>(page));
      }
     
      // for teachers add any of the status icons, for students, just add the envelope if appropriate
View Full Code Here

           ISIXmlSection rootSection = (ISIXmlSection) rs;
           WebMarkupContainer rootSectionContainer = new WebMarkupContainer(chapterRepeater.newChildId());
           chapterRepeater.add(rootSectionContainer);
           // Chapter that contains the bookmark is open by default.
           if (rootSection.equals(currentRootSection))
             rootSectionContainer.add(new ClassAttributeModifier("open"));
           rootSectionContainer.add(new Label("chapterTitle", rootSection.getTitle()));
           ISIXmlComponent xml = new ISIXmlComponent("chapterContent", new XmlSectionModel(rootSection), "toc");
           xml.setTransformParameter("sectionToggleLinks", getSectionToggleParameter());
           xml.setTransformParameter("sectionLevel", sectionLevel);
           if (currentPage != null)
View Full Code Here

    }
   
    // if the preference exists in the db, add or remove the css class "open"
    Boolean toggleState = userPreferenceService.getUserPreferenceBoolean(ISISession.get().getUserModel(), userPreferenceName);
    if (toggleState != null) {
      collapseBox.add(new ClassAttributeModifier("open", !toggleState));
    }   

    WebMarkupContainer collapseBoxToggle = new WebMarkupContainer("collapseBoxToggle");
    collapseBox.add(collapseBoxToggle);
   
View Full Code Here

    // Teacher Notes Pop-up for the current student
    teacherNotesLink = new BookmarkablePageLink<Page>("teacherNotesLink", ISIApplication.get().getTeacherNotesPageClass());
    ISIApplication.get().setLinkProperties(teacherNotesLink);
    teacherNotesLink.setOutputMarkupId(true);
    if (ISISession.get().getStudentModel() == null) {
      teacherNotesLink.add(new ClassAttributeModifier("off"));
    }
    teacherNotesLink.setEnabled(ISISession.get().getStudentModel() != null);
    teacherNotesLink.setVisible(!ISISession.get().getUser().hasRole(Role.RESEARCHER) || showStudents); // Researchers do not use Teacher Notes
    add(teacherNotesLink);
View Full Code Here

         
        }
      }
    };
      if (mUser == null) {
        flagLink.add(new ClassAttributeModifier("off"));
      }
   
      Icon flagImage = new Icon("flag-image",
          new AbstractReadOnlyModel<String>() {
        private static final long serialVersionUID = 1L;
View Full Code Here

    else if (application.getTagsPageClass().isAssignableFrom(pageClass))
      prefix = "myTags";
   
    if (prefix != null) {
      WebMarkupContainer link = (WebMarkupContainer) get(prefix + "Link");
      link.add(new ClassAttributeModifier("current"));
    }
   
    super.onBeforeRender();
  }
View Full Code Here

    if (showXmlContent) {
      WebMarkupContainer tagBox = new WebMarkupContainer("tagBox");
      add(tagBox);
      Boolean toggleState = userPreferenceService.getUserPreferenceBoolean(ISISession.get().getUserModel(), "tagToggle");
      if (toggleState != null) {
        tagBox.add(new ClassAttributeModifier("open", !toggleState));
      }       
      tagBox.setVisible(ISIApplication.get().isTagsOn());

      StateSavingCollapseBoxBehavior behavior = new StateSavingCollapseBoxBehavior("tagToggle", getPageName(), "tagToggle");
      tagBox.add(new WebMarkupContainer("tagBoxToggle").add(behavior));
View Full Code Here

    }
   
    // enable the whiteboard if there is a period
    if (ISISession.get().getCurrentPeriodModel() == null) {
      super.whiteboardLink.setEnabled(false);
      super.whiteboardLink.add(new ClassAttributeModifier("off"));
    }
  }
View Full Code Here

  public void onBeforeRender() {
       
    Class<? extends Page> pageClass = getPage().getClass();
    if (ISIApplication.get().getManageClassesPageClass().isAssignableFrom(pageClass)) {
      WebMarkupContainer link = (WebMarkupContainer) get("manageClassesLink");
      link.add(new ClassAttributeModifier("current"));
    }
   
    super.onBeforeRender();
  }
View Full Code Here

TOP

Related Classes of org.cast.cwm.components.ClassAttributeModifier

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.