Permalink
Browse files

Bug in Calendar: narrow Friday shifts

  • Loading branch information...
1 parent ecaa5fb commit 86159704c2fa08ea054bd262ec8bd6615ec6e117 @Michieljoris committed Mar 2, 2014
Showing with 14,179 additions and 1,517 deletions.
  1. +14 −14 _attachments/devlocal.html
  2. +3 −1 _attachments/js/databases/pouchDB.js
  3. +25 −9 _attachments/js/views/calendar.js
  4. +5 −5 _attachments/js/views/timesheet/isc_multicap_timesheet.js
  5. +15 −7 _attachments/js/views/timesheet/multicap_timesheet_contract_raphael.js
  6. +1 −0 _attachments/lib/isomorphic/system/modules-debug
  7. 0 ...ments/lib/isomorphic/system/{modules/ISC_Calendar_flymake.js → modules.orig/ISC_Calendar.js.orig}
  8. +298 −0 _attachments/lib/isomorphic/system/modules.orig/ISC_Calendar_flymake.js
  9. +286 −0 _attachments/lib/isomorphic/system/modules.orig/ISC_Containers.js
  10. +2,906 −0 _attachments/lib/isomorphic/system/modules.orig/ISC_Core.js
  11. +2,201 −0 _attachments/lib/isomorphic/system/modules.orig/ISC_DataBinding.js
  12. +2,146 −0 _attachments/lib/isomorphic/system/modules.orig/ISC_Forms.js
  13. +737 −0 _attachments/lib/isomorphic/system/modules.orig/ISC_Foundation.js
  14. +2,824 −0 _attachments/lib/isomorphic/system/modules.orig/ISC_Grids.js
  15. +194 −127 _attachments/lib/isomorphic/system/modules/ISC_Calendar.js
  16. +25 −0 _attachments/lib/isomorphic/system/modules/ISC_ClassBrowser.js
  17. +36 −35 _attachments/lib/isomorphic/system/modules/ISC_Containers.js
  18. +365 −299 _attachments/lib/isomorphic/system/modules/ISC_Core.js
  19. +28 −0 _attachments/lib/isomorphic/system/modules/ISC_DSBrowser.js
  20. +268 −212 _attachments/lib/isomorphic/system/modules/ISC_DataBinding.js
  21. +362 −0 _attachments/lib/isomorphic/system/modules/ISC_Drawing.js
  22. +31 −0 _attachments/lib/isomorphic/system/modules/ISC_EBay.js
  23. +401 −335 _attachments/lib/isomorphic/system/modules/ISC_Forms.js
  24. +44 −34 _attachments/lib/isomorphic/system/modules/ISC_Foundation.js
  25. +499 −436 _attachments/lib/isomorphic/system/modules/ISC_Grids.js
  26. +75 −0 _attachments/lib/isomorphic/system/modules/ISC_History.js
  27. +23 −0 _attachments/lib/isomorphic/system/modules/ISC_Kapow.js
  28. +39 −0 _attachments/lib/isomorphic/system/modules/ISC_PluginBridges.js
  29. +104 −0 _attachments/lib/isomorphic/system/modules/ISC_RichTextEditor.js
  30. +30 −0 _attachments/lib/isomorphic/system/modules/ISC_SQLBrowser.js
  31. +46 −0 _attachments/lib/isomorphic/system/modules/ISC_SalesForce.js
  32. +32 −0 _attachments/lib/isomorphic/system/modules/ISC_Scheduler.js
  33. +105 −0 _attachments/lib/isomorphic/system/modules/ISC_Workflow.js
  34. +1 −1 _attachments/lib/utils.js
  35. +1 −1 _attachments/manifest.appcache
  36. +4 −0 _attachments/version.html
  37. +5 −1 couchapp_help.txt
View
@@ -97,20 +97,20 @@
<!-- //this debug version of the isc files gets me a spinner for -->
<!-- datasource access.. -->
<!-- TODO: you should use chrome source maps to ease debugging.. -->
- <!-- <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Core.js></SCRIPT> -->
- <!-- <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Foundation.js></SCRIPT> -->
- <!-- <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Containers.js></SCRIPT> -->
- <!-- <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Grids.js></SCRIPT> -->
- <!-- <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Forms.js></SCRIPT> -->
- <!-- <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_DataBinding.js></SCRIPT> -->
- <!-- <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Calendar.js></SCRIPT> -->
- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Core.js></SCRIPT>
- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Containers.js></SCRIPT>
- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Grids.js></SCRIPT>
- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Forms.js></SCRIPT>
- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
+ <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Core.js></SCRIPT>
+ <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Foundation.js></SCRIPT>
+ <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Containers.js></SCRIPT>
+ <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Grids.js></SCRIPT>
+ <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Forms.js></SCRIPT>
+ <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_DataBinding.js></SCRIPT>
+ <SCRIPT SRC=lib/isomorphic/system/modules-debug/ISC_Calendar.js></SCRIPT>
+ <!-- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Core.js></SCRIPT> -->
+ <!-- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Foundation.js></SCRIPT> -->
+ <!-- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Containers.js></SCRIPT> -->
+ <!-- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Grids.js></SCRIPT> -->
+ <!-- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Forms.js></SCRIPT> -->
+ <!-- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> -->
+ <!-- <SCRIPT SRC=lib/isomorphic/system/modules/ISC_Calendar.js></SCRIPT> -->
<!-- Eventually concat all ISC files -->
<!-- <SCRIPT SRC=lib/isomorphic/system/modules/ISC.js></SCRIPT> -->
@@ -224,7 +224,9 @@ define
case 'enum':
try {
obj[k] = JSON.parse(obj[k]);
- } catch(e) { console.log('Failed to parse field ' + k + ' of ' , obj); }
+ } catch(e) {
+ // console.log('Failed to parse field ' + k + ' of ' , obj);
+ }
break;
case 'time' :
case 'date' :
@@ -28,14 +28,15 @@ define
eventSnapGap: 15, //only works with a refresh
workdayStart: '6:00am',
workdayEnd: '10:00pm',
- currentViewName: 'day', //day, week or month
+ currentViewName: 'week', //day, week or month
chosenDate: new Date(),
person: { ids: [], idsString: '', names: '' },
location: { ids: [], name: ''}
}
,init: function() {
var dataSource = View.getBackend().getDS();
calendar.setDataSource(dataSource);
+
// setCssClasses();
personForm.getField('person').setOptionDataSource(dataSource);
locationForm.getField('location').setOptionDataSource(dataSource);
@@ -47,13 +48,16 @@ define
state.currentViewName = calendar.getCurrentViewName();
}
,set: function(state) {
- log.d('Calendar is being set!!!');
+ log.d('Calendar is being set!!!', state);
+ // state.workdayStart = state.workDayStart.getHours() + ':' +
+ // state.dayStart.getMinutes();
+ // state.workdayEnd = state.workDayEnd.getHours() + ':' +
+ // state.dayEnd.getMinutes();
// calendar.workdayStart = state.dayStart;
// calendar.workdayEnd = state.dayEnd;
var person = state.person, location = state.location;
- calendar.setChosenDate(new Date(state.chosenDate));
- calendar.setCurrentViewName(state.currentViewName);
+ // calendar.setCurrentViewName(state.currentViewName);
personForm.setValue('person', person.ids);
personForm.setValue('availableOnly', state.availableOnly);
locationForm.setValue('location', location.ids);
@@ -70,6 +74,9 @@ define
// }
// else calendar.setCriteria(criteria);
setDayCss(state);
+ setTimeout(function() {
+ calendar.setChosenDate(new Date(state.chosenDate));
+ }, 0);
// isc_ShiftCalendar_previousButton.setLeft(isc_ShiftCalendar_previousButton.left + 20);
// isc_ShiftCalendar_nextButton.setLeft(isc_ShiftCalendar_nextButton.left + 20);
@@ -84,30 +91,38 @@ define
backend.get().getDoc(state.location.ids[0]).when(
function(location) { log.d("One location picked, setting calendar night shade");
log.d(location.dayStart, location.dayEnd);
+ calendar.showWorkday = true;
var dayStart = location.dayStart;
var dayEnd = location.dayEnd;
if (dayEnd.getHours() === 0)
dayEnd.addMinutes(-1);
if ((dayStart.getHours() + dayStart.getMinutes()/60) >
- (dayEnd.getHours() + dayEnd.getMinutes()/60)) {
+ (dayEnd.getHours() + dayEnd.getMinutes()/60)) {
calendar.workdayStart = '0am';
calendar.workdayEnd = '23:59';
}
else {
- calendar.workdayEnd = dayEnd;
- calendar.workdayStart = dayStart;
+ calendar.workdayStart = dayStart.getHours() + ':' + dayStart.getMinutes();
+ calendar.workdayEnd = dayEnd.getHours() + ':' + dayEnd.getMinutes();
}
// calendar.workdayStart = '10am';
// calendar.workdayEnd = '6pm';
+
+ calendar.scrollToWorkday = true;
+ // calendar.chosenDate = new Date(state.chosenDate);
+
+ console.log('STATESTATESTATE', calendar);
calendar.redraw();
+
}
,function(value) { log.d('Error', value); }
);
}
else {
setTimeout(function() {
calendar.workdayStart = '0am';
- calendar.workdayEnd = '23:59';
+ calendar.workdayEnd = '23:59pm';
+ // calendar.showWorkday = false;
calendar.redraw();
}, 0);
}
@@ -403,7 +418,7 @@ define
persons.forEach(function(p) {
var fg = p.colorFg ? p.colorFg : 'black';
var bg = p.colorBg ? p.colorBg : 'f0f8ff';
- log.d('setting css classes' , p._id, fg, bg);
+ // log.d('setting css classes' , p._id, fg, bg);
utils.createCSSClass('.eventColor' + p._id,
'background-color:' + bg +
'; color:' + fg + ';');
@@ -440,6 +455,7 @@ define
// ,fetchMode: 'paged'
// ,showControlsBar : false
// ,eventWindowStyle: 'eventWindow'
+ ,currentViewName: 'week'
,eventOverlapIdenticalStartTimes: true
,eventOverlap:false
,firstDayOfWeek: 6
@@ -17,13 +17,13 @@ define
var timesheet;
function setData(state) {
- log.d('WHAT IS STATE?', state);
+ // log.d('WHAT IS STATE?', state);
fetchShifts(state.person, state.location, state.fortnight, process);
}
function process(data) {
- log.d('IN PROCESS');
+ // log.d('IN PROCESS');
var person = data.person;
function showSheet(aTimesheet) {
timesheet = aTimesheet;
@@ -53,14 +53,14 @@ define
alert('Can\'t create the timesheet. Is ' + person._id + ' casual or on contract? ');
return;
}
- log.d("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF");
+ // log.d("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF");
}
function printDiv(type)
{
- log.d('TYPE',type);
+ // log.d('TYPE',type);
var divToPrint=document.getElementById('timesheet' + type);
var newWin= window.open("");
newWin.document.write(divToPrint.outerHTML);
@@ -81,7 +81,7 @@ define
// call superclass method to draw, then have
// timesheet canvas draw itself
draw : function () {
- log.d('drawing............................');
+ // log.d('drawing............................');
if (!this.readyToDraw()) return this;
this.Super("draw", arguments);
this.timesheet.draw("timesheet" + this.timesheet.type);
@@ -20,6 +20,13 @@ define
grid: []
};
+// Logo needs to be on left top side of page
+
+// Beside block at top (t/Sheet Perm Employee - Disability Employee) should go PERMANENT EMPLOYEES ONLY
+
+// Under Excursion Allowance - shd be another line - ADDITIONAL COMMENTS
+
+// Bottom shd read Employee Signature not Employee"s Signature and Supervisor's Signature not Manager"s Signature
//Dimensions:
var portWidth = 950
@@ -30,7 +37,7 @@ define
,totalBoxWidth = 120
,topRows = 4
,gridColumns =14
- ,gridRows = 27
+ ,gridRows = 28
,bottomRows = 4
,rows = topRows + gridRows + bottomRows
,gxs = Math.floor((portWidth-labelBoxWidth-totalBoxWidth)/gridColumns)
@@ -76,6 +83,7 @@ define
// ,{ title: 'PUBLIC HOL WORK 2.5', name: 'publicHolWork2p5' }
,{ title: '*SLEEP OVER 8 HRS', name: 'sleepOver' }
,{ title: '*EXCURSION ALLOWANCE', name: 'awayFromBase' }
+ ,{ title: '*ADDITIONAL COMMENTS', name: 'additionalComments' }
,{ title: '*ADMIN HOURS USED', name: 'adminHoursUsed' }
,{ title: '*DISTURBED SLEEP HOURS', name: 'disturbedSleepHours' }
]
@@ -88,10 +96,10 @@ define
,line1Pos = [0,data1.name, 35, data1.payrollNumber, 67, data1.phone, 100]
,line2 = [ 'FULLTIME:', '', 'PART TIME:','', 'DSW EA LEVEL:','', 'HIGHER DUTIES LEVEL:','', 'PERIOD ENDING:','']
- ,data2 = {permanent:6.5, 'parttime':15, dswCALevel: 44.5, dsw2:62.3, ending:77}
+ ,data2 = {permanent:6.5, 'parttime':15, dswCALevel: 44.5, dsw2:62.3, ending:78}
,line2Pos = [0,data2.fulltime, 8, data2.parttime, 35, data2.dsw, 48, data2.dsw2, 67, data2.ending, 102]
- ,employeeSign = ['EMPLOYEE"S SIGNATURE:_____________________________________________________ DATE:_____________']
- ,managerSign = ['MANAGER"S SIGNATURE:______________________________________________________ DATE:_____________']
+ ,employeeSign = ["EMPLOYEE SIGNATURE:_____________________________________________________ DATE:_____________"]
+ ,managerSign = ["SUPERVISOR'S SIGNATURE:______________________________________________________ DATE:_____________"]
// ,line5 = 'PLEASE NOTE ALL HOURS TO BE IN 24 HOUR TIME'
,days = ['SAT', 'SUN', 'MON', 'TUES', 'WED', 'THURS', 'FRI' ]
,totalHours = 'TOTAL HOURS'
@@ -110,7 +118,7 @@ define
function drawTopLines() {
for (var i = 0; i< line1.length; i++) {
text(line1[i],
- { x: line1Pos[i] * unit, y : ys *2, h: ys*1, w: line1Pos[i+1]* unit },{align: 'start'},
+ { x: line1Pos[i] * unit, y : ys *2 + 5, h: ys*1, w: line1Pos[i+1]* unit },{align: 'start'},
{weight: 'bold'});
}
for (i = 0; i< line2.length; i++) {
@@ -205,7 +213,7 @@ define
var element;
if (dataCells[key]) dataCells[key].remove();
if (data1[key]) {
- element = text(value, { x: data1[key] * unit, y : ys *2, h: ys*1, w: 999 },{align: 'start'},
+ element = text(value, { x: data1[key] * unit, y : ys *2 + 5, h: ys*1, w: 999 },{align: 'start'},
{weight: 'normal'});
}
else if (data2[key]) {
@@ -379,7 +387,7 @@ define
// cont();
// setFields({name: 'hello'});
// paper.image("images/multicap_logo.png", 820,0,120,60);
- paper.image(myimage, 820,0,120,60);
+ paper.image(myimage, 0,0,100,45);
// text("Multicap",
// {x:0, y: 0,
// w: 100, h: ys*2},
Oops, something went wrong.

0 comments on commit 8615970

Please sign in to comment.