Skip to content

Commit 5f91754

Browse files
committed
Added jasny bootstrap extras. GUI X-editable and edit feedback improvement. Now the button edit in job list page goes to manage_job.php page passing job id parameter.
1 parent 088c245 commit 5f91754

File tree

4 files changed

+100
-28
lines changed

4 files changed

+100
-28
lines changed

CHANGES.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
Version 0.4: Ticket listing
1+
Version 0.5: Ticked editing
22
===========================
33
Under development.
44

55
TODOS:
6-
- implement a method in bbkk_base_class that checks $pdo variable connection and $tablename variable. Also some general user error messages, like prepare statement, connection missing, ....
7-
- add checks and documentation comments to nonce library
8-
- check UTF-8 encoding on POST sending data method in Ajax call
9-
- check new job bad answer "save ko" possible error messages on after new job creation
10-
- create time format (I18N) (hh:mm.ss) and insert in job list details
11-
- convert JSON requests on application load to PHP generated data
12-
- implement AJAX call cache
6+
- still nothing
137

14-
*evaluate* -> stackable system messages
8+
9+
10.10.2013
10+
----------
1511

1612

13+
02.10.2013
14+
----------
15+
- moved some css/font libraries. Added jasny bootstrap extras
16+
1717
01.10.2013
1818
----------
1919
- creating job management GUI
@@ -24,6 +24,26 @@ TODOS:
2424
script (such as application.php, manage_job.php and other new ones)
2525
- created manage_job.php file: it will be the GUI/view of job data editing
2626

27+
28+
29+
30+
31+
32+
33+
Version 0.4: Ticket listing
34+
===========================
35+
Completed.
36+
37+
TODOS:
38+
- implement a method in bbkk_base_class that checks $pdo variable connection and $tablename variable. Also some general user error messages, like prepare statement, connection missing, ....
39+
- add checks and documentation comments to nonce library
40+
- check UTF-8 encoding on POST sending data method in Ajax call
41+
- check new-job bad answer "save ko" possible error messages on after new job creation
42+
- create time format (I18N) (hh:mm.ss) and insert in job list details
43+
44+
*evaluate* -> stackable system messages
45+
46+
2747
26.09.2013
2848
----------
2949
- fixed javascript warning on job/upd ajax callback

humans.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ License type: Apache License Version 2.0
3131
License URL: https://raw.github.com/twitter/bootstrap/master/LICENSE
3232
Homepage: http://twitter.github.com/bootstrap/
3333

34+
Library: Bootstrap - edited by Jasney
35+
License type: Apache License Versione 2.0
36+
License URL: http://www.apache.org/licenses/LICENSE-2.0
37+
Homepage: http://jasny.github.io/bootstrap/
38+
3439
Library: Bootstrap Editable
3540
License type:
3641
License URL:
@@ -41,6 +46,10 @@ License type:
4146
License URL:
4247
Homepage: http://silviomoreto.github.io/bootstrap-select/
4348

49+
Library: Messenger
50+
License: https://github.com/HubSpot/messenger/blob/master/LICENSE
51+
Homepage: https://github.com/HubSpot/messenger
52+
4453
Library: Normalize
4554
License:
4655
Homepage:

js/application.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ function jom_init(dateformat) {
179179
else
180180
// EDIT
181181
if ( $(this).hasClass("jom_edit_btn") && !is_deleted ) {
182-
alert("Edit implementation in Version 0.5");
182+
window.location.href = "./manage_job.php?j=" + id_job;
183+
return; // code flow will not reach this
183184
}
184185
else
185186
// DELETE/UNDELETE

manage_job.php

Lines changed: 60 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
'is_final' => $value[ $tbl_name . '_is_final'] );
6161
}
6262

63+
64+
65+
66+
$job_id = post_or_get('j');
67+
68+
6369
?>
6470
<!DOCTYPE HTML>
6571
<html>
@@ -84,7 +90,7 @@
8490
<script language="javascript" type="text/javascript" src="./js/lib/bootstrap-select.min.js"></script>
8591
<script language="javascript" type="text/javascript" src="./js/lib/prettyCheckable.js"></script>
8692
<script language="javascript" type="text/javascript" src="./js/lib/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>
87-
93+
<!-- JoM libraries -->
8894
<script language="javascript" type="text/javascript" src="./js/generic_lib.js"></script>
8995
<title>***</title>
9096
<script>
@@ -108,6 +114,24 @@
108114
}
109115
}
110116
};
117+
118+
// edit pencil icon show/hide
119+
$(".jom__edit_field").css("opacity", "0");
120+
$(".jom__job_editable").on("mouseenter", function(){
121+
//$(this).find(".jom__edit_field").css("visibility", "visible");
122+
//$(this).find(".jom__edit_field").hide();
123+
//$(this).find(".jom__edit_field").fadeIn('fast');
124+
$(".jom__edit_field").css("opacity", "0");
125+
$(this).parent().find(".jom__edit_field").animate({opacity: 1}, {duration: 300});
126+
});
127+
$(".jom__job_editable").parent().on("mouseleave", function(){
128+
//$(this).find(".jom__edit_field").css("visibility", "hidden");
129+
$(this).find(".jom__edit_field").animate({opacity: 0}, {duration: 200});
130+
});
131+
132+
// x-editable code
133+
$.fn.editable.defaults.mode = 'popup';
134+
$(".jom__job_editable").editable();
111135
});
112136
</script>
113137
<style>
@@ -147,38 +171,43 @@
147171

148172

149173
<!-- JOB DATA -->
174+
<!-- SUBJECT AND CODE -->
150175
<div class="row">
151176
<div class="span1 offset3 text-right">
152-
<i class="icon-pencil icon-white"></i> <span class="label label-info">#12</span>
177+
<i class="icon-pencil icon-white jom__edit_field"></i> <a href="#" class="label label-info jom__job_editable">#12</a>
153178
</div>
154179
<div class="span9" style="padding-bottom: 5px;">
155-
<i class="icon-pencil icon-white"></i> <span style="font-size: 1.6em;">nome/titolo job</span>
180+
<i class="icon-pencil icon-white jom__edit_field"></i> <a href="#" class="jom__job_editable" style="font-size: 1.6em;">nome/titolo job</a>
156181
</div>
157182
</div>
158-
<div class="row">
183+
184+
<!-- BASIC DATA -->
185+
<div class="row jom__job_basic_data">
159186
<div class="span8 offset4" style="border-top: 1px solid #AFAFAF;">
160187
<h4 style="padding-left: 0.9em;">Basic data</h4>
161188
<dl class="dl-horizontal">
162189
<dt>description</dt>
163-
<dd><i class="icon-pencil icon-white"></i> descrizione</dd>
190+
<dd><i class="icon-pencil icon-white jom__edit_field"></i> <a href="#" class="jom__job_editable" data-type="textarea" data-placement="bottom"> descrizione</a></dd>
164191
<br>
165192
<dt>status</dt>
166-
<dd><i class="icon-pencil icon-white"></i> just created</dd>
193+
<dd><i class="icon-pencil icon-white jom__edit_field"></i> <a href="#" class="jom__job_editable">just created</a></dd>
167194
<dt>priority</dt>
168-
<dd><i class="icon-pencil icon-white"></i> high</dd>
195+
<dd><i class="icon-pencil icon-white jom__edit_field"></i> <a href="#" class="jom__job_editable">high</a></dd>
169196
<dt>assigned to</dt>
170-
<dd><i class="icon-pencil icon-white"></i> me</dd>
197+
<dd><i class="icon-pencil icon-white jom__edit_field"></i> me</dd>
171198
<br>
172199
<dt>started</dt>
173-
<dd><i class="icon-pencil icon-white"></i> 23 Settembre 2013</dd>
200+
<dd><i class="icon-pencil icon-white jom__edit_field"></i> 23 Settembre 2013</dd>
174201
<dt>category</dt>
175-
<dd><i class="icon-pencil icon-white"></i> IT issue</dd>
202+
<dd><i class="icon-pencil icon-white jom__edit_field"></i> IT issue</dd>
176203
<dt>issue</dt>
177-
<dd><i class="icon-pencil icon-white"></i> printer unavailable</dd>
204+
<dd><i class="icon-pencil icon-white jom__edit_field"></i> printer unavailable</dd>
178205
</dl>
179206
</div>
180207
</div>
181-
<div class="row">
208+
209+
<!-- ADD NOTES AND FILES -->
210+
<div class="row jom__job_notes_and_files">
182211
<div class="span8 offset4" style="border-top: 1px solid #AFAFAF;">
183212
<h4 style="padding-left: 0.9em;">Add notes and files</h4>
184213
<form class="form-inline" style="margin-left: 1.8em;">
@@ -195,14 +224,27 @@
195224
</form>
196225
</div>
197226
</div>
198-
<div class="row">
227+
228+
<!-- HISTORY -->
229+
<div class="row jom__job_history">
199230
<div class="span8 offset4" style="border-top: 1px solid #AFAFAF;">
200231
<h4 style="padding-left: 0.9em;">History</h4>
201-
<span class="label label-info" style="margin-left: 1.8em;">notes</span> <span class="label label-info">changes</span>
202-
<dl class="dl-horizontal">
203-
<dt><i class="icon-remove"></i> 27/10/2013 - 09:34</dt> <dd>creata attività</dd>
204-
<dt><i class="icon-remove"></i> 28/10/2013 - 15:49</dt> <dd>creata attività</dd>
205-
</dl>
232+
<span class="label label-info" style="margin-left: 1.8em;">notes</span>
233+
<span class="label label-info" style="box-shadow: 1px 1px 3px #000000;">changes</span>
234+
<dl class="dl-horizontal">
235+
<dt><i class="icon-remove"></i> 27/10/2013 - 09:34</dt> <dd>creata attività</dd>
236+
<dt><i class="icon-remove"></i> 28/10/2013 - 15:49</dt> <dd>creata attività</dd>
237+
</dl>
238+
</div>
239+
</div>
240+
241+
<!-- FILES -->
242+
<div class="row jom__job_files">
243+
<div class="span8 offset4" style="border-top: 1px solid #AFAFAF;">
244+
<h4 style="padding-left: 0.9em;">Files and documents</h4>
245+
<dl class="dl-horizontal">
246+
<dt><i class="icon-remove"></i> uploaded 27/10/2013 - 09:34</dt> <dd><a href="">creata attività</a></dd>
247+
</dl>
206248
</div>
207249
</div>
208250

0 commit comments

Comments
 (0)