This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function heightDetect() { | |
| $(".main_head").css("height", $(window).height()); | |
| }; | |
| heightDetect(); | |
| $(window).resize(function(){ | |
| heightDetect(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $("body").on("click", ".edit-job", function(){ | |
| //validation for all fields | |
| var valid = true; | |
| $('#form-with-customs input').each( function(){ | |
| if($.trim($(this).val()) == ''){ | |
| valid = false; | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //gist work with time | |
| $res = $this->dbAdapter->query("SELECT location FROM users WHERE user_id=:user_id")->execute([ | |
| ':user_id'=>$user_id, | |
| ])->getResource()->fetchAll(); | |
| if(!empty($res)){ | |
| $loc = $res[0]['location']; | |
| } | |
| if(!empty($loc)){ | |
| if($loc == 'Toronto'){ | |
| $x = array('18900','36000'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $res = $this->dbAdapter->query("SELECT location FROM users WHERE user_id=:user_id")->execute([ | |
| ':user_id'=>$user_id, | |
| ])->getResource()->fetchAll(); | |
| if(!empty($res)){ | |
| $loc = $res[0]['location']; | |
| } | |
| if(!empty($loc)){ | |
| if($loc == 'Toronto'){ | |
| $x = array(18900, 36000); | |
| //count time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ->execute()->getResource()->fetchAll(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| $(document).ready(function(){ | |
| //cycle | |
| $(document).find(".na td").each(function () { | |
| //the element length which == 0 | |
| var len = $(this).html().trim().length; | |
| if(len == 0) { | |
| //do something | |
| $(this).text("N/A"); | |
| $(this).css("background","red"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| //Clock | |
| var clock; | |
| clock = $('.clock').FlipClock({ | |
| clockFace: 'TwelveHourClock', | |
| showSeconds: false | |
| }); | |
| //Set Punch In | |
| $(document).on('click', '#punch_in', function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ->execute() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $from_time = strtotime($from_date); | |
| $to_time = strtotime($to_date); | |
| $difference = round(abs($to_time - $from_time) / 60); degree on 60 it converts all in minutes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //This ajax query is in getpunchtotal.phtml and call /application/index/getpunchadmin view and send user_id and data for | |
| //getpunchadminAction, and that in turn returns. | |
| $('.show-hide').click(function () { | |
| event.preventDefault(); | |
| var link = $(this); | |
| var icon = link.find('span'); | |
| var table = link.next('table'); | |
| var user_id = link.attr('data-user_id'); | |
| if (icon.hasClass('glyphicon-plus')) { | |
| icon.addClass('glyphicon-minus').removeClass('glyphicon-plus'); |
OlderNewer