﻿//**************************************************************//

//This file has been merged with update_diary.js

//*************************************************************//
//$(document).ready(function() {
//    //variables that store watermark values for each controls
//    
//    var watermarkDate = "dd/mm/yyyy";
//    var watermarkDiaryDate = "dd/mm/yyyy";
//    var watermarkUpdateEntry = "your thoughts (maximum 250 characters)";
//    
//    if ($("#UpdateActivity_ActivityDate").val() == "") {
//       $("#UpdateActivity_ActivityDate").val(watermarkDate);
//    }
//    $("#UpdateActivity_ActivityDate").focus(function() {
//        if (this.value == watermarkDate) {
//            this.value = "";
//            removeWatermarkStyleFromActivityDate();
//        }
//        //when the contorl loss focus check whether there has been an entry
//        //in no entry made by the user assign the watermark to the control
//    }).blur(function() {
//        if (this.value == "") {
//            this.value = watermarkDate;
//            addWatermarkStyleToActivityDate()
//        }
//    });
//    
// 
//    if ($("#UpdateActivity_DiaryDate").val() == "") {
//       $("#UpdateActivity_DiaryDate").val(watermarkDiaryDate);
//    }
//    $("#UpdateActivity_DiaryDate").focus(function() {
//        if (this.value == watermarkDiaryDate) {
//            this.value = "";
//            removeWatermarkStyleFromDiaryDate();
//        }
//        //when the contorl loss focus check whether their has been an entry
//        //in no entry made by the user assign the watermark to the control
//    }).blur(function() {
//        if (this.value == "") {
//            this.value = watermarkDiaryDate;
//            addWatermarkStyleToDiaryDate()
//        }
//    });
//    
//     if ($("#UpdateActivity_UpdateEntry").val() == "") {
//       $("#UpdateActivity_UpdateEntry").val(watermarkUpdateEntry);
//    }
//    $("#UpdateActivity_UpdateEntry").focus(function() {
//        if (this.value == watermarkUpdateEntry) {
//            this.value = "";
//            removeWatermarkStyleFromUpdateEntry()
//        }
//        //when the contorl loss focus check whether their has been an entry
//        //in no entry made by the user assign the watermark to the control
//    }).blur(function() {
//        if (this.value == "") {
//            this.value = watermarkUpdateEntry;
//            addWatermarkStyleToUpdateEntry()
//        }
//    });
//    
//    
//});

//function removeWatermarkStyleFromActivityDate()
//{
//    var ctrl = document.getElementById("UpdateActivity_ActivityDate");
//    if (ctrl == null)return;
//    ctrl.className ="date-pick dp-applied";
//}
//function addWatermarkStyleToActivityDate()
//{
//    var ctrl = document.getElementById("UpdateActivity_ActivityDate");
//    if (ctrl == null)return;
//    ctrl.className ="date-pick dp-applied watermark";
//}
//function removeWatermarkStyleFromDiaryDate()
//{
//    var ctrl = document.getElementById("UpdateActivity_DiaryDate");
//    if (ctrl == null)return;
//    ctrl.className ="date-pick dp-applied";
//}
//function addWatermarkStyleToDiaryDate()
//{
//    var ctrl = document.getElementById("UpdateActivity_DiaryDate");
//    if (ctrl == null)return;
//    ctrl.className ="date-pick dp-applied watermark";
//}
//function removeWatermarkStyleFromUpdateEntry()
//{
//    var ctrl = document.getElementById("UpdateActivity_UpdateEntry");
//    if (ctrl == null)return;
//    ctrl.className ="expanding";
//}
//function addWatermarkStyleToUpdateEntry()
//{
//    var ctrl = document.getElementById("UpdateActivity_UpdateEntry");
//    if (ctrl == null)return;
//    ctrl.className ="expanding watermark";
//}