barcodefontsoft.com

Customizing the WYSIWYG Editor in .NET Generator 3 of 9 barcode in .NET Customizing the WYSIWYG Editor

Customizing the WYSIWYG Editor generate, create code39 none with .net projects Java programming language Adding advanced sea c f nc i ns links and images We have updated the view of advanced search and search results. The advanced search functions are specified in the JavaScript files. Here we will build these advanced search functions in JavaScript files.

First, we need to specify the functions for the advanced search view as follows: 1. Create a JavaScript file search.js in the folder /ext/ext-web/docroot/ and open it.

. html/js/editor/FCKeditor/editor/filemanager/browser/liferay/js 2. Add the following lines in this file and save it:. var mediaImageTypes = [ ["I bar code 39 for .NET MAGE","Image"] ]; var mediaLinkTypes = [ ["TEXT","TEXT"],["COMBO","COMBO"] ]; function hiddenParamSetter(){ SetTitle(document.searchForm.

cmTitle.value); SetKeyword(document.searchForm.

cmKeyword.value); SetCreator(document.searchForm.

cmCreator.value); SetDescription(document.searchForm.

cmDescription.value); SetAssetType(document.searchForm.

cmbType.value); advancedSearch(); }; var adsearch = new Object(); adsearch.type = ""; adsearch.

creator = ""; adsearch.keywords = ""; adsearch.title = ""; adsearch.

description=""; function SetAssetType( type ){ adsearch.type = type; }; function SetTitle( title ){ adsearch.title = title; }; function SetDescription( description ){ adsearch.

description = description; }; function SetCreator( creator ){ adsearch.creator = creator; }; function SetKeyword( keywords ){ adsearch.keywords = keywords; }; [ 198 ].

This material is copyright and is licensed for the sole use by Richard Ostheimer on 20th June 2009 2205 hilda ave., , missoula, , 59801. 6 window.onload = function Code 3/9 for .NET () { if(contentObject.

ResourceType == "Image") for ( var i = 0 ; i < mediaImageTypes.length ; i++ ) AddSelectOption( document.getElementById("cmbType"), mediaImageTypes[i][1], mediaImageTypes[i][0] ) ; else for ( var i = 0 ; i < mediaLinkTypes.

length ; i++ ) AddSelectOption( document.getElementById("cmbType"), mediaLinkTypes[i][1], mediaLinkTypes[i][0] ) ; }; function advancedSearch() { var obj = "assetType=" + adsearch.type + "&startIndex=0&blockSize=50&"; if(adsearch.

title.length !== 0) obj += "title=" + adsearch.title + "&"; if(adsearch.

description.length !== 0) obj += "description=" + adsearch.description + "&"; if(adsearch.

keywords.length !== 0) obj += "keywords=" + adsearch.keywords + "&"; if(adsearch.

creator.length !== 0) obj += "creator=" + adsearch.creator + "&"; window.

parent.frames["frmResourcesList"] .search( obj, adsearch.

type ) ; };. The code above shows media types for Image and Link ( IMAGE for Image, and TEXT and COMBO for Link). Then it specifies the values of the media types. Finally, it provides a function for advanced search.

Now we need to specify the functions to display advanced search results as follows: 1. Create a JavaScript file resourcelist.js in the /ext/ext-web/docroot/ folder and open it.

