Let us improve SharePoint 2010.. i will be your party starter.. SharePoint2010 is a powerful product, but there are times one feels its limited. That's a bold saying, but when you've worked with SharePoint I'm sure you wished there where options to sum a table your way. Or that you wanted to have more control on how things graphically where shown. You know all the data is in it but sometimes its hard to display it. What i will write down here in this article is how to summarize a table, and create a graphic based on it. I will also explain how to do it, we're going to break open SharePoint so you can do finally what you want to do with it. While we wont need more access then well basically SharePoint Designer, or using only the web browser is possible too!. But with SPD (SharePoint designer) we could do a bit more. I will keep in mind that most of you don't code, or are new to SharePoint, JavaScript CAML Jquery etc etc. You should know HTML tags, i am not going to explain those. Code will be briefly explained. I would advice to use some kind of editor to write Jscript in, for example Notepad++ / Editra / ... etc Also to test locally jscript its handy to have locally on your client pc a webserver A real small one can be downloaded here Tinyweb also read its small manual. It is less then 1 Mb. It installs without GUI, its simply active once started and that's enough if you want to play with scripting.
01.
<html><head></head><body
02.
<div id=
"MyStuff"
>
03.
You will see me <br>
04.
When nothing has been pressed
05.
</div>
06.
07.
<script type=
"text/javascript"
08.
function
changeText(){
09.
document.getElementById('MyStuff').innerHTML='<b>WOW you changed me !</b>';
;
10.
}
11.
</script>
12.
<input type=
'button'
onclick=
'changeText()'
value=
'Change Text'
/>
13.
</body></html>
Although its maybe a bit silly the previous page we made we could put its script part on SharePoint to. Note that it would be a fragment for a normal .aspx based page. .aspx is a complex HTML type on which SharePoint is based, if your interested some informative information can be found
here Well our code only will go inside another aspx page.. kinda cool huh ?... Let us simply just copy from <div id="MyStuff"> ... to ... <input type='button' onclick='changeText()' value='Change Text'/> And save that as a new file myfirst.js Notice that is actually a bit more then only <script> code since some text before and after the <script...> tags is also used, but that's OK, Sharepoint wont complain about it. As SharePoint wil just thread it like a part of its own page. I'm a lazy writer, so to add our peace of code to a page follow this guys article, but note that your file is not text.txt like in his example. Also note that he uses the "Site Assets library" to store the script. Well it could be anywhere but be sure normal users can only read it.. ! (If your unfamiliar with permissions then read about SharePoint permissions here). Permissions should be properly set as Scripts are powerful and you wouldn't want, someone meshing up your script to create havoc !.
Before we go on lets create some common testing environment.
Now for the Rent list, change a view to include also the socks column, it might be more handy for the moment to not show it as a calendar view. Just a plain list, with created by, title, socktype and price. Now add about 10 calendar items. Try to use different sock bookings for the Rent list title just enter some imagiairy names of people who rent your socks.