dhtmlx scheduler - How to integrate into a webblock!

dhtmlx scheduler - How to integrate into a webblock!

  
Hey, 

I do want to integrate the dhtmlx scheduler into an webblock. I found a couple of solutions but I do not really found out how to manage import the .js files into the Service Studio resources. Does anybody have an How to for this problem. I also did not find an How To to create an xif based on the dhtmlx Library. How do I basically import JavaScript with the Integration Studio?

Maybe somebody has some links or How To´s

Thanks for your support.
Hi Herbert,

Welcome to the forums!

Generally speaking, you should be able to add any file to be deployed together with your eSpace by adding resources to it. Check

http://www.outsystems.com/help/servicestudio/6.0/default.htm#Managing_Resources/About_Resources.htm

for more details. Having said that, if what you want is to add js snippets specifically it's probably better if you just add it to the JavaScript property of the appropriate Screen (or the eSpace) so it immediately gets included in the screens.

Insofar as using an Extension, it's probably not worth your while to use it for js injection. Integrated Studio is better suited if you want to create a xif based on an Assembly, not on a js codebase.

Hope this helps,


Miguel
Hey Miguel,

thanks for your answer, but the problem is that dhtmlx consists of many files including a special folder structure for the images and so on. And therefore I do not think your suggested solution is than the proper way to include the different js files, since I do not want to change the programming of the calendar code. Is there any solution where I can import and reference to a complete set of js files?
In order to initialize the calendar I need to use custom html code, see example below or the Link. How would I  solve this problem?
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
		<div class="dhx_cal_navline">
			<div class="dhx_cal_prev_button">&nbsp;</div>
			<div class="dhx_cal_next_button">&nbsp;</div>
			<div class="dhx_cal_today_button"></div>
			<div class="dhx_cal_date"></div>
			<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
			<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
			<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
		</div>
		<div class="dhx_cal_header">
		</div>
		<div class="dhx_cal_data">
		</div>		
	</div>
thanks for the support and if I can solve this problem I can finally start developing my current projects.
Hi Herbert,

I see what you mean. Well, the best way to include resources into an eSpace that will need to end up in a specific place upon eSpace compilation and deploy is to use the following command line option:

ServiceStudio.exe -importResource <eSpace.oml> <resource file> <target directory in eSpace>

so you could do something like

ServiceStudio.exe -importResource MyeSpace.oml "c:\unzipped\dhtml\sources\dhtmlx.js" "dhtmlx\sources"

to add that js file into that particular sub directory. If you want to add multiple files, I would create a batch file that -importResource each file into its directory (sorry, there's no "recursively" option).

To inject any sort of HTML into your pages (e.g. javascript calls, or the html snippet you posted), simply use an Expression widget, with Escape Content property set to False.

Hope this helps,


Miguel
Hey Miguel,

I tried to import the resources but without success. I used the follwoing command 
"C:\Program Files\OutSystems\Service Studio 6.0\ServiceStudio.exe" -importResource "C:\Users\h.riener\Documents\rigaVet.oml" C:\Users\h.riener\Downloads\dhtmlx\codebase\dhtmlxscheduler.js "dhtmlx\sources"
but nothing happend.

Do you know what might be the problem.

Thanks herbert
Herbert Riener wrote:
I tried to import the resources but without success. I used the follwoing command 
"C:\Program Files\OutSystems\Service Studio 6.0\ServiceStudio.exe" -importResource "C:\Users\h.riener\Documents\rigaVet.oml" C:\Users\h.riener\Downloads\dhtmlx\codebase\dhtmlxscheduler.js "dhtmlx\sources"
but nothing happend.

Do you know what might be the problem.
 
 Hi,

Did you re-load the rigaVet.oml eSpace into Service Studio after this operation? If you have, do you not have a "dhtmlx\sources\dhtmlxscheduler.js" file inside the Resources folder in the Data tab?


Miguel