Skip to content

Commit

Permalink
Merge branch 'master' of github.com:dotCMS/dotCMS
Browse files Browse the repository at this point in the history
  • Loading branch information
wezell committed Jan 24, 2013
2 parents 6c4197d + 0a12e5d commit a9e4b9d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
9 changes: 6 additions & 3 deletions dotCMS/html/js/template/utility-left-menu.jsp
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<%@page import="com.liferay.portal.language.LanguageUtil"%>
/**
<script language="Javascript">
<%--
* This file contains all the Javascript function for drawing the template.
*
* @author Graziano Aliberti
*
*/
--%>
var addContainerMSG;
var removeContainerMSG;
Expand Down Expand Up @@ -520,4 +521,6 @@ function parseCurrentContainers() {
});
countContainersAdded.value = containersAdded.length;
}
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<%@ page import="com.dotmarketing.portlets.containers.business.ContainerAPI"%>

<%@ page import="com.dotmarketing.portlets.contentlet.business.HostAPI"%>

<%@ include file="/html/js/template/utility-left-menu.jsp" %>
<style type="text/css">
@import url(/html/css/template/draw-template.css);
@import url(/html/css/template/drawed-reset-fonts-grids.css);
Expand Down Expand Up @@ -338,7 +338,6 @@
</script>

<script src="/html/js/cms_ui_utils.js" type="text/javascript"></script>
<script src="/html/js/template/utility-left-menu.js" type="text/javascript"></script>
<script src="/html/js/template/utility-add-metadata.js" type="text/javascript"></script>
<script src="/html/js/template/utility-add-head-code.js" type="text/javascript"></script>
<script src="/html/js/codemirror/js/codemirror.js" type="text/javascript"></script>
Expand Down
8 changes: 4 additions & 4 deletions dotCMS/html/portlet/ext/timemachine/timemachine_select.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function resized() {
dojo.ready(function(){
dojo.connect(window,"onresize",resized);
resized();
dijit.byId('closeBtn').set('disabled','disabled');
dijit.byId('closeBtn').setDisabled(true);
hostChange();
toggleDatePick();
Expand Down Expand Up @@ -136,7 +136,7 @@ function timeChange() {
"src": '/',
"style": "border: 0; width: 100%; height: 90%;margin-top:10px"
}, dojo.byId('iframeWrapper'));
dijit.byId('closeBtn').set('disabled','');
dijit.byId('closeBtn').setDisabled(false);
browsingTimeMachine=true;
showDotCMSSystemMessage("<%= LanguageUtil.get(pageContext, "TIMEMACHINE-CLOSE-WHENDONE")%>");
Expand All @@ -150,7 +150,7 @@ function stopBrowing() {
url:'/DotAjaxDirector/com.dotcms.timemachine.ajax.TimeMachineAjaxAction/cmd/stopBrowsing',
handle: function() {
dojo.empty('iframeWrapper');
dijit.byId('closeBtn').set('disabled','disabled');
dijit.byId('closeBtn').setDisabled(true);
dijit.byId('timesel').required=false;
Expand Down Expand Up @@ -234,7 +234,7 @@ function futureChange() {
"src": '/',
"style": "border: 0; width: 100%; height: 90%;margin-top:10px"
}, dojo.byId('iframeWrapper'));
dijit.byId('closeBtn').set('disabled','');
dijit.byId('closeBtn').setDisabled(false);
showDotCMSSystemMessage("<%= LanguageUtil.get(pageContext, "TIMEMACHINE-CLOSE-WHENDONE")%>");
browsingTimeMachine=true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,9 @@ public void _copyWebAsset(ActionRequest req, ActionResponse res,

//Calling the copy method from the factory
TemplateFactory.copyTemplate(currentTemplate);

super._editWebAsset(req, res, config, form, user,
WebKeys.TEMPLATE_EDIT);

SessionMessages.add(httpReq, "message", "message.template.copy");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public static Template copyTemplate(Template currentTemplate) throws DotDataExce
Template newTemplate = new Template();

newTemplate.copy(currentTemplate);
newTemplate.setDrawed(currentTemplate.isDrawed());
newTemplate.setDrawedBody(currentTemplate.getDrawedBody());
newTemplate.setImage(currentTemplate.getImage());
newTemplate.setFriendlyName(currentTemplate.getFriendlyName()
+ " (COPY) ");
Expand Down

0 comments on commit a9e4b9d

Please sign in to comment.