. html/js/editor/FCKeditor/editor/filemanager/browser/liferay/js 2. Add the following lines in this file and save it:. var oListManager = new Obje barcode 39 for .NET ct() ; oListManager.Clear = function() {document.

body.innerHTML = "" ;}; oListManager.GetFileRowHtml = function( fileName, fileTitle, fileDesc, fileUrl, fileSize, sFileThumbnail, bigImageUid, sFileUrl) { var sLink = "<a href="" onclick="OpenFile(\"" + [ 199 ].

This material is copyright and is licensed for the sole use by Richard Ostheimer on 20th June 2009 2205 hilda ave., , missoula, , 59801. Customizing the WYSIWYG Edi 39 barcode for .NET tor fileUrl.replace( /"/g, "\\\"") + "\", \"" + bigImageUid.

replace( /"/g, "\\\"") + "\", \"" + sFileUrl.replace( /"/g, "\\\"") + "\");return false;">" ; var sIcon = oIcons.GetIcon( fileName ) ; var url = "<img alt="" src="images/icons/" + sIcon + ".

gif" width="80" height="60" border="0">"; url = "<img alt="" src="" + sFileThumbnail + "" width="80" height="60" border="0">"; return "<tr>" + "<td> " + sLink + url + "</a>" + "</td><td align="right" fileTitle + "</td><td align="right" fileDesc + "</td><td align="right" fileSize + "</td><td align="right" "</td></tr>" ; }; function OpenFile( fileUrl, bigImageUid, sFileUrl){ window.top.opener.

SetUrl( encodeURI( fileUrl ) ) ; window.top.close() ; window.

top.opener.focus() ; }; function search(param, mediaType){ contentObject.

mediaType = mediaType ; oListManager.Clear() ; if(contentObject.ResourceType == "Image" ) contentObject.

SendCommand( "GetFoldersAndFiles", searchADSUrl(param), GetFoldersAndFilesCallBack) ; else contentObject.SendCommand( "GetFoldersAndFiles", searchLINKUrl(param), GetFoldersAndFilesCallBack) ; var tHtml = new StringBuilder( "<p>" ) ; tHtml.Append("<b>" + "Searching.

.." + "</b></p>"); document.

body.innerHTML = tHtml.ToString() ; }; function GetFoldersAndFilesCallBack( fckXml ){ [ 200 ].

nowrap> " + nowrap> " + nowrap> " + nowrap> " + This material is copyright .NET Code 3 of 9 and is licensed for the sole use by Richard Ostheimer on 20th June 2009 2205 hilda ave., , missoula, , 59801.

6 if ( contentObject.Check Error( fckXml ) != 0 ) return ; var currentDate = new Date(); var ts = currentDate.getYear() + "" + currentDate.

getMonth() + "" + currentDate.getDate() + "" + currentDate.getHours() + "" + currentDate.

getMinutes()+ "" + currentDate.getSeconds() + "" + currentDate.getMilliseconds(); var ts_url = "t=" + ts + "&"; var oHtml = new StringBuilder( "<table id="tableFiles" class="its">" ) ; oHtml.

Append("<tr><th style=\"color: #333333; font-weight: bold; font-size: 11px;\">Image</th> <th style=\"color: #333333; font-weight: bold; font-size: 11px;\">Title</th> <th style=\"color: #333333; font-weight: bold; font-size: 11px;\"> Description</th> <th style=\"color: #333333; font-weight: bold; font-size: 11px;\">Modified</th> </tr> "); var oNodes = fckXml.SelectNodes( "Connector/Files/File" ) ; if(oNodes.length == 0) { var tHtml = new StringBuilder( "<p>" ) ; tHtml.

Append("<b>" + "No results found" + "</b></p>"); document.body.innerHTML = tHtml.

ToString() ; return; }; ar url = location.protocol + "//" + location.host + "/"; for ( var j = 0 ; j < oNodes.

length ; j++ ){ var oNode = oNodes[j] ; var sFileName = oNode.attributes.getNamedItem("name").

value ; var sFileDesc = oNode.attributes.getNamedItem ("description").

value ; var sFileTitle = oNode.attributes.getNamedItem("title").

value ; var sFileUrl = oNode.attributes.getNamedItem("url").

value ; var sFileGuid = oNode.attributes.getNamedItem("guid").

value ; var sFileModified = oNode.attributes.getNamedItem ("modified").

value ; var sFileThumbnail = oNode.attributes.getNamedItem ("thumbnail").

value; [ 201 ]. This material is copyright USS Code 39 for .NET and is licensed for the sole use by Richard Ostheimer on 20th June 2009 2205 hilda ave., , missoula, , 59801.

Customizing the WYSIWYG Edi tor if(sFileThumbnail.length > "a9bcbd3b-0b2f-11dd-8fd0cd36a59c8e0c".length) sFileThumbnail = url + sFileThumbnail; else if (sFileThumbnail.

length == "a9bcbd3b-0b2f-11dd-8fd0cd36a59c8e0c".length) sFileThumbnail = sFileUrl + "=download&uid=" + sFileThumbnail + "&" + ts_url; else sFileThumbnail = sFileUrl + "=download&uid=" + sFileGuid + "&" + ts_url; var bigImageUid = ""; var link = sFileUrl + "=download&uid=" + sFileGuid + "&" + ts_url; oHtml.Append( oListManager.

GetFileRowHtml( sFileName, sFileTitle, sFileDesc, link, sFileModified, sFileThumbnail, bigImageUid, sFileUrl) ) ; }; oHtml.Append( "<\/table>" ) ; document.body.

innerHTML = oHtml.ToString() ; };. The code above specifies a ANSI/AIM Code 39 for .NET set of advanced search functions, GetFileRowHtml, openFile, search, and GetFoldersAndFilesCallBack. Finally, we need to specify the functions to link the advanced search services by using the following steps: 1.

Create a JavaScript file browse.js in the folder /ext/ext-web/docroot/.
Copyright © barcodefontsoft.com . All rights reserved.