Skip to content
Permalink
Browse files

minor reformatting and fix click browse link

  • Loading branch information...
ninianne98 committed Nov 3, 2018
1 parent e80dc8a commit e3a1e00f4ee0b85ab918188bc896b9e7b3b7173e
@@ -67,6 +67,14 @@ public class AdminBasePage : BasePage {
}
}

public string ClickFileBrowser(Control ctrl) {
return String.Format("cmsFileBrowserOpenReturn('{0}'); return false;", ctrl.ClientID);
}

public string ClickFileBrowserPop(Control ctrl) {
return String.Format("cmsFileBrowserOpenReturnPop('{0}'); return false;", ctrl.ClientID);
}

public void PreselectCheckboxRepeater(Repeater repeater, List<IContentMetaInfo> lst) {
foreach (RepeaterItem r in repeater.Items) {
CheckBox chk = (CheckBox)r.FindControl("chk");
@@ -449,7 +449,7 @@
</td>
<td>
<asp:TextBox ValidationGroup="inputForm" onkeypress="return ProcessKeyPress(event)" ID="txtThumb" runat="server" Columns="60" MaxLength="200" />
<input type="button" id="Button1" value="Browse" onclick="cmsFileBrowserOpenReturn('<%=txtThumb.ClientID %> ');return false;" />
<input type="button" id="btnThumb" value="Browse" onclick="<%=ClickFileBrowser(txtThumb) %>" />
</td>
</tr>
<tr>
@@ -787,8 +787,8 @@
cmsSaveMakeOKAndCancelLeave();
var ret = cmsPreSaveTrigger();
cmsLoadPrettyValidationPopup('<%= formValidationSummary.ClientID %>');
return true;
}
return true;
}
</script>
<script type="text/javascript">
@@ -70,7 +70,7 @@
</td>
<td>
<asp:TextBox ValidationGroup="inputForm" onkeypress="return ProcessKeyPress(event)" ID="txtThumb" runat="server" Columns="60" MaxLength="200" />
<input type="button" id="btnThumb" value="Browse" onclick="cmsFileBrowserOpenReturnPop('<%=txtThumb.ClientID %> ');return false;" />
<input type="button" id="btnThumb" value="Browse" onclick="<%=ClickFileBrowserPop(txtThumb) %>" />
</td>
</tr>
<tr>
@@ -165,12 +165,12 @@
function ClickSaveBtn() {
if (cmsIsPageValid()) {
$('#<%=btnSave.ClientID %>').click();
}
}
}
function cancelEditing() {
window.setTimeout("location.href = './CategoryIndex.aspx';", 250);
}
function cancelEditing() {
window.setTimeout("location.href = './CategoryIndex.aspx';", 250);
}
</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="NoAjaxContentPlaceHolder" runat="server">
@@ -395,15 +395,15 @@
function ClickSaveBtn() {
if (cmsIsPageValid()) {
$('#<%=btnSave.ClientID %>').click();
}
}
function SaveCommon() {
cmsSaveMakeOKAndCancelLeave();
var ret = cmsPreSaveTrigger();
cmsLoadPrettyValidationPopup('<%= formValidationSummary.ClientID %>');
return true;
}
}
function SaveCommon() {
cmsSaveMakeOKAndCancelLeave();
var ret = cmsPreSaveTrigger();
cmsLoadPrettyValidationPopup('<%= formValidationSummary.ClientID %>');
return true;
}
</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="NoAjaxContentPlaceHolder" runat="server">
@@ -304,80 +304,80 @@
</div>
<script type="text/javascript">
var imgSrc = '/c3-admin/images/document.png';
var imgSrc = '/c3-admin/images/document.png';
var imgPreviewId = 'imgWrapperMain';
var imgRealId = 'imgRealPreview';
var imgThumbId = 'imgThmbnailPreview';
var imgSizeId = 'imgPreviewCaption';
var imgPreviewId = 'imgWrapperMain';
var imgRealId = 'imgRealPreview';
var imgThumbId = 'imgThmbnailPreview';
var imgSizeId = 'imgPreviewCaption';
var divImgLayer = $('#' + imgPreviewId);
var imgDim = $('#' + imgSizeId);
var imgThumb = $('#' + imgThumbId);
var imgReal = $('#' + imgRealId);
var divImgLayer = $('#' + imgPreviewId);
var imgDim = $('#' + imgSizeId);
var imgThumb = $('#' + imgThumbId);
var imgReal = $('#' + imgRealId);
function hideImg(obj) {
var theNode = $(obj).parent();
var grp = $(theNode).attr('id');
function hideImg(obj) {
var theNode = $(obj).parent();
var grp = $(theNode).attr('id');
$(divImgLayer).attr('style', 'display:none;');
$(divImgLayer).attr('class', '');
$(divImgLayer).attr('style', 'display:none;');
$(divImgLayer).attr('class', '');
$(imgThumb).attr('src', imgSrc);
$(imgThumb).attr('width', 64);
$(imgThumb).attr('height', 64);
$(imgThumb).removeAttr("width").attr("width");
$(imgThumb).removeAttr("height").attr("height");
$(imgThumb).attr('src', imgSrc);
$(imgThumb).attr('width', 64);
$(imgThumb).attr('height', 64);
$(imgThumb).removeAttr("width").attr("width");
$(imgThumb).removeAttr("height").attr("height");
$(imgReal).attr('src', imgSrc);
$(imgReal).attr('src', imgSrc);
$(imgDim).html('<br />');
}
$(imgDim).html('<br />');
}
function showImg(obj, mode) {
var theNode = $(obj).parent();
var imgSrc = $(theNode).find('img');
var imgtype = $(imgSrc).attr('filetype');
function showImg(obj, mode) {
var theNode = $(obj).parent();
var imgSrc = $(theNode).find('img');
var imgtype = $(imgSrc).attr('filetype');
if (imgtype.indexOf('image') >= 0) {
if (imgtype.indexOf('image') >= 0) {
var val = $(imgSrc).attr('src');
var grp = $('#fileZone').attr('id');
var pos = $('#fileZone').offset();
var val = $(imgSrc).attr('src');
var grp = $('#fileZone').attr('id');
var pos = $('#fileZone').offset();
$(divImgLayer).attr('style', '');
$(divImgLayer).attr('style', '');
if (mode == 'file') {
$(divImgLayer).css({ "left": (pos.left + 150) + "px", "top": (pos.top - 25) + "px" }).show();
} else {
$(divImgLayer).css({ "left": (pos.left + 20) + "px", "top": (pos.top - 200) + "px" }).show();
}
if (mode == 'file') {
$(divImgLayer).css({ "left": (pos.left + 150) + "px", "top": (pos.top - 25) + "px" }).show();
} else {
$(divImgLayer).css({ "left": (pos.left + 20) + "px", "top": (pos.top - 200) + "px" }).show();
}
$(divImgLayer).attr('class', 'thumbpreview ui-corner-all');
$(divImgLayer).attr('class', 'thumbpreview ui-corner-all');
$(imgThumb).attr('alt', val);
$(imgThumb).attr('title', val);
$(imgThumb).attr('src', val);
$(imgThumb).attr('alt', val);
$(imgThumb).attr('title', val);
$(imgThumb).attr('src', val);
$(imgReal).attr('src', val);
$(imgReal).attr('src', val);
resizeImg();
resizeImg();
setTimeout("resizeImg();", 500);
setTimeout("resizeImg();", 1500);
setTimeout("resizeImg();", 5000);
setTimeout("resizeImg();", 500);
setTimeout("resizeImg();", 1500);
setTimeout("resizeImg();", 5000);
}
}
}
function resizeImg() {
function resizeImg() {
$(imgDim).html($(imgReal).width() + ' x ' + $(imgReal).height());
$(imgDim).html($(imgReal).width() + ' x ' + $(imgReal).height());
if ($(imgThumb).height() > 175) {
$(imgThumb).attr('height', 165);
setTimeout("resizeImg();", 1500);
if ($(imgThumb).height() > 175) {
$(imgThumb).attr('height', 165);
setTimeout("resizeImg();", 1500);
}
}
}
</script>
<asp:PlaceHolder ID="phRemove" runat="server">
<p>
@@ -395,13 +395,13 @@
</div>
<asp:Panel runat="server" ID="pnlTiny2">
<div class="mceActionPanel">
<input type="submit" id="insert" name="insert" value="Select" onclick="FileBrowserDialogue.mySubmit();return false;" />
<input type="submit" id="insert" name="insert" value="Select" onclick="FileBrowserDialogue.mySubmit(); return false;" />
<input type="button" id="cancel" name="cancel" value="Cancel" onclick="tinyMCEPopup.close();" />
</div>
</asp:Panel>
<div style="display: none">
<asp:Panel runat="server" ID="pnlFileMgr">
<input type="submit" id="Submit1" name="insert" value="Select" onclick="cmsSetFileName();return false;" />
<input type="submit" id="Submit1" name="insert" value="Select" onclick="cmsSetFileName(); return false;" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" id="Button1" name="cancel" value="Cancel" onclick="window.close();" />
</asp:Panel>
@@ -411,7 +411,7 @@
</td>
<td>
<asp:TextBox ValidationGroup="inputForm" onkeypress="return ProcessKeyPress(event)" ID="txtThumb" runat="server" Columns="60" MaxLength="200" />
<input type="button" id="btnThumb" value="Browse" onclick="cmsFileBrowserOpenReturn('<%=txtThumb.ClientID %>');return false;" />
<input type="button" id="btnThumb" value="Browse" onclick="<%=ClickFileBrowser(txtThumb) %>" />
</td>
</tr>
<tr>
@@ -729,21 +729,21 @@
function ClickSaveBtn() {
if (cmsIsPageValid()) {
$('#<%=btnSave.ClientID %>').click();
}
}
function ClickSaveVisitBtn() {
if (cmsIsPageValid()) {
$('#<%=btnSaveVisit.ClientID %>').click();
}
}
}
function SaveCommon() {
cmsSaveMakeOKAndCancelLeave();
var ret = cmsPreSaveTrigger();
cmsLoadPrettyValidationPopup('<%= formValidationSummary.ClientID %>');
return true;
function ClickSaveVisitBtn() {
if (cmsIsPageValid()) {
$('#<%=btnSaveVisit.ClientID %>').click();
}
}
function SaveCommon() {
cmsSaveMakeOKAndCancelLeave();
var ret = cmsPreSaveTrigger();
cmsLoadPrettyValidationPopup('<%= formValidationSummary.ClientID %>');
return true;
}
</script>
<script type="text/javascript">
@@ -70,7 +70,7 @@
</td>
<td>
<asp:TextBox ValidationGroup="inputForm" onkeypress="return ProcessKeyPress(event)" ID="txtThumb" runat="server" Columns="60" MaxLength="200" />
<input type="button" id="btnThumb" value="Browse" onclick="cmsFileBrowserOpenReturnPop('<%=txtThumb.ClientID %>');return false;" />
<input type="button" id="btnThumb" value="Browse" onclick="<%=ClickFileBrowserPop(txtThumb) %>" />
</td>
</tr>
<tr>
@@ -33,7 +33,8 @@
type: "POST",
url: webMthd,
data: JSON.stringify({ FolderPath: myFldr, DatePath: myDateF,
data: JSON.stringify({
FolderPath: myFldr, DatePath: myDateF,
CategoryPath: myCat, TagPath: myTag,
EditorPath: myEd
}),
@@ -165,12 +165,12 @@
function ClickSaveBtn() {
if (cmsIsPageValid()) {
$('#<%=btnSave.ClientID %>').click();
}
}
}
function cancelEditing() {
window.setTimeout("location.href = './TagIndex.aspx';", 250);
}
function cancelEditing() {
window.setTimeout("location.href = './TagIndex.aspx';", 250);
}
</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="NoAjaxContentPlaceHolder" runat="server">

0 comments on commit e3a1e00

Please sign in to comment.
You can’t perform that action at this time.