public void setTab(Object tab) { if (tab.equals(infoTabVc)) { setPersistantTabFlag("infoTab"); infoTabVc.setSelected(true); getUiHandlers().revealTab(EditFolderUiHandlers.TYPE_FOLDER_INFO_TAB, collectionDo); } else if (tab.equals(contentTabVc)) { setPersistantTabFlag("contentTab"); contentTabVc.setSelected(true); getUiHandlers().revealTab(EditFolderUiHandlers.TYPE_FOLDER_CONTENT_TAB, collectionDo); } }
@Inject public EditFolderView() { this.res = ShelfCBundle.INSTANCE; folderDescription = new FolderEditableTextAreaUc() { @Override public void onEditDisabled(String text) { descriptionAlertMessageLbl.addStyleName("titleAlertMessageDeActive"); descriptionAlertMessageLbl.removeStyleName("titleAlertMessageActive"); editFolderDescSaveButton.getElement().getStyle().setDisplay(Display.NONE); editFolderDescSaveButtonCancel.getElement().getStyle().setDisplay(Display.NONE); collectionDo.setGoals(text); getUiHandlers().updateCollectionInfo(collectionDo.getGooruOid(), null, text); } @Override public void checkCharacterLimit(String text) { if (text.length() >= 415) { descriptionAlertMessageLbl.addStyleName("titleAlertMessageActive"); descriptionAlertMessageLbl.removeStyleName("titleAlertMessageDeActive"); } else { descriptionAlertMessageLbl.addStyleName("titleAlertMessageDeActive"); descriptionAlertMessageLbl.removeStyleName("titleAlertMessageActive"); } } }; folderTitle = new FolderEditableLabelUc() { @Override public void onEditDisabled(String text) { titleAlertMessageLbl.addStyleName("titleAlertMessageDeActive"); titleAlertMessageLbl.removeStyleName("titleAlertMessageActive"); collectionDo.setTitle(text); editFolderSaveButton.getElement().getStyle().setDisplay(Display.NONE); editFolderSaveButtonCancel.getElement().getStyle().setDisplay(Display.NONE); getUiHandlers().updateCollectionInfo(collectionDo.getGooruOid(), text, null); } @Override public void checkCharacterLimit(String text) { if (text.length() >= 50) { titleAlertMessageLbl.addStyleName("titleAlertMessageActive"); titleAlertMessageLbl.removeStyleName("titleAlertMessageDeActive"); } else { titleAlertMessageLbl.addStyleName("titleAlertMessageDeActive"); titleAlertMessageLbl.removeStyleName("titleAlertMessageActive"); } } }; FolderCBundle.INSTANCE.css().ensureInjected(); res.css().ensureInjected(); setWidget(uiBinder.createAndBindUi(this)); simplePencilFocPanel.addMouseOverHandler(new hideEditPencil()); simplePencilFocPanel.addMouseOutHandler(new showEditPencil()); collectionEditImageLbl.addClickHandler(new OnEditImageClick()); editFolderTitle.addClickHandler(new OnEditImageClick()); editFolderSaveButton.getElement().getStyle().setDisplay(Display.NONE); editFolderSaveButtonCancel.getElement().getStyle().setDisplay(Display.NONE); editFolderDescSaveButton.getElement().getStyle().setDisplay(Display.NONE); editFolderDescSaveButtonCancel.getElement().getStyle().setDisplay(Display.NONE); simplePencilPanel.getElement().getStyle().setDisplay(Display.NONE); backToSearchFloPanel.getElement().getStyle().setDisplay(Display.NONE); collectionDescriptionTitleContainer.addMouseOverHandler(new OnCollectionDescriptionClick()); collectionDescriptionTitleContainer.addMouseOutHandler(new OnCollectionDescriptionOut()); simplePencilPanel.addClickHandler(new OpenCollectionEditDescription()); editFolderDesc.addClickHandler(new OpenCollectionEditDescription()); myFolderRightContainer.addMouseOverHandler(new ActionPanelHover()); myFolderRightContainer.addMouseOutHandler(new ActionPanelOut()); folderDeleteLabel.setVisible(false); infoTabVc.addClickHandler(this); contentTabVc.addClickHandler(this); backToSearchHtml.addClickHandler(new BackToSearchHtmlClick()); collectionEditImageLbl.setVisible(false); }