Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilvam committed May 22, 2013
1 parent 4dd32bb commit f855f31
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 339 deletions.
132 changes: 0 additions & 132 deletions dotCMS/html/js/dotcms/dojo/data/MetadataContainerReadStore.js

This file was deleted.

24 changes: 1 addition & 23 deletions dotCMS/html/portlet/ext/templates/design/design_templates.jsp
Expand Up @@ -189,11 +189,6 @@
document.getElementById("idDiv").value=idDiv;
}
function showAddMetadataContainerDialog() {
dijit.byId('metadataContainersList').attr('value', '');
dijit.byId('metadataContainerSelector').show();
}
function addContainer() {
var idDiv = document.getElementById("idDiv");
dijit.byId('containerSelector').hide();
Expand Down Expand Up @@ -869,7 +864,6 @@
</div>

<span dojoType="dotcms.dojo.data.ContainerReadStoreDrawedTemplate" jsId="containerStore"></span>
<span dojoType="dotcms.dojo.data.MetadataContainerReadStore" jsId="metadataContainerStore"></span>

<!-- ADD CONTAINER DIALOG BOX -->
<div dojoType="dijit.Dialog" id="containerSelector" title="<%=LanguageUtil.get(pageContext, "select-a-container")%>">
Expand All @@ -887,20 +881,4 @@
<button dojoType="dijit.form.Button" onclick="dijit.byId('containerSelector').hide()" type="button"><%=LanguageUtil.get(pageContext, "Cancel")%></button>
</div>
</div>
<!-- /ADD CONTAINER DIALOG BOX -->

<!-- ADD METADATA CONTAINER DIALOG BOX -->
<div dojoType="dijit.Dialog" id="metadataContainerSelector" title="<%=LanguageUtil.get(pageContext, "select-a-metadata-container")%>">
<p style="text-align: center">
<%=LanguageUtil.get(pageContext, "Container")%>
<select id="metadataContainersList" name="metadataContainersList" dojoType="dijit.form.FilteringSelect"
store="metadataContainerStore" searchDelay="300" pageSize="10" labelAttr="fullTitle" searchAttr="title"
invalidMessage="<%=LanguageUtil.get(pageContext, "Invalid-option-selected")%>">
</select>
</p>
<div class="buttonRow">
<button dojoType="dijit.form.Button" onclick="addMetadataContainer()" type="button"><%=LanguageUtil.get(pageContext, "add-meta")%></button>
<button dojoType="dijit.form.Button" onclick="dijit.byId('metadataContainerSelector').hide()" type="button"><%=LanguageUtil.get(pageContext, "Cancel")%></button>
</div>
</div>
<!-- /ADD METADATA CONTAINER DIALOG BOX -->
<!-- /ADD CONTAINER DIALOG BOX -->
18 changes: 16 additions & 2 deletions src/com/dotcms/publisher/pusher/wrapper/ContainerWrapper.java
@@ -1,6 +1,9 @@
package com.dotcms.publisher.pusher.wrapper;

import java.util.List;

import com.dotcms.publisher.pusher.PushPublisherConfig.Operation;
import com.dotmarketing.beans.ContainerStructure;
import com.dotmarketing.beans.Identifier;
import com.dotmarketing.beans.VersionInfo;
import com.dotmarketing.portlets.containers.model.Container;
Expand All @@ -10,7 +13,8 @@ public class ContainerWrapper {
private Container container;
private VersionInfo cvi;
private Operation operation;

private List<ContainerStructure> csList;

public ContainerWrapper(Identifier containerId, Container container) {
this.containerId = containerId;
this.container = container;
Expand Down Expand Up @@ -45,7 +49,7 @@ public VersionInfo getCvi() {
public void setCvi(VersionInfo cvi) {
this.cvi = cvi;
}

/**
* @return the operation
*/
Expand All @@ -59,4 +63,14 @@ public Operation getOperation() {
public void setOperation(Operation operation) {
this.operation = operation;
}

public List<ContainerStructure> getCsList() {
return csList;
}

public void setCsList(List<ContainerStructure> csList) {
this.csList = csList;
}


}
4 changes: 0 additions & 4 deletions src/com/dotmarketing/beans/DotCMSId.hbm.xml
Expand Up @@ -255,10 +255,6 @@
<property column="lucene_query" name="luceneQuery" type="string" length="123456789" />
<property column="notes" name="notes" type="string" />
<property column="identifier" length="36" name="identifier" type="string" />
<!-- *********************** BEGIN GRAZIANO issue-12-dnd-template -->
<property column="for_metadata" name="forMetadata" type="boolean" />
<!-- *********************** END GRAZIANO issue-12-dnd-template -->

</joined-subclass>

<joined-subclass name="com.dotmarketing.portlets.folders.model.Folder" table="folder">
Expand Down
3 changes: 0 additions & 3 deletions src/com/dotmarketing/beans/DotCMSSeq.hbm.xml
Expand Up @@ -255,9 +255,6 @@
<property column="lucene_query" name="luceneQuery" type="string" length="123456789" />
<property column="notes" name="notes" type="string" />
<property column="identifier" length="36" name="identifier" type="string" />
<!-- *********************** BEGIN GRAZIANO issue-12-dnd-template -->
<property column="for_metadata" name="forMetadata" type="boolean" />
<!-- *********************** END GRAZIANO issue-12-dnd-template -->
</joined-subclass>

<joined-subclass name="com.dotmarketing.portlets.folders.model.Folder" table="folder">
Expand Down
Expand Up @@ -453,31 +453,6 @@ public void _editWebAsset(ActionRequest req, ActionResponse res,
cf.setDynamic(true);
}

// BEGIN GRAZIANO issue-12-dnd-template

if(UtilMethods.isSet(container.getCode()) && container.getMaxContentlets()==0){
if(ContainerAjaxUtil.checkMetadataContainerCode(container.getCode()))
container.setForMetadata(true);
// END GRAZIANO issue-12-dnd-template
} else if(container.getMaxContentlets()>0) {
// TODO: HOW IS THIS GOING TO BE HANDLED WITH MULTIPLE CODES? IS THE METADATA ONLY WHEN NO STRUCTURE IS SELECTED?
}


// Getting container structure
// commented by issue-2093
// if (!InodeUtils.isSet(cf.getStructureInode())) {
// Structure currentStructure;
// if (!InodeUtils.isSet(container.getInode())) {
// currentStructure = StructureFactory.getDefaultStructure();
// } else {
// currentStructure = StructureCache.getStructureByInode(container.getStructureInode());
// if (currentStructure==null || !InodeUtils.isSet(currentStructure.getInode()))
// currentStructure = StructureFactory.getDefaultStructure();
// }
// cf.setStructureInode(currentStructure.getInode());
// }

//gets the container host
Host host = hostAPI.findParentHost(container, user, false);
if(host!= null)
Expand Down
Expand Up @@ -103,7 +103,7 @@ public Map<String, Object> fetchContainersDesignTemplate ( Map<String, String> q
* contents and doesn't stay into the template for more than one time.
*/
contMap.put( "maxContentlets", cont.getMaxContentlets() );
if ( !checkContainerCode && !cont.isForMetadata() ) {
if ( !checkContainerCode ) {

//Now we need to verify if an exclude list was sent from the client
Boolean excludeContainer = false;
Expand Down

This file was deleted.

0 comments on commit f855f31

Please sign in to comment.