Posts

Showing posts from June, 2013

Create Validation for JQuery UI DatePicker exapmle

BresleveloperNS :http://bresleveloper.blogspot.co.il/2013/06/my-extenxtion-javascript-namespace.html   BresleveloperNS = BresleveloperNS || {}; BresleveloperNS.ValidateDatePicker = function (dateSelector, errorMsg) {   $(dateSelector).blur( function () {     BresleveloperNS.ValidateDatePicker_ValidateHandler( this , errorMsg);   }); } BresleveloperNS.ValidateDatePicker_All = function (errorMsg) {   $( ".hasDatepicker" ).blur( function () {     BresleveloperNS.ValidateDatePicker_ValidateHandler( this , errorMsg);   }); } BresleveloperNS.ValidateDatePicker_ValidateHandler = function (dateSelector, errorMsg) {   var txtDate = dateSelector.val();   var isTxtDateValid = true ;   var dateFormat = $(dateSelector).datepicker( "option" , "dateFormat" );   try {     txtDate = $.datepicker.parseDate(dateFormat, txtDate);   }   catch ...

Firefox - Make New Session

IT CAN BE DONE!! you need to clear the cookies. i do it by the developers bundle add-on, cookies, Delete all 3 Domain/Path/Session Cookies

BresleveloperNS - My Javascript Namespace

*NOTE - I will update this as possible, so plz send my any suggestions to improve or make it more generic. you can either download the entire JS file or scroll down and look for what you need https://skydrive.live.com/redir?resid=949DC4EDBFFD4738!189&authkey=!ABZCTBTTOCDYGhk Functions Summery Inside :D the functions: FileUpload_LimitTypes: create validation for a fileupload. can work with server check. getQStringParameterByName: as it sais. Alert: a JQuery modal to function as a standard alert Confirm: a JQuery modal to function as a standard confirm with callbacks to operate afterwards ValidateDatePicker: create validation on a datepicker for mindate, maxdate and dateformat. ValidateDatePicker_All: as above but for all datepickers on page PaginateTables: create a real and complete pagination for an html table 

Jquery UI Modal Dialog Confirmation, Return Value

well lets start by the fact that u cant, the modal is a void, it doent return anything. but then again god gave the JS creators the though to give us Callbacks!! problems solved! just make ur "big" function a 2-3-x part. lets start with the confirm code, I did it very generic and u can always add/remove:   function custom_confirm(output_msg, title_msg, okBtnText, cancelBtnText, ok_callback, cancel_callback) {   if (!title_msg)       title_msg = 'Alert' ;   $( "<div></div>" ).html(output_msg).dialog({       title: title_msg,       resizable: false ,       modal: true ,       buttons: [{            text: okBtnText,           click: function () {       ...

Being a Developer - a sad story

background - today i am developing on Sharepoint 2013, and a very important note is that is a Microsoft platform that didnt got yet its SP1, and VS2012 and i dont know if it has SP1 yet, i think not. i left yesterday leaving everything running superb, came today and bang - error everywhere and nothing works. to the optimistics i'll say i am running my own virtual machine on my machine so nobody has touched it period. so with SP when you develop something in VS you need to deploy everything to the IIS and other directories (sometimes build is enough). by doing that the deployment has failed, missing some file that is there, existing. after iisreset, reopen VS, restarting the machine, he then decided that the missing file is another file. i morally failed and call my team leader that, after deep investigations just started to cut in the web.config all the references to this dll until the back of SP finnally opened, to the non-SP devs its a webpage of configuration...

Important Links

outlook http://msdn.microsoft.com/en-us/library/ms268731(v=vs.80).aspx

Sharepoint Genesis how to create basic lists Tutorial and example

1 - make your Fields: /// <summary> /// My Field /// </summary> [ SPGENField ( ID = "{copy paste a guid here}" , StaticName = "MyFieldName" , InternalName = "MyFieldName" , DisplayName = "$Resources:MyResource,Field_MyFieldName_DisplayName;" , Type = SPFieldType .Text, Group = "$Resources:BoiModel,FieldGroup_MySite_Title;" , Required = false )] public class MyFieldName : SPGENField < MyFieldName , SPFieldNumber , string >{} 2 - make your Content Type: /// <summary> /// My Content Type /// </summary> [ SPGENContentType ( ID = "0x0100574F3398A6A141B4A6E0F56CF5B58C1B => this is from http://spgenesis.codeplex.com/wikipage?title=Content%20type" , Name = "$Resources:MySiteModel,ContentType_MySite_Name;" , Group = "$Resources:MySiteModel,Group_MySiteContentTypes" )] public class MyContentType : SPGENContentType < MyCo...