diff --git a/.gitignore b/.gitignore index 2c0568a588f2c2759a62bc94151c0597f8c09abe..b5c98c948d9c2eb75df122268b315b29f15a9e93 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ php53.cgi include/ost-config.php *.sw[a-z] .DS_Store +.vagrant +Vagrantfile diff --git a/assets/default/about-custom-themes.md b/assets/default/about-custom-themes.md new file mode 100644 index 0000000000000000000000000000000000000000..eecf1bbbed3d3002d3d4abe686f8ec6d82717094 --- /dev/null +++ b/assets/default/about-custom-themes.md @@ -0,0 +1,14 @@ +Customizng Your Theme +==== + +When modifying the default theme, it is recommended that you do not +edit the CSS files directly. Instead, you should use the included +LESS files and recompile the CSS file with your edits. + +Even if you decide to edit the CSS directly, we recommend that you +keep the LESS files, so that you can quickly rebuild the default +theme should you need to recover it, or for upgrade purposes. + +*Please do not submit any CSS edits to the official branch, unless +they are done within the LESS files.* + diff --git a/assets/default/css/print.css b/assets/default/css/print.css index 9f1c25746ca0486d2524e24ea850b1d2ffcd9e6c..aca3d50f9265e03c3a95d5a5dbbe78aa891b0a21 100644 --- a/assets/default/css/print.css +++ b/assets/default/css/print.css @@ -1,29 +1 @@ -#header, #nav, #meta, #footer, #reply, #pagination, .reload, .refresh, form, .thread, hr, #kbAttachments, .back { - display: none; -} - -th { - text-align: left; -} - -a { - color: #000; - text-decoration: none; -} - -caption { - text-align: left; - padding-bottom: 10px; - font-weight: bold; -} - -.message, .response { - border-bottom: 1px solid #000; - margin-bottom: 20px; - padding-bottom: 10px; -} -.message th, .response th { - font-size: 12pt; - font-weight: bold; - padding-bottom: 5px; -} +#header,#nav,#meta,#footer,#reply,#pagination,.reload,.refresh,form,.thread,hr,#kbAttachments,.back{display:none}th{text-align:left}a{color:#000;text-decoration:none}caption{text-align:left;padding-bottom:10px;font-weight:bold}.message,.response{border-bottom:1px solid #000;margin-bottom:20px;padding-bottom:10px}.message th,.response th{font-size:12pt;font-weight:bold;padding-bottom:5px} \ No newline at end of file diff --git a/assets/default/css/theme.css b/assets/default/css/theme.css index b59f6af8955857d2008dff647e8e4d83d4924e72..206cbe9fd0eb86d67fa1d16abae23e9a49aab9ca 100644 --- a/assets/default/css/theme.css +++ b/assets/default/css/theme.css @@ -1,31 +1,29 @@ -/* Based on Normalize.css - with tags we won't use removed. */ html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } - body { margin: 0; font-size: 13px; line-height: 1.231; padding: 0; } - -body, input, select, textarea { +body, +input, +select, +textarea { font-family: sans-serif; color: #000; } - -b, strong { +b, +strong { font-weight: bold; } - blockquote { margin: 1em 40px; } - hr { display: block; height: 1px; @@ -34,119 +32,120 @@ hr { margin: 1em 0; padding: 0; } - small { font-size: 85%; } - -ul, ol { +ul, +ol { margin: 1em 0; padding: 0 0 0 30px; } - img { border: 0; vertical-align: middle; } - form { margin: 0; } - fieldset { border: 0; margin: 0; padding: 0; } - label { cursor: pointer; } - -input, select, textarea { +input, +select, +textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; } - input { line-height: normal; *overflow: visible; } - table input { *overflow: auto; } - -input[type="button"], input[type="reset"], input[type="submit"] { +input[type="button"], +input[type="reset"], +input[type="submit"] { cursor: pointer; -webkit-appearance: button; } - -input[type="checkbox"], input[type="radio"] { +input[type="checkbox"], +input[type="radio"] { box-sizing: border-box; } - input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } - textarea { overflow: auto; vertical-align: top; resize: vertical; } - table { border-collapse: collapse; border-spacing: 0; } - -th, td { +th, +td { vertical-align: top; } - -th { text-align: left; font-weight: normal; } - -h1, h2, h3, h4, h5, h6, form, fieldset { +th { + text-align: left; + font-weight: normal; +} +h1, +h2, +h3, +h4, +h5, +h6, +form, +fieldset { margin: 0; padding: 0; } - /* Typography */ a { color: #0072bc; text-decoration: none; } - h1 { color: #00AEEF; font-weight: normal; font-size: 20px; } - h3 { font-size: 16px; } - h2 { font-size: 16px; color: #999; } - /* Helpers */ -.centered { text-align: center;} - -.clear { clear:both; height: 1px; visibility: none;} - -.hidden { display: none;} - -.faded { color:#666;} - +.centered { + text-align: center; +} +.clear { + clear: both; + height: 1px; + visibility: none; +} +.hidden { + display: none; +} +.faded { + color: #666; +} /* Pagination */ #pagination { border: 0; @@ -161,24 +160,26 @@ h2 { list-style: none; display: inline; } -#pagination a { +#pagination li a { margin-right: 2px; display: block; float: left; padding: 3px 6px; text-decoration: none; } -#pagination a:hover { +#pagination li a:hover { color: #ff0084; } -#pagination .previousOff, #pagination .nextOff { +#pagination .previousOff, +#pagination .nextOff { color: #666; display: block; float: left; font-weight: bold; padding: 3px 4px; } -#pagination .next a, #pagination .previous a { +#pagination .next a, +#pagination .previous a { font-weight: bold; } #pagination .active { @@ -190,16 +191,34 @@ h2 { padding: 3px 6px; text-decoration: none; } - /* Alerts & Notices */ - -#msg_notice { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; margin-bottom: 10px; border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; } - -#msg_warning { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; margin-bottom: 10px; border: 1px solid #f26522; background: url('../images/icons/alert.png') 10px 50% no-repeat #ffffdd; } - -#msg_error { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; margin-bottom: 10px; border: 1px solid #a00; background: url('../images/icons/error.png') 10px 50% no-repeat #fff0f0; } - - +#msg_notice { + margin: 0; + padding: 5px 10px 5px 36px; + height: 16px; + line-height: 16px; + margin-bottom: 10px; + border: 1px solid #0a0; + background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; +} +#msg_warning { + margin: 0; + padding: 5px 10px 5px 36px; + height: 16px; + line-height: 16px; + margin-bottom: 10px; + border: 1px solid #f26522; + background: url('../images/icons/alert.png') 10px 50% no-repeat #ffffdd; +} +#msg_error { + margin: 0; + padding: 5px 10px 5px 36px; + height: 16px; + line-height: 16px; + margin-bottom: 10px; + border: 1px solid #a00; + background: url('../images/icons/error.png') 10px 50% no-repeat #fff0f0; +} .warning { background: #ffc; font-style: italic; @@ -209,19 +228,64 @@ h2 { color: #a00; font-style: normal; } - .error { - color:#f00; + color: #f00; } - .error input { - border:1px solid #f00;} - -/* Main layout */ + border: 1px solid #f00; +} +.button, +.button:visited { + background: #222; + display: inline-block; + font-size: 16px; + padding: 8px 16px 6px 16px; + width: 160px; + text-align: center; + color: #fff; + font-weight: bold; + text-decoration: none; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + cursor: pointer; + font-family: helvetica, arial, sans-serif; +} +.button:hover { + background-color: #111; + color: #fff; +} +.button:active { + top: 1px; + box-shadow: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; +} +.button, +.button:visited, +.green.button, +.green.button:visited { + background-color: #91bd09; +} +.green.button:hover { + background-color: #749a02; +} +.blue.button, +.blue.button:visited { + background-color: #00AEEF; +} +.blue.button:hover { + background-color: #0299d2; +} body { background: url('../images/page_bg.png') top left repeat-x #c8c8c8; } - #container { background: #fff; width: 840px; @@ -230,7 +294,6 @@ body { -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); } - #header { position: relative; height: 71px; @@ -241,7 +304,6 @@ body { height: 71px; float: left; } - #header p { width: 400px; text-align: right; @@ -249,16 +311,15 @@ body { padding: 10px 0; float: right; } - #nav { margin: 0 20px; padding: 2px 10px; height: 20px; background: url('../images/nav_bg.png') top left repeat-x; border-top: 1px solid #aaa; - box-shadow:0 3px 2px rgba(0, 0, 0, 0.4); - -moz-box-shadow:0 3px 2px rgba(0, 0, 0, 0.4); - -webkit-box-shadow:0 3px 2px rgba(0, 0, 0, 0.4); + box-shadow: 0 3px 2px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0 3px 2px rgba(0, 0, 0, 0.4); + -webkit-box-shadow: 0 3px 2px rgba(0, 0, 0, 0.4); } #nav li { margin: 0; @@ -282,7 +343,8 @@ body { background-position: 10px 50%; background-repeat: no-repeat; } -#nav li a.active, #nav li a:hover { +#nav li a.active, +#nav li a:hover { background-color: #dbefff; color: #000; } @@ -305,7 +367,6 @@ body { #nav li a.tickets { background-image: url('../images/icons/tix.png'); } - #content { padding: 20px 0; margin: 0 20px; @@ -313,7 +374,6 @@ body { height: 350px; min-height: 350px; } - #footer { text-align: center; font-size: 11px; @@ -322,7 +382,6 @@ body { #footer a { color: #333; } - #footer p { margin: 10px 0 0 0; } @@ -333,45 +392,23 @@ body { outline: none; text-indent: -9999px; margin: 0 auto; - background: url('../images/poweredby.png?1319571688') top left no-repeat; + background: url('../images/poweredby.png') top left no-repeat; } - -/* Landing page */ #landing_page #new_ticket { margin-top: 40px; width: 295px; padding-left: 75px; float: left; - background: url('../images/new_ticket_icon.png?1319577021') top left no-repeat; -} -#landing_page #new_ticket input[type=submit] { - background: url('../images/open_ticket_btn.png?1319566422') top left no-repeat; + background: url('../images/new_ticket_icon.png') top left no-repeat; } #landing_page #check_status { margin-top: 40px; width: 295px; padding-left: 75px; float: right; - background: url('../images/check_status_icon.png?1319577072') top left no-repeat; -} -#landing_page #check_status input[type=submit] { - background: url('../images/check_status_btn.png?1319571066') top left no-repeat; + background: url('../images/check_status_icon.png') top left no-repeat; } -#landing_page form div { - margin-bottom: 20px; - height: 60px; - min-height: 60px; -} -#landing_page form input[type=submit] { - display: block; - width: 192px; - height: 38px; - border: none; - margin: 0; - padding: 0; - text-indent: -9999px; -} - +/* Landing page FAQ not yet implemented. */ #faq { clear: both; margin: 0; @@ -381,136 +418,129 @@ body { font-size: 15px; margin-left: 0; padding-left: 0; - border-top:1px solid #ddd; + border-top: 1px solid #ddd; } #faq ol li { list-style: none; margin: 0; - padding:0; + padding: 0; color: #999; } #faq ol li a { - display:block; - padding:5px 0; - height:auto !important; - overflow:hidden; - margin:0; - border-bottom:1px solid #ddd; + display: block; + padding: 5px 0; + height: auto !important; + overflow: hidden; + margin: 0; + border-bottom: 1px solid #ddd; line-height: 16px; padding-left: 24px; - background: url('../images/icons/page.png?1319579499') 0 50% no-repeat; + background: url('../images/icons/page.png') 0 50% no-repeat; } #faq ol li a:hover { - background-color:#e9f5ff; + background-color: #e9f5ff; } - -.article-meta { - padding:5px; - background:#fafafa; +#faq .article-meta { + padding: 5px; + background: #fafafa; } - -/* Knowledgebase */ #kb { margin: 2px 0; padding: 5px; overflow: hidden; } - #kb > li { - padding:10px; - height:auto !important; - overflow:hidden; - margin:0; - background:url(../images/kb_category_bg.png) bottom left repeat-x; - border-bottom:1px solid #ddd; -} - -#kb li i { - display:block; - width:32px; - height:32px; - float:left; - margin-right:6px; - background:url(../images/kb_large_folder.png) top left no-repeat; -} - + padding: 10px; + height: auto !important; + overflow: hidden; + margin: 0; + background: url(../images/kb_category_bg.png) bottom left repeat-x; + border-bottom: 1px solid #ddd; +} #kb > li h4 { - padding-bottom:3px; - margin-bottom:3px; + padding-bottom: 3px; + margin-bottom: 3px; } - #kb > li h4 span { - color:#666; + color: #666; } - #kb > li h4 a { font-size: 14px; } - +#kb li i { + display: block; + width: 32px; + height: 32px; + float: left; + margin-right: 6px; + background: url(../images/kb_large_folder.png) top left no-repeat; +} #kb-search { - padding:10px 0; - overflow:hidden; + padding: 10px 0; + overflow: hidden; } - #kb-search div { - clear:both; - overflow:hidden; - padding-top:5px; + clear: both; + overflow: hidden; + padding-top: 5px; } - #kb-search #query { - margin:0; - display:inline-block; - float:left; - width:200px; - margin-right:5px; + margin: 0; + display: inline-block; + float: left; + width: 200px; + margin-right: 5px; } - #kb-search #cid { - margin:0; - display:inline-block; - float:left; - width:200px; - margin-right:5px; - position:relative; - top:2px; -} - + margin: 0; + display: inline-block; + float: left; + width: 200px; + margin-right: 5px; + position: relative; + top: 2px; +} #kb-search #topic-id { - margin:0; - display:inline-block; - float:left; - width:410px; + margin: 0; + display: inline-block; + float: left; + width: 410px; } - #kb-search #searchSubmit { - margin:0; - display:inline-block; - float:left; - position:relative; - top:2px; -} - -#breadcrumbs { + margin: 0; + display: inline-block; + float: left; + position: relative; + top: 2px; +} +#kb-search #breadcrumbs { color: #333; margin-bottom: 15px; } -#breadcrumbs a { +#kb-search #breadcrumbs #breadcrumbs a { color: #555; } - -/* New Ticket & Log In Forms */ -#ticketForm div, #clientLogin div { +#ticketForm div, +#clientLogin div { clear: both; padding: 3px 0; overflow: hidden; } -#ticketForm div label, #clientLogin div label { +#ticketForm div label, +#clientLogin div label { display: block; width: 140px; float: left; } -#ticketForm div input, #ticketForm div textarea, #clientLogin div input, #clientLogin div textarea { +#ticketForm div label.required, +#clientLogin div label.required { + font-weight: bold; + text-align: left; +} +#ticketForm div input, +#clientLogin div input, +#ticketForm div textarea, +#clientLogin div textarea { width: auto; border: 1px solid #aaa; background: #fff; @@ -518,23 +548,40 @@ body { display: block; float: left; } - -#ticketForm div input[type=file] { +#ticketForm div input[type=file], +#clientLogin div input[type=file] { border: 0; } - -#ticketForm div select, #clientLogin div select { +#ticketForm div select, +#clientLogin div select { display: block; float: left; } -#ticketForm td textarea, #clientLogin div textarea { +#ticketForm div div.captchaRow, +#clientLogin div div.captchaRow { + line-height: 31px; +} +#ticketForm div div.captchaRow input, +#clientLogin div div.captchaRow input { + position: relative; + top: 6px; +} +#ticketForm td textarea, +#clientLogin td textarea, +#ticketForm div textarea, +#clientLogin div textarea { width: 600px; } - -#ticketForm td em, #clientLogin div em { +#ticketForm td em, +#clientLogin td em, +#ticketForm div em, +#clientLogin div em { color: #777; } -#ticketForm td .captcha, #clientLogin div .captcha { +#ticketForm td .captcha, +#clientLogin td .captcha, +#ticketForm div .captcha, +#clientLogin div .captcha { width: 88px; height: 31px; background: #000; @@ -542,44 +589,31 @@ body { float: left; margin-right: 20px; } -#ticketForm td label.inline, #clientLogin div label.inline { +#ticketForm td label.inline, +#clientLogin td label.inline, +#ticketForm div label.inline, +#clientLogin div label.inline { width: auto; padding: 0 10px; } - -#ticketTable table tr th { +#ticketForm div.error input, +#clientLogin div.error input { + border: 1px solid #a00; +} +#ticketForm div.error label, +#clientLogin div.error label { + color: #a00; +} +#ticketTable th { width: 160px; font-weight: normal; text-align: left; } - -#ticketForm table th.required, #ticketForm table td.required, #clientLogin div label.required { +#ticketTable th.required, +#ticketTable td.required { font-weight: bold; text-align: left; } - - - -#ticketForm tr.captchaRow, #clientLogin div.captchaRow { - line-height: 31px; -} - -.captchaRow td input, #clientLogin div.captchaRow input { - position: relative; - top: 6px; -} - -#ticketForm div.error input, #clientLogin div.error input { - border: 1px solid #a00; -} -#ticketForm div.error label, #clientLogin div.error label { - color: #a00; -} -#clientLogin p { - clear: both; - text-align: center; -} - #clientLogin { width: 400px; margin-top: 20px; @@ -587,6 +621,10 @@ body { border: 1px solid #ccc; background: url('../images/lock.png?1319655200') 440px 50% no-repeat #f6f6f6; } +#clientLogin p { + clear: both; + text-align: center; +} #clientLogin strong { font-size: 11px; color: #d00; @@ -601,59 +639,89 @@ body { width: 120px; margin-right: 0; } - -/* Ticket List */ +#reply { + margin-top: 20px; + padding: 10px 5px; + background: #f9f9f9; + border: 1px solid #ccc; +} +#reply h2 { + margin-bottom: 10px; +} +#reply table { + width: 800px; +} +#reply table td { + vertical-align: top; +} +#reply textarea { + width: 628px !important; +} +#reply input[type=text], +#reply #response_options textarea { + border: 1px solid #aaa; + background: #fff; +} +#reply .attachments .uploads div { + display: inline-block; + padding-right: 20px; +} +#reply .file { + display: inline-block; + padding-left: 20px; + margin-right: 20px; + background: url('../images/icons/file.gif') 0 50% no-repeat; +} +.uploads { + display: inline-block; + padding-right: 20px; +} +.uploads label { + padding: 3px; + padding-right: 10px; + width: auto !important; +} +/* Ticket icons */ .Icon { width: auto; padding-left: 20px; - background-position: left center; + background-position: top left; background-repeat: no-repeat; color: #006699; text-decoration: none; } - -a.Icon:hover { - text-decoration: underline; -} - .Icon.Ticket { - background: url('../images/icons/ticket.gif?1319654018') 0 0 no-repeat; + background-image: url('../images/icons/ticket.gif'); } - .Icon.webTicket { - background: url('../images/icons/ticket_source_web.gif?1319654283') 0 0 no-repeat; + background-image: url('../images/icons/ticket_source_web.gif'); } - .Icon.emailTicket { - background: url('../images/icons/ticket_source_email.gif?1319654484') 0 0 no-repeat; + background-image: url('../images/icons/ticket_source_email.gif'); } - .Icon.phoneTicket { - background: url('../images/icons/ticket_source_phone.gif?1319654401') 0 0 no-repeat; + background-image: url('../images/icons/ticket_source_phone.gif'); } - .Icon.otherTicket { - background: url('../images/icons/ticket_source_other.gif?1319654433') 0 0 no-repeat; + background-image: url('../images/icons/ticket_source_other.gif'); } - .Icon.attachment { - background-image: url('../images/icons/attachment.gif?1319556657'); + background-image: url('../images/icons/attachment.gif'); } - .Icon.file { - background-image: url('../images/icons/attachment.gif?1319556657'); + background-image: url('../images/icons/attachment.gif'); } - .Icon.refresh { - background-image: url('../images/icons/refresh.gif?1319556657'); + background-image: url('../images/icons/refresh.gif'); } - .Icon.thread { font-weight: bold; font-size: 1em; background-image: url('../images/icons/thread.gif?1319556657'); } - +.Icon:hover { + text-decoration: underline; +} #ticketTable { border: 1px solid #aaa; border-left: none; @@ -688,13 +756,11 @@ a.Icon:hover { #ticketTable tr.alt td { background: #f9f9f9; } - #ticketSearchForm { display: inline-block; float: left; padding: 0 0 5px 0; } - a.refresh { display: block; width: auto; @@ -708,16 +774,14 @@ a.refresh { color: #333; background-position: 5px 50%; background-repeat: no-repeat; - background-image: url('../images/icons/refresh.png?1319653435'); + background-image: url('../images/icons/refresh.png'); } - .infoTable { background: #F4FAFF; } .infoTable th { text-align: left; } - #ticketThread table { margin-top: 10px; border: 1px solid #aaa; @@ -729,13 +793,11 @@ a.refresh { font-size: 12px; padding: 5px; } - #ticketThread table th span { - font-weight:normal; - color:#888; - padding-left:20px; + font-weight: normal; + color: #888; + padding-left: 20px; } - #ticketThread table td { padding: 5px; } @@ -761,76 +823,3 @@ a.refresh { background-position: 0 50%; background-repeat: no-repeat; } - -#reply { - margin-top: 20px; - padding: 10px 5px; - background: #f9f9f9; - border: 1px solid #ccc; -} -#reply h2 { - margin-bottom: 10px; -} -#reply table { - width: 800px; -} -#reply table td { - vertical-align: top; -} -#reply textarea { - width: 628px !important; -} -#reply input[type=text], #reply #response_options textarea { - border: 1px solid #aaa; - background: #fff; -} -#reply .attachments .uploads div { - display: inline-block; - padding-right: 20px; -} -#reply .file { - display: inline-block; - padding-left: 20px; - margin-right: 20px; - background: url('../images/icons/file.gif') 0 50% no-repeat; -} - -.button, .button:visited { - background: #222; - display: inline-block; - font-size: 16px; - padding: 8px 16px 6px 16px; - width:160px; - text-align:center; - color: #fff; - font-weight:bold; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - box-shadow: 0 1px 3px rgba(0,0,0,0.5); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); - text-shadow: 0 -1px 1px rgba(0,0,0,0.25); - border-bottom: 1px solid rgba(0,0,0,0.25); - position: relative; - cursor: pointer; - font-family:helvetica, arial, sans-serif; -} - - -.uploads { - display:inline-block; - padding-right:20px; -} - -.uploads label { padding:3px; padding-right:10px; width: auto !important } - -.button:hover { background-color: #111; color: #fff; } -.button:active { top: 1px; box-shadow:none; -moz-box-shadow:none; -webkit-box-shadow:none; } -.button, .button:visited, -.green.button, .green.button:visited { background-color: #91bd09; } -.green.button:hover { background-color: #749a02; } -.blue.button, .blue.button:visited { background-color: #00AEEF; } -.blue.button:hover { background-color: #0299d2; } - diff --git a/assets/default/css/theme.min.css b/assets/default/css/theme.min.css new file mode 100644 index 0000000000000000000000000000000000000000..8e747a44528fe4376371c967fd867ec835f01fce --- /dev/null +++ b/assets/default/css/theme.min.css @@ -0,0 +1 @@ +html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0;font-size:13px;line-height:1.231;padding:0}body,input,select,textarea{font-family:sans-serif;color:#000}b,strong{font-weight:bold}blockquote{margin:1em 40px}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}small{font-size:85%}ul,ol{margin:1em 0;padding:0 0 0 30px}img{border:0;vertical-align:middle}form{margin:0}fieldset{border:0;margin:0;padding:0}label{cursor:pointer}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}input{line-height:normal;*overflow:visible}table input{*overflow:auto}input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="checkbox"],input[type="radio"]{box-sizing:border-box}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}table{border-collapse:collapse;border-spacing:0}th,td{vertical-align:top}th{text-align:left;font-weight:normal}h1,h2,h3,h4,h5,h6,form,fieldset{margin:0;padding:0}a{color:#0072bc;text-decoration:none}h1{color:#00aeef;font-weight:normal;font-size:20px}h3{font-size:16px}h2{font-size:16px;color:#999}.centered{text-align:center}.clear{clear:both;height:1px;visibility:none}.hidden{display:none}.faded{color:#666}#pagination{border:0;margin:0 0 40px 0;padding:0}#pagination li{border:0;margin:0;padding:0;font-size:11px;list-style:none;display:inline}#pagination li a{margin-right:2px;display:block;float:left;padding:3px 6px;text-decoration:none}#pagination li a:hover{color:#ff0084}#pagination .previousOff,#pagination .nextOff{color:#666;display:block;float:left;font-weight:bold;padding:3px 4px}#pagination .next a,#pagination .previous a{font-weight:bold}#pagination .active{color:#000;font-weight:bold;margin-right:2px;display:block;float:left;padding:3px 6px;text-decoration:none}#msg_notice{margin:0;padding:5px 10px 5px 36px;height:16px;line-height:16px;margin-bottom:10px;border:1px solid #0a0;background:url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0}#msg_warning{margin:0;padding:5px 10px 5px 36px;height:16px;line-height:16px;margin-bottom:10px;border:1px solid #f26522;background:url('../images/icons/alert.png') 10px 50% no-repeat #ffd}#msg_error{margin:0;padding:5px 10px 5px 36px;height:16px;line-height:16px;margin-bottom:10px;border:1px solid #a00;background:url('../images/icons/error.png') 10px 50% no-repeat #fff0f0}.warning{background:#ffc;font-style:italic}.warning strong{text-transform:uppercase;color:#a00;font-style:normal}.error{color:#f00}.error input{border:1px solid #f00}.button,.button:visited{background:#222;display:inline-block;font-size:16px;padding:8px 16px 6px 16px;width:160px;text-align:center;color:#fff;font-weight:bold;text-decoration:none;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;box-shadow:0 1px 3px rgba(0,0,0,0.5);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.5);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.5);text-shadow:0 -1px 1px rgba(0,0,0,0.25);border-bottom:1px solid rgba(0,0,0,0.25);position:relative;cursor:pointer;font-family:helvetica,arial,sans-serif}.button:hover{background-color:#111;color:#fff}.button:active{top:1px;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none}.button,.button:visited,.green.button,.green.button:visited{background-color:#91bd09}.green.button:hover{background-color:#749a02}.blue.button,.blue.button:visited{background-color:#00aeef}.blue.button:hover{background-color:#0299d2}body{background:url('../images/page_bg.png') top left repeat-x #c8c8c8}#container{background:#fff;width:840px;margin:0 auto;box-shadow:0 0 6px rgba(0,0,0,0.5);-moz-box-shadow:0 0 6px rgba(0,0,0,0.5);-webkit-box-shadow:0 0 6px rgba(0,0,0,0.5)}#header{position:relative;height:71px;padding:0 20px}#header #logo{width:220px;height:71px;float:left}#header p{width:400px;text-align:right;margin:0;padding:10px 0;float:right}#nav{margin:0 20px;padding:2px 10px;height:20px;background:url('../images/nav_bg.png') top left repeat-x;border-top:1px solid #aaa;box-shadow:0 3px 2px rgba(0,0,0,0.4);-moz-box-shadow:0 3px 2px rgba(0,0,0,0.4);-webkit-box-shadow:0 3px 2px rgba(0,0,0,0.4)}#nav li{margin:0;padding:0;list-style:none;display:inline}#nav li a{display:block;width:auto;float:left;height:20px;line-height:20px;text-align:center;padding:0 10px 0 32px;margin-left:10px;color:#333;border-radius:20px;-webkit-border-radius:20px;-moz-border-radius:20px;background-position:10px 50%;background-repeat:no-repeat}#nav li a.active,#nav li a:hover{background-color:#dbefff;color:#000}#nav li a:hover{background-color:#ededed;color:#0054a6}#nav li a.home{background-image:url('../images/icons/home.png')}#nav li a.kb{background-image:url('../images/icons/kb.png')}#nav li a.new{background-image:url('../images/icons/new.png')}#nav li a.status{background-image:url('../images/icons/status.png')}#nav li a.tickets{background-image:url('../images/icons/tix.png')}#content{padding:20px 0;margin:0 20px;height:auto!important;height:350px;min-height:350px}#footer{text-align:center;font-size:11px;color:#333}#footer a{color:#333}#footer p{margin:10px 0 0 0}#footer #poweredBy{display:block;width:126px;height:23px;outline:0;text-indent:-9999px;margin:0 auto;background:url('../images/poweredby.png') top left no-repeat}#landing_page #new_ticket{margin-top:40px;width:295px;padding-left:75px;float:left;background:url('../images/new_ticket_icon.png') top left no-repeat}#landing_page #check_status{margin-top:40px;width:295px;padding-left:75px;float:right;background:url('../images/check_status_icon.png') top left no-repeat}#faq{clear:both;margin:0;padding:5px}#faq ol{font-size:15px;margin-left:0;padding-left:0;border-top:1px solid #ddd}#faq ol li{list-style:none;margin:0;padding:0;color:#999}#faq ol li a{display:block;padding:5px 0;height:auto!important;overflow:hidden;margin:0;border-bottom:1px solid #ddd;line-height:16px;padding-left:24px;background:url('../images/icons/page.png') 0 50% no-repeat}#faq ol li a:hover{background-color:#e9f5ff}#faq .article-meta{padding:5px;background:#fafafa}#kb{margin:2px 0;padding:5px;overflow:hidden}#kb>li{padding:10px;height:auto!important;overflow:hidden;margin:0;background:url(../images/kb_category_bg.png) bottom left repeat-x;border-bottom:1px solid #ddd}#kb>li h4{padding-bottom:3px;margin-bottom:3px}#kb>li h4 span{color:#666}#kb>li h4 a{font-size:14px}#kb li i{display:block;width:32px;height:32px;float:left;margin-right:6px;background:url(../images/kb_large_folder.png) top left no-repeat}#kb-search{padding:10px 0;overflow:hidden}#kb-search div{clear:both;overflow:hidden;padding-top:5px}#kb-search #query{margin:0;display:inline-block;float:left;width:200px;margin-right:5px}#kb-search #cid{margin:0;display:inline-block;float:left;width:200px;margin-right:5px;position:relative;top:2px}#kb-search #topic-id{margin:0;display:inline-block;float:left;width:410px}#kb-search #searchSubmit{margin:0;display:inline-block;float:left;position:relative;top:2px}#kb-search #breadcrumbs{color:#333;margin-bottom:15px}#kb-search #breadcrumbs #breadcrumbs a{color:#555}#ticketForm div,#clientLogin div{clear:both;padding:3px 0;overflow:hidden}#ticketForm div label,#clientLogin div label{display:block;width:140px;float:left}#ticketForm div label.required,#clientLogin div label.required{font-weight:bold;text-align:left}#ticketForm div input,#clientLogin div input,#ticketForm div textarea,#clientLogin div textarea{width:auto;border:1px solid #aaa;background:#fff;margin-right:10px;display:block;float:left}#ticketForm div input[type=file],#clientLogin div input[type=file]{border:0}#ticketForm div select,#clientLogin div select{display:block;float:left}#ticketForm div div.captchaRow,#clientLogin div div.captchaRow{line-height:31px}#ticketForm div div.captchaRow input,#clientLogin div div.captchaRow input{position:relative;top:6px}#ticketForm td textarea,#clientLogin td textarea,#ticketForm div textarea,#clientLogin div textarea{width:600px}#ticketForm td em,#clientLogin td em,#ticketForm div em,#clientLogin div em{color:#777}#ticketForm td .captcha,#clientLogin td .captcha,#ticketForm div .captcha,#clientLogin div .captcha{width:88px;height:31px;background:#000;display:block;float:left;margin-right:20px}#ticketForm td label.inline,#clientLogin td label.inline,#ticketForm div label.inline,#clientLogin div label.inline{width:auto;padding:0 10px}#ticketForm div.error input,#clientLogin div.error input{border:1px solid #a00}#ticketForm div.error label,#clientLogin div.error label{color:#a00}#ticketTable th{width:160px;font-weight:normal;text-align:left}#ticketTable th.required,#ticketTable td.required{font-weight:bold;text-align:left}#clientLogin{width:400px;margin-top:20px;padding:10px 100px 10px 10px;border:1px solid #ccc;background:url('../images/lock.png?1319655200') 440px 50% no-repeat #f6f6f6}#clientLogin p{clear:both;text-align:center}#clientLogin strong{font-size:11px;color:#d00;display:block;padding-left:140px}#clientLogin #email{width:250px;margin-right:0}#clientLogin #ticketno{width:120px;margin-right:0}#reply{margin-top:20px;padding:10px 5px;background:#f9f9f9;border:1px solid #ccc}#reply h2{margin-bottom:10px}#reply table{width:800px}#reply table td{vertical-align:top}#reply textarea{width:628px!important}#reply input[type=text],#reply #response_options textarea{border:1px solid #aaa;background:#fff}#reply .attachments .uploads div{display:inline-block;padding-right:20px}#reply .file{display:inline-block;padding-left:20px;margin-right:20px;background:url('../images/icons/file.gif') 0 50% no-repeat}.uploads{display:inline-block;padding-right:20px}.uploads label{padding:3px;padding-right:10px;width:auto!important}.Icon{width:auto;padding-left:20px;background-position:top left;background-repeat:no-repeat;color:#069;text-decoration:none}.Icon.Ticket{background-image:url('../images/icons/ticket.gif')}.Icon.webTicket{background-image:url('../images/icons/ticket_source_web.gif')}.Icon.emailTicket{background-image:url('../images/icons/ticket_source_email.gif')}.Icon.phoneTicket{background-image:url('../images/icons/ticket_source_phone.gif')}.Icon.otherTicket{background-image:url('../images/icons/ticket_source_other.gif')}.Icon.attachment{background-image:url('../images/icons/attachment.gif')}.Icon.file{background-image:url('../images/icons/attachment.gif')}.Icon.refresh{background-image:url('../images/icons/refresh.gif')}.Icon.thread{font-weight:bold;font-size:1em;background-image:url('../images/icons/thread.gif?1319556657')}.Icon:hover{text-decoration:underline}#ticketTable{border:1px solid #aaa;border-left:none;border-bottom:0}#ticketTable caption{padding:5px;text-align:left;color:#000;background:#ddd;border:1px solid #aaa;border-bottom:0;font-weight:bold}#ticketTable th{height:24px;line-height:24px;background:#e1f2ff;border:1px solid #aaa;border-right:0;border-top:0}#ticketTable th a{color:#000}#ticketTable td{padding:2px;border:1px solid #aaa;border-right:0;border-top:0}#ticketTable tr.alt td{background:#f9f9f9}#ticketSearchForm{display:inline-block;float:left;padding:0 0 5px 0}a.refresh{display:block;width:auto;float:right;height:20px;line-height:20px;text-align:center;padding:0 10px 0 28px;border:1px solid #aaa;margin-left:10px;color:#333;background-position:5px 50%;background-repeat:no-repeat;background-image:url('../images/icons/refresh.png')}.infoTable{background:#f4faff}.infoTable th{text-align:left}#ticketThread table{margin-top:10px;border:1px solid #aaa;border-bottom:2px solid #aaa}#ticketThread table th{text-align:left;border-bottom:1px solid #aaa;font-size:12px;padding:5px}#ticketThread table th span{font-weight:normal;color:#888;padding-left:20px}#ticketThread table td{padding:5px}#ticketThread .message th{background:#d8efff}#ticketThread .response th{background:#ddd}#ticketThread .info{padding:2px;background:#f9f9f9;border-top:1px solid #ddd;height:16px;line-height:16px}#ticketThread .info a{display:inline-block;margin:5px 10px 5px 0;padding-left:24px;height:16px;line-height:16px;background-position:0 50%;background-repeat:no-repeat} \ No newline at end of file diff --git a/assets/default/less/base.less b/assets/default/less/base.less new file mode 100644 index 0000000000000000000000000000000000000000..b6b4681574e7f11178100467eca70ab2ef0fa266 --- /dev/null +++ b/assets/default/less/base.less @@ -0,0 +1,131 @@ +/* Typography */ +a { + color: #0072bc; + text-decoration: none; +} + +h1 { + color: #00AEEF; + font-weight: normal; + font-size: 20px; +} + +h3 { + font-size: 16px; +} + +h2 { + font-size: 16px; + color: #999; +} + +/* Helpers */ +.centered { text-align: center;} + +.clear { clear:both; height: 1px; visibility: none;} + +.hidden { display: none;} + +.faded { color:#666;} + +/* Pagination */ +#pagination { + border: 0; + margin: 0 0 40px 0; + padding: 0; + li { + border: 0; + margin: 0; + padding: 0; + font-size: 11px; + list-style: none; + display: inline; + a { + margin-right: 2px; + display: block; + float: left; + padding: 3px 6px; + text-decoration: none; + } + a:hover { + color: #ff0084; + } + } + .previousOff, .nextOff { + color: #666; + display: block; + float: left; + font-weight: bold; + padding: 3px 4px; + } + .next a, .previous a { + font-weight: bold; + } + .active { + color: #000; + font-weight: bold; + margin-right: 2px; + display: block; + float: left; + padding: 3px 6px; + text-decoration: none; + } +} + +/* Alerts & Notices */ + +#msg_notice { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; margin-bottom: 10px; border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; } + +#msg_warning { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; margin-bottom: 10px; border: 1px solid #f26522; background: url('../images/icons/alert.png') 10px 50% no-repeat #ffffdd; } + +#msg_error { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; margin-bottom: 10px; border: 1px solid #a00; background: url('../images/icons/error.png') 10px 50% no-repeat #fff0f0; } + + +.warning { + background: #ffc; + font-style: italic; + strong { + text-transform: uppercase; + color: #a00; + font-style: normal; + } +} + +.error { + color:#f00; + input { + border:1px solid #f00; + } +} + + +.button, .button:visited { + background: #222; + display: inline-block; + font-size: 16px; + padding: 8px 16px 6px 16px; + width:160px; + text-align:center; + color: #fff; + font-weight:bold; + text-decoration: none; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + box-shadow: 0 1px 3px rgba(0,0,0,0.5); + -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); + text-shadow: 0 -1px 1px rgba(0,0,0,0.25); + border-bottom: 1px solid rgba(0,0,0,0.25); + position: relative; + cursor: pointer; + font-family:helvetica, arial, sans-serif; +} + +.button:hover { background-color: #111; color: #fff; } +.button:active { top: 1px; box-shadow:none; -moz-box-shadow:none; -webkit-box-shadow:none; } +.button, .button:visited, +.green.button, .green.button:visited { background-color: #91bd09; } +.green.button:hover { background-color: #749a02; } +.blue.button, .blue.button:visited { background-color: #00AEEF; } +.blue.button:hover { background-color: #0299d2; } diff --git a/assets/default/less/kb.less b/assets/default/less/kb.less new file mode 100644 index 0000000000000000000000000000000000000000..f31faa4d0b99d4decd83dfda5dff3adad24b5bba --- /dev/null +++ b/assets/default/less/kb.less @@ -0,0 +1,88 @@ +#kb { + margin: 2px 0; + padding: 5px; + overflow: hidden; + + > li { + padding:10px; + height:auto !important; + overflow:hidden; + margin:0; + background:url(../images/kb_category_bg.png) bottom left repeat-x; + border-bottom:1px solid #ddd; + h4 { + padding-bottom:3px; + margin-bottom:3px; + span { + color:#666; + } + a { + font-size: 14px; + } + } + } + + li { + i { + display:block; + width:32px; + height:32px; + float:left; + margin-right:6px; + background:url(../images/kb_large_folder.png) top left no-repeat; + } + } +} + +#kb-search { + padding:10px 0; + overflow:hidden; + + div { + clear:both; + overflow:hidden; + padding-top:5px; + } + + #query { + margin:0; + display:inline-block; + float:left; + width:200px; + margin-right:5px; + } + + #cid { + margin:0; + display:inline-block; + float:left; + width:200px; + margin-right:5px; + position:relative; + top:2px; + } + + #topic-id { + margin:0; + display:inline-block; + float:left; + width:410px; + } + + #searchSubmit { + margin:0; + display:inline-block; + float:left; + position:relative; + top:2px; + } + + #breadcrumbs { + color: #333; + margin-bottom: 15px; + + #breadcrumbs a { + color: #555; + } + } +} diff --git a/assets/default/less/landing-page.less b/assets/default/less/landing-page.less new file mode 100644 index 0000000000000000000000000000000000000000..cfcfcfcbf63ff4b7295372dc49b5124043e80d01 --- /dev/null +++ b/assets/default/less/landing-page.less @@ -0,0 +1,58 @@ +#landing_page { + #new_ticket { + margin-top: 40px; + width: 295px; + padding-left: 75px; + float: left; + background: url('../images/new_ticket_icon.png') top left no-repeat; + } + + #check_status { + margin-top: 40px; + width: 295px; + padding-left: 75px; + float: right; + background: url('../images/check_status_icon.png') top left no-repeat; + } +} + +/* Landing page FAQ not yet implemented. */ +#faq { + clear: both; + margin: 0; + padding: 5px; + + ol { + font-size: 15px; + margin-left: 0; + padding-left: 0; + border-top:1px solid #ddd; + + li { + list-style: none; + margin: 0; + padding:0; + color: #999; + a { + display:block; + padding:5px 0; + height:auto !important; + overflow:hidden; + margin:0; + border-bottom:1px solid #ddd; + line-height: 16px; + padding-left: 24px; + background: url('../images/icons/page.png') 0 50% no-repeat; + } + + a:hover { + background-color:#e9f5ff; + } + } + } + .article-meta { + padding:5px; + background:#fafafa; + } +} + diff --git a/assets/default/less/main-layout.less b/assets/default/less/main-layout.less new file mode 100644 index 0000000000000000000000000000000000000000..a40cac090aad2fa4f287fbfa8955d0da04f246de --- /dev/null +++ b/assets/default/less/main-layout.less @@ -0,0 +1,114 @@ +body { + background: url('../images/page_bg.png') top left repeat-x #c8c8c8; +} + +#container { + background: #fff; + width: 840px; + margin: 0 auto; + box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); +} + +#header { + position: relative; + height: 71px; + padding: 0 20px; + + #logo { + width: 220px; + height: 71px; + float: left; + } + + p { + width: 400px; + text-align: right; + margin: 0; + padding: 10px 0; + float: right; + } +} + +#nav { + margin: 0 20px; + padding: 2px 10px; + height: 20px; + background: url('../images/nav_bg.png') top left repeat-x; + border-top: 1px solid #aaa; + box-shadow:0 3px 2px rgba(0, 0, 0, 0.4); + -moz-box-shadow:0 3px 2px rgba(0, 0, 0, 0.4); + -webkit-box-shadow:0 3px 2px rgba(0, 0, 0, 0.4); + + li { + margin: 0; + padding: 0; + list-style: none; + display: inline; + a { + display: block; + width: auto; + float: left; + height: 20px; + line-height: 20px; + text-align: center; + padding: 0 10px 0 32px; + margin-left: 10px; + color: #333; + border-radius: 20px; + -webkit-border-radius: 20px; + -moz-border-radius: 20px; + background-position: 10px 50%; + background-repeat: no-repeat; + } + + a.active, a:hover { + background-color: #dbefff; + color: #000; + } + + a:hover { + background-color: #ededed; + color: #0054a6; + } + + a.home { background-image: url('../images/icons/home.png'); } + a.kb { background-image: url('../images/icons/kb.png'); } + a.new { background-image: url('../images/icons/new.png'); } + a.status { background-image: url('../images/icons/status.png'); } + a.tickets { background-image: url('../images/icons/tix.png'); } + } +} + +#content { + padding: 20px 0; + margin: 0 20px; + height: auto !important; + height: 350px; + min-height: 350px; +} + +#footer { + text-align: center; + font-size: 11px; + color: #333; + + a { + color: #333; + } + + p { + margin: 10px 0 0 0; + } + + #poweredBy { + display: block; + width: 126px; + height: 23px; + outline: none; + text-indent: -9999px; + margin: 0 auto; + background: url('../images/poweredby.png') top left no-repeat; + } +} \ No newline at end of file diff --git a/assets/default/less/print.less b/assets/default/less/print.less new file mode 100644 index 0000000000000000000000000000000000000000..dbe21bc7e8d2d2f16cbc7f6db5974383903357f7 --- /dev/null +++ b/assets/default/less/print.less @@ -0,0 +1,30 @@ +#header, #nav, #meta, #footer, #reply, #pagination, .reload, .refresh, form, .thread, hr, #kbAttachments, .back { + display: none; +} + +th { + text-align: left; +} + +a { + color: #000; + text-decoration: none; +} + +caption { + text-align: left; + padding-bottom: 10px; + font-weight: bold; +} + +.message, .response { + border-bottom: 1px solid #000; + margin-bottom: 20px; + padding-bottom: 10px; + + th { + font-size: 12pt; + font-weight: bold; + padding-bottom: 5px; + } +} diff --git a/assets/default/less/reset.less b/assets/default/less/reset.less new file mode 100644 index 0000000000000000000000000000000000000000..8cf9581eb2516d2c21e5b7b2be0bf614e85d9592 --- /dev/null +++ b/assets/default/less/reset.less @@ -0,0 +1,117 @@ +html { + font-size: 100%; + overflow-y: scroll; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +body { + margin: 0; + font-size: 13px; + line-height: 1.231; + padding: 0; +} + +body, input, select, textarea { + font-family: sans-serif; + color: #000; +} + +b, strong { + font-weight: bold; +} + +blockquote { + margin: 1em 40px; +} + +hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0; +} + +small { + font-size: 85%; +} + +ul, ol { + margin: 1em 0; + padding: 0 0 0 30px; +} + +img { + border: 0; + vertical-align: middle; +} + +form { + margin: 0; +} + +fieldset { + border: 0; + margin: 0; + padding: 0; +} + +label { + cursor: pointer; +} + +input, select, textarea { + font-size: 100%; + margin: 0; + vertical-align: baseline; + *vertical-align: middle; +} + +input { + line-height: normal; + *overflow: visible; +} + +table input { + *overflow: auto; +} + +input[type="button"], input[type="reset"], input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} + +input[type="checkbox"], input[type="radio"] { + box-sizing: border-box; +} + +input[type="search"] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} + +textarea { + overflow: auto; + vertical-align: top; + resize: vertical; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +th, td { + vertical-align: top; +} + +th { text-align: left; font-weight: normal; } + +h1, h2, h3, h4, h5, h6, form, fieldset { + margin: 0; + padding: 0; +} \ No newline at end of file diff --git a/assets/default/less/theme.less b/assets/default/less/theme.less new file mode 100644 index 0000000000000000000000000000000000000000..c3835f9e608d91533abb782a560b5f4c868cd675 --- /dev/null +++ b/assets/default/less/theme.less @@ -0,0 +1,7 @@ +@import 'reset'; +@import 'base'; +@import 'main-layout'; +@import 'landing-page'; +@import 'kb'; +@import 'ticket-forms'; +@import 'ticket'; diff --git a/assets/default/less/ticket-forms.less b/assets/default/less/ticket-forms.less new file mode 100644 index 0000000000000000000000000000000000000000..96db30b28a692d7db08e3389e2b35317f60b9859 --- /dev/null +++ b/assets/default/less/ticket-forms.less @@ -0,0 +1,170 @@ +#ticketForm, #clientLogin { + div { + clear: both; + padding: 3px 0; + overflow: hidden; + + label { + display: block; + width: 140px; + float: left; + } + + label.required { + font-weight: bold; + text-align: left; + } + + input, textarea { + width: auto; + border: 1px solid #aaa; + background: #fff; + margin-right: 10px; + display: block; + float: left; + } + + input[type=file] { + border: 0; + } + + select { + display: block; + float: left; + } + div.captchaRow { + line-height: 31px; + + input { + position: relative; + top: 6px; + } + } + + } + + td, div { + textarea { + width: 600px; + } + + em { + color: #777; + } + + .captcha { + width: 88px; + height: 31px; + background: #000; + display: block; + float: left; + margin-right: 20px; + } + + label.inline { + width: auto; + padding: 0 10px; + } + } + + div.error { + input { + border: 1px solid #a00; + } + label { + color: #a00; + } + } +} + +#ticketTable { + th { + width: 160px; + font-weight: normal; + text-align: left; + } + th.required, td.required { + font-weight: bold; + text-align: left; + } +} + +#clientLogin { + width: 400px; + margin-top: 20px; + padding: 10px 100px 10px 10px; + border: 1px solid #ccc; + background: url('../images/lock.png?1319655200') 440px 50% no-repeat #f6f6f6; + + p { + clear: both; + text-align: center; + } + + strong { + font-size: 11px; + color: #d00; + display: block; + padding-left: 140px; + } + + #email { + width: 250px; + margin-right: 0; + } + + #ticketno { + width: 120px; + margin-right: 0; + } +} + +#reply { + margin-top: 20px; + padding: 10px 5px; + background: #f9f9f9; + border: 1px solid #ccc; + + h2 { + margin-bottom: 10px; + } + + table { + width: 800px; + + td { + vertical-align: top; + } + } + + textarea { + width: 628px !important; + } + + input[type=text], #response_options textarea { + border: 1px solid #aaa; + background: #fff; + } + + .attachments .uploads div { + display: inline-block; + padding-right: 20px; + } + .file { + display: inline-block; + padding-left: 20px; + margin-right: 20px; + background: url('../images/icons/file.gif') 0 50% no-repeat; + } +} + +.uploads { + display:inline-block; + padding-right:20px; + + label { + padding:3px; + padding-right:10px; + width: auto !important + } +} \ No newline at end of file diff --git a/assets/default/less/ticket.less b/assets/default/less/ticket.less new file mode 100644 index 0000000000000000000000000000000000000000..d7f2d307930432c2b41e3396f716d77fca5bc3e9 --- /dev/null +++ b/assets/default/less/ticket.less @@ -0,0 +1,145 @@ +/* Ticket icons */ +.Icon { + width: auto; + padding-left: 20px; + background-position: top left; + background-repeat: no-repeat; + color: #006699; + text-decoration: none; +} + +.Icon.Ticket { background-image: url('../images/icons/ticket.gif') } +.Icon.webTicket { background-image: url('../images/icons/ticket_source_web.gif'); } +.Icon.emailTicket { background-image: url('../images/icons/ticket_source_email.gif'); } +.Icon.phoneTicket { background-image: url('../images/icons/ticket_source_phone.gif'); } +.Icon.otherTicket { background-image: url('../images/icons/ticket_source_other.gif'); } +.Icon.attachment { background-image: url('../images/icons/attachment.gif'); } +.Icon.file { background-image: url('../images/icons/attachment.gif'); } +.Icon.refresh { background-image: url('../images/icons/refresh.gif'); } + +.Icon.thread { + font-weight: bold; + font-size: 1em; + background-image: url('../images/icons/thread.gif?1319556657'); +} + +.Icon:hover { + text-decoration: underline; +} + + +#ticketTable { + border: 1px solid #aaa; + border-left: none; + border-bottom: none; + + caption { + padding: 5px; + text-align: left; + color: #000; + background: #ddd; + border: 1px solid #aaa; + border-bottom: none; + font-weight: bold; + } + + th { + height: 24px; + line-height: 24px; + background: #e1f2ff; + border: 1px solid #aaa; + border-right: none; + border-top: none; + + a { + color: #000; + } + } + + td { + padding: 2px; + border: 1px solid #aaa; + border-right: none; + border-top: none; + } + + tr.alt td { + background: #f9f9f9; + } +} + +#ticketSearchForm { + display: inline-block; + float: left; + padding: 0 0 5px 0; +} + +a.refresh { + display: block; + width: auto; + float: right; + height: 20px; + line-height: 20px; + text-align: center; + padding: 0 10px 0 28px; + border: 1px solid #aaa; + margin-left: 10px; + color: #333; + background-position: 5px 50%; + background-repeat: no-repeat; + background-image: url('../images/icons/refresh.png'); +} + +.infoTable { + background: #F4FAFF; + th { + text-align: left; + } +} + +#ticketThread { + table { + margin-top: 10px; + border: 1px solid #aaa; + border-bottom: 2px solid #aaa; + + th { + text-align: left; + border-bottom: 1px solid #aaa; + font-size: 12px; + padding: 5px; + + span { + font-weight:normal; + color:#888; + padding-left:20px; + } + } + + td { + padding: 5px; + } + } + + .message th { background: #d8efff; } + .response th { background: #ddd; } + + .info { + padding: 2px; + background: #f9f9f9; + border-top: 1px solid #ddd; + height: 16px; + line-height: 16px; + + a { + display: inline-block; + margin: 5px 10px 5px 0; + padding-left: 24px; + height: 16px; + line-height: 16px; + background-position: 0 50%; + background-repeat: no-repeat; + } + } +} + diff --git a/include/class.config.php b/include/class.config.php index c43f2e305b405b992916324ce0a3813015cf83f8..e6271511239683703825dbdaedc4066e819c5d4b 100644 --- a/include/class.config.php +++ b/include/class.config.php @@ -18,8 +18,8 @@ require_once(INCLUDE_DIR.'class.email.php'); class Config { - var $id=0; - var $config=array(); + var $id = 0; + var $config = array(); var $defaultDept; //Default Department var $defaultSLA; //Default SLA @@ -32,18 +32,27 @@ class Config { } function load($id=0) { + if(!$id && !($id=$this->getId())) return false; - $sql='SELECT * FROM '.CONFIG_TABLE + $sql='SELECT *, (TIME_TO_SEC(TIMEDIFF(NOW(), UTC_TIMESTAMP()))/3600) as db_tz_offset ' + .' FROM '.CONFIG_TABLE .' WHERE id='.db_input($id); + if(!($res=db_query($sql)) || !db_num_rows($res)) return false; - $this->config=db_fetch_array($res); - $this->id=$this->config['id']; - $this->setMysqlTZ(db_timezone()); + $this->config = db_fetch_array($res); + $this->id = $this->config['id']; + + //Get the default time zone + // We can't JOIN timezone table above due to upgrade support. + if($this->config['default_timezone_id']) + $this->config['tz_offset'] = Timezone::getOffsetById($this->config['default_timezone_id']); + else + $this->config['tz_offset'] = 0; return true; } @@ -91,17 +100,9 @@ class Config { return null; } - - function setMysqlTZ($tz) { - //TODO: Combine the 2 replace regex - if($tz=='SYSTEM') - $this->mysqltzoffset=preg_replace('/([+-]\d{2})(\d{2})/','\1',date('O')); - else - $this->mysqltzoffset=preg_replace('/([+-]\d{2})(:)(\d{2})/','\1',$tz); - } - function getMysqlTZoffset() { - return $this->mysqltzoffset; + function getDBTZoffset() { + return $this->config['db_tz_offset']; } /* Date & Time Formats */ @@ -148,7 +149,7 @@ class Config { } function getTZOffset() { - return $this->config['timezone_offset']; + return $this->config['tz_offset']; } function getPageSize() { diff --git a/include/class.file.php b/include/class.file.php index e4012bb4b9f7665438cc28fbc3818162f48579a7..b44f7af4542343ccd55e93c2db199e06ea343278 100644 --- a/include/class.file.php +++ b/include/class.file.php @@ -27,7 +27,8 @@ class AttachmentFile { if(!$id && !($id=$this->getId())) return false; - $sql='SELECT f.*, count(DISTINCT c.canned_id) as canned, count(DISTINCT t.ticket_id) as tickets ' + $sql='SELECT id, type, size, name, hash, f.created, ' + .' count(DISTINCT c.canned_id) as canned, count(DISTINCT t.ticket_id) as tickets ' .' FROM '.FILE_TABLE.' f ' .' LEFT JOIN '.CANNED_ATTACHMENT_TABLE.' c ON(c.file_id=f.id) ' .' LEFT JOIN '.TICKET_ATTACHMENT_TABLE.' t ON(t.file_id=f.id) ' @@ -90,12 +91,24 @@ class AttachmentFile { return $this->ht['hash']; } - function getBinary() { - return $this->ht['filedata']; + function open() { + return new AttachmentChunkedData($this->id); + } + + function sendData() { + $file = $this->open(); + while ($chunk = $file->read()) + echo $chunk; } function getData() { - return $this->getBinary(); + # XXX: This is horrible, and is subject to php's memory + # restrictions, etc. Don't use this function! + ob_start(); + $this->sendData(); + $data = &ob_get_contents(); + ob_end_clean(); + return $data; } function delete() { @@ -110,7 +123,7 @@ class AttachmentFile { header('Content-Type: '.($this->getType()?$this->getType():'application/octet-stream')); header('Content-Length: '.$this->getSize()); - echo $this->getData(); + $this->sendData(); exit(); } @@ -132,7 +145,7 @@ class AttachmentFile { header('Content-Transfer-Encoding: binary'); header('Content-Length: '.$this->getSize()); - echo $this->getBinary(); + $this->sendData(); exit(); } @@ -168,15 +181,9 @@ class AttachmentFile { if (!(db_query($sql) && ($id=db_insert_id()))) return false; - foreach (str_split($file['data'], 1024*100) as $chunk) { - $sql='UPDATE '.FILE_TABLE - .' SET filedata = CONCAT(filedata,'.db_input($chunk).')' - .' WHERE id='.db_input($id); - if(!db_query($sql)) { - db_query('DELETE FROM '.FILE_TABLE.' WHERE id='.db_input($id).' LIMIT 1'); - return false; - } - } + $data = new AttachmentChunkedData($id); + if (!$data->write($file['data'])) + return false; return $id; } @@ -213,44 +220,56 @@ class AttachmentFile { .'SELECT file_id FROM '.FAQ_ATTACHMENT_TABLE .') still_loved' .')'); + AttachmentChunkedData::deleteOrphans(); return db_affected_rows(); } } -class AttachmentList { - function AttachmentList($table, $key) { - $this->table = $table; - $this->key = $key; +/** + * Attachments stored in the database are cut into 256kB chunks and stored + * in the FILE_CHUNK_TABLE to overcome the max_allowed_packet limitation of + * LOB fields in the MySQL database + */ +define('CHUNK_SIZE', 500*1024); # Beware if you change this... +class AttachmentChunkedData { + function AttachmentChunkedData($file) { + $this->_file = $file; + $this->_pos = 0; } - function all() { - if (!isset($this->list)) { - $this->list = array(); - $res=db_query('SELECT file_id FROM '.$this->table - .' WHERE '.$this->key); - while(list($id) = db_fetch_row($res)) { - $this->list[] = new AttachmentFile($id); - } - } - return $this->list; + function length() { + list($length) = db_fetch_row(db_query( + 'SELECT SUM(LENGTH(filedata)) FROM '.FILE_CHUNK_TABLE + .' WHERE file_id='.db_input($this->_file))); + return $length; } - - function getCount() { - return count($this->all()); + + function read() { + # Read requested length of data from attachment chunks + list($buffer) = @db_fetch_row(db_query( + 'SELECT filedata FROM '.FILE_CHUNK_TABLE.' WHERE file_id=' + .db_input($this->_file).' AND chunk_id='.$this->_pos++)); + return $buffer; } - function add($fileId) { - db_query( - 'INSERT INTO '.$this->table - .' SET '.$this->key - .' file_id='.db_input($fileId)); + function write($what, $chunk_size=CHUNK_SIZE) { + $offset=0; + for (;;) { + $block = substr($what, $offset, $chunk_size); + if (!$block) break; + if (!db_query('REPLACE INTO '.FILE_CHUNK_TABLE + .' SET filedata=0x'.bin2hex($block).', file_id=' + .db_input($this->_file).', chunk_id='.db_input($this->_pos++))) + return false; + $offset += strlen($block); + } + return true; } - function remove($fileId) { + function deleteOrpans() { db_query( - 'DELETE FROM '.$this->table - .' WHERE '.$this->key - .' AND file_id='.db_input($fileId)); + 'DELETE FROM '.FILE_CHUNK_TABLE.' WHERE file_id NOT IN ' + .'( SELECT id FROM '.FILE_TABLE.') still_loved'); + return db_affected_rows(); } } -?> diff --git a/include/class.format.php b/include/class.format.php index 9de1197edbb3d4272193f67af48826851f72296e..aaa6667d32c2fce14da2cb9f5e15387ec9608b0c 100644 --- a/include/class.format.php +++ b/include/class.format.php @@ -180,7 +180,7 @@ class Format { } /* elapsed time */ - function elapsedTime($sec){ + function elapsedTime($sec) { if(!$sec || !is_numeric($sec)) return ""; @@ -197,32 +197,32 @@ class Format { /* Dates helpers...most of this crap will change once we move to PHP 5*/ function db_date($time) { global $cfg; - return Format::userdate($cfg->getDateFormat(),Misc::db2gmtime($time)); + return Format::userdate($cfg->getDateFormat(), Misc::db2gmtime($time)); } function db_datetime($time) { global $cfg; - return Format::userdate($cfg->getDateTimeFormat(),Misc::db2gmtime($time)); + return Format::userdate($cfg->getDateTimeFormat(), Misc::db2gmtime($time)); } function db_daydatetime($time) { global $cfg; - return Format::userdate($cfg->getDayDateTimeFormat(),Misc::db2gmtime($time)); + return Format::userdate($cfg->getDayDateTimeFormat(), Misc::db2gmtime($time)); } - function userdate($format,$gmtime) { - return Format::date($format,$gmtime,$_SESSION['TZ_OFFSET'],$_SESSION['TZ_DST']); + function userdate($format, $gmtime) { + return Format::date($format, $gmtime, $_SESSION['TZ_OFFSET'], $_SESSION['TZ_DST']); } - function date($format,$gmtimestamp,$offset=0,$daylight=false){ - if(!$gmtimestamp || !is_numeric($gmtimestamp)) return ""; - - $offset+=$daylight?date('I',$gmtimestamp):0; //Daylight savings crap. - return date($format,($gmtimestamp+($offset*3600))); - } - + function date($format, $gmtimestamp, $offset=0, $daylight=false){ - - + if(!$gmtimestamp || !is_numeric($gmtimestamp)) + return ""; + + $offset+=$daylight?date('I', $gmtimestamp):0; //Daylight savings crap. + + return date($format, ($gmtimestamp+ ($offset*3600))); + } + } ?> diff --git a/include/class.misc.php b/include/class.misc.php index 9fd6744ba8913061a5e34c2b10bf705216d286fa..8149a1fce37ea3a26106f6bb217d1c92cc17395e 100644 --- a/include/class.misc.php +++ b/include/class.misc.php @@ -35,7 +35,7 @@ class Misc { if(!$var) return; $dbtime=is_int($var)?$var:strtotime($var); - return $dbtime-($cfg->getMysqlTZoffset()*3600); + return $dbtime-($cfg->getDBTZoffset()*3600); } //Take user time or gmtime and return db (mysql) time. @@ -50,7 +50,7 @@ class Misc { $time=$time-($offset*3600); } //gm to db time - return $time+($cfg->getMysqlTZoffset()*3600); + return $time+($cfg->getDBTZoffset()*3600); } /*Helper get GM time based on timezone offset*/ diff --git a/include/class.nav.php b/include/class.nav.php index 47534817eb4c26200de9c3afd1cde01400322308..eb66293770888faa572cce786b2d2b22c868ed67 100644 --- a/include/class.nav.php +++ b/include/class.nav.php @@ -194,16 +194,16 @@ class AdminNav extends StaffNav{ break; case 'settings': $subnav[]=array('desc'=>'System Preferences','href'=>'settings.php?t=system','iconclass'=>'preferences'); - $subnav[]=array('desc'=>'Tickets','href'=>'settings.php?t=tickets','iconclass'=>'preferences'); - $subnav[]=array('desc'=>'Emails','href'=>'settings.php?t=emails','iconclass'=>'preferences'); - $subnav[]=array('desc'=>'Knowledgebase','href'=>'settings.php?t=kb','iconclass'=>'preferences'); - $subnav[]=array('desc'=>'Autoresponder','href'=>'settings.php?t=autoresp','iconclass'=>'preferences'); - $subnav[]=array('desc'=>'Alerts & Notices','href'=>'settings.php?t=alerts','iconclass'=>'preferences'); + $subnav[]=array('desc'=>'Tickets','href'=>'settings.php?t=tickets','iconclass'=>'ticket-settings'); + $subnav[]=array('desc'=>'Emails','href'=>'settings.php?t=emails','iconclass'=>'email-settings'); + $subnav[]=array('desc'=>'Knowledgebase','href'=>'settings.php?t=kb','iconclass'=>'kb-settings'); + $subnav[]=array('desc'=>'Autoresponder','href'=>'settings.php?t=autoresp','iconclass'=>'email-autoresponders'); + $subnav[]=array('desc'=>'Alerts & Notices','href'=>'settings.php?t=alerts','iconclass'=>'alert-settings'); break; case 'manage': $subnav[]=array('desc'=>'Help Topics','href'=>'helptopics.php','iconclass'=>'helpTopics'); $subnav[]=array('desc'=>'Ticket Filters','href'=>'filters.php', - 'title'=>'Ticket Filters','iconclass'=>'emailFilters'); + 'title'=>'Ticket Filters','iconclass'=>'ticketFilters'); $subnav[]=array('desc'=>'SLA Plans','href'=>'slas.php','iconclass'=>'sla'); $subnav[]=array('desc'=>'API Keys','href'=>'apikeys.php','iconclass'=>'api'); break; diff --git a/include/class.upgrader.php b/include/class.upgrader.php index 7fa6c331ff542c44e7f4329c4e164f0848cf837e..2c898f646d7dd392790a55007774be1ae54c92a3 100644 --- a/include/class.upgrader.php +++ b/include/class.upgrader.php @@ -269,8 +269,6 @@ class Upgrader extends SetupWizard { $tasks=array(); switch($phash) { //Add patch specific scripted tasks. case 'c00511c7-7be60a84': //V1.6 ST- 1.7 * {{MD5('1.6 ST') -> c00511c7c1db65c0cfad04b4842afc57}} - $tasks[] = array('func' => 'migrateAttachments2DB', - 'desc' => 'Migrating attachments to database, it might take a while depending on the number of files.'); $tasks[] = array('func' => 'migrateSessionFile2DB', 'desc' => 'Transitioning to db-backed sessions'); break; @@ -282,6 +280,10 @@ class Upgrader extends SetupWizard { $tasks[] = array('func' => 'migrateGroupDeptAccess', 'desc' => 'Migrating group\'s department access to a new table'); break; + case '15b30765-dd0022fb': + $tasks[] = array('func' => 'migrateAttachments2DB', + 'desc' => 'Migrating attachments to database, it might take a while depending on the number of files.'); + break; } //Check IF SQL cleanup exists. diff --git a/include/client/header.inc.php b/include/client/header.inc.php index da763a7bbf7b1e5b9481b8d26a0dfca2c79a9997..81191f98b7dacefb7bc34ba03d6b53920d9d16a7 100644 --- a/include/client/header.inc.php +++ b/include/client/header.inc.php @@ -10,7 +10,7 @@ header("Content-Type: text/html; charset=UTF-8\r\n"); <meta name="description" content="customer support platform"> <meta name="keywords" content="osTicket, Customer support system, support ticket system"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> - <link rel="stylesheet" href="<?php echo ASSETS_PATH; ?>css/theme.css" media="screen"> + <link rel="stylesheet" href="<?php echo ASSETS_PATH; ?>css/theme.min.css" media="screen"> <link rel="stylesheet" href="<?php echo ASSETS_PATH; ?>css/print.css" media="print"> <script src="<?php echo ROOT_PATH; ?>js/jquery-1.7.2.min.js"></script> <script src="<?php echo ROOT_PATH; ?>js/jquery.multifile.js"></script> diff --git a/include/staff/settings-system.inc.php b/include/staff/settings-system.inc.php index 1bc9b3ee4daf79688164593ca59daab8a1bb0ebc..3fba7f15977390d6882f00894523b90d92d4aced 100644 --- a/include/staff/settings-system.inc.php +++ b/include/staff/settings-system.inc.php @@ -45,7 +45,7 @@ $gmtime = Misc::gmtime(); <?php $sql='SELECT dept_id,dept_name FROM '.DEPT_TABLE.' WHERE ispublic=1'; if(($res=db_query($sql)) && db_num_rows($res)){ - while (list($id,$name) = db_fetch_row($res)){ + while (list($id, $name) = db_fetch_row($res)){ $selected = ($config['default_dept_id']==$id)?'selected="selected"':''; ?> <option value="<?php echo $id; ?>"<?php echo $selected; ?>><?php echo $name; ?> Dept</option> <?php @@ -62,7 +62,7 @@ $gmtime = Misc::gmtime(); <?php $sql='SELECT tpl_id,name FROM '.EMAIL_TEMPLATE_TABLE.' WHERE isactive=1 AND cfg_id='.db_input($cfg->getId()).' ORDER BY name'; if(($res=db_query($sql)) && db_num_rows($res)){ - while (list($id,$name) = db_fetch_row($res)){ + while (list($id, $name) = db_fetch_row($res)){ $selected = ($config['default_template_id']==$id)?'selected="selected"':''; ?> <option value="<?php echo $id; ?>"<?php echo $selected; ?>><?php echo $name; ?></option> <?php @@ -119,7 +119,7 @@ $gmtime = Misc::gmtime(); <?php for ($i = 1; $i <= 12; $i++) { echo sprintf('<option value="%d" %s>%s%s</option>', - $i,(($config['passwd_reset_period']==$i)?'selected="selected"':''),$i>1?"Every $i ":'',$i>1?' Months':'Monthly'); + $i,(($config['passwd_reset_period']==$i)?'selected="selected"':''), $i>1?"Every $i ":'', $i>1?' Months':'Monthly'); } ?> </select> @@ -137,14 +137,14 @@ $gmtime = Misc::gmtime(); <select name="staff_max_logins"> <?php for ($i = 1; $i <= 10; $i++) { - echo sprintf('<option value="%d" %s>%d</option>',$i,(($config['staff_max_logins']==$i)?'selected="selected"':''),$i); + echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_max_logins']==$i)?'selected="selected"':''), $i); } ?> </select> failed login attempt(s) allowed before a <select name="staff_login_timeout"> <?php for ($i = 1; $i <= 10; $i++) { - echo sprintf('<option value="%d" %s>%d</option>',$i,(($config['staff_login_timeout']==$i)?'selected="selected"':''),$i); + echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_login_timeout']==$i)?'selected="selected"':''), $i); } ?> </select> minute lock-out is enforced. @@ -161,7 +161,7 @@ $gmtime = Misc::gmtime(); <select name="client_max_logins"> <?php for ($i = 1; $i <= 10; $i++) { - echo sprintf('<option value="%d" %s>%d</option>',$i,(($config['client_max_logins']==$i)?'selected="selected"':''),$i); + echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['client_max_logins']==$i)?'selected="selected"':''), $i); } ?> @@ -169,7 +169,7 @@ $gmtime = Misc::gmtime(); <select name="client_login_timeout"> <?php for ($i = 1; $i <= 10; $i++) { - echo sprintf('<option value="%d" %s>%d</option>',$i,(($config['client_login_timeout']==$i)?'selected="selected"':''),$i); + echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['client_login_timeout']==$i)?'selected="selected"':''), $i); } ?> </select> minute lock-out is enforced. @@ -191,24 +191,24 @@ $gmtime = Misc::gmtime(); <td> <input type="text" name="time_format" value="<?php echo $config['time_format']; ?>"> <font class="error">* <?php echo $errors['time_format']; ?></font> - <em><?php echo Format::date($config['time_format'],$gmtime,$config['timezone_offset'],$config['enable_daylight_saving']); ?></em></td> + <em><?php echo Format::date($config['time_format'], $gmtime, $config['tz_offset'], $config['enable_daylight_saving']); ?></em></td> </tr> <tr><td width="220" class="required">Date Format:</td> <td><input type="text" name="date_format" value="<?php echo $config['date_format']; ?>"> <font class="error">* <?php echo $errors['date_format']; ?></font> - <em><?php echo Format::date($config['date_format'],$gmtime,$config['timezone_offset'],$config['enable_daylight_saving']); ?></em> + <em><?php echo Format::date($config['date_format'], $gmtime, $config['tz_offset'], $config['enable_daylight_saving']); ?></em> </td> </tr> <tr><td width="220" class="required">Date & Time Format:</td> <td><input type="text" name="datetime_format" value="<?php echo $config['datetime_format']; ?>"> <font class="error">* <?php echo $errors['datetime_format']; ?></font> - <em><?php echo Format::date($config['datetime_format'],$gmtime,$config['timezone_offset'],$config['enable_daylight_saving']); ?></em> + <em><?php echo Format::date($config['datetime_format'], $gmtime, $config['tz_offset'], $config['enable_daylight_saving']); ?></em> </td> </tr> <tr><td width="220" class="required">Day, Date & Time Format:</td> <td><input type="text" name="daydatetime_format" value="<?php echo $config['daydatetime_format']; ?>"> <font class="error">* <?php echo $errors['daydatetime_format']; ?></font> - <em><?php echo Format::date($config['daydatetime_format'],$gmtime,$config['timezone_offset'],$config['enable_daylight_saving']); ?></em> + <em><?php echo Format::date($config['daydatetime_format'], $gmtime, $config['tz_offset'], $config['enable_daylight_saving']); ?></em> </td> </tr> <tr><td width="220" class="required">Default Time Zone:</td> @@ -218,9 +218,9 @@ $gmtime = Misc::gmtime(); <?php $sql='SELECT id, offset,timezone FROM '.TIMEZONE_TABLE.' ORDER BY id'; if(($res=db_query($sql)) && db_num_rows($res)){ - while(list($id,$offset, $tz)=db_fetch_row($res)){ + while(list($id, $offset, $tz)=db_fetch_row($res)){ $sel=($config['default_timezone_id']==$id)?'selected="selected"':''; - echo sprintf('<option value="%d" %s>GMT %s - %s</option>',$id,$sel,$offset,$tz); + echo sprintf('<option value="%d" %s>GMT %s - %s</option>', $id, $sel, $offset, $tz); } } ?> diff --git a/include/upgrader/sql/15b30765-dd0022fb.cleanup.sql b/include/upgrader/sql/15b30765-dd0022fb.cleanup.sql new file mode 100644 index 0000000000000000000000000000000000000000..fdbd27d1f799d5da54b12d60522aa451f177798c --- /dev/null +++ b/include/upgrader/sql/15b30765-dd0022fb.cleanup.sql @@ -0,0 +1,10 @@ + +-- Drop fields we no longer need in the reference table. +-- NOTE: This was moved from the 1.6* major upgrade script because the +-- handling of attachments changed with dd0022fb +ALTER TABLE `%TABLE_PREFIX%ticket_attachment` + DROP `file_size`, + DROP `file_name`, + DROP `file_key`, + DROP `updated`, + DROP `deleted`; diff --git a/include/upgrader/sql/15b30765-dd0022fb.patch.sql b/include/upgrader/sql/15b30765-dd0022fb.patch.sql new file mode 100644 index 0000000000000000000000000000000000000000..0006139d679fdf9af8924b639b488e3edc0f2c34 --- /dev/null +++ b/include/upgrader/sql/15b30765-dd0022fb.patch.sql @@ -0,0 +1,26 @@ +/** + * @version v1.7 RC2+ + * @signature dd0022fb14892c0bb6a9700392df2de7 + * + * Migrate file attachment data from %file to %file_chunk + * + */ + +DROP TABLE IF EXISTS `%TABLE_PREFIX%file_chunk`; +CREATE TABLE `%TABLE_PREFIX%file_chunk` ( + `file_id` int(11) NOT NULL, + `chunk_id` int(11) NOT NULL, + `filedata` longblob NOT NULL, + PRIMARY KEY (`file_id`, `chunk_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `%TABLE_PREFIX%file_chunk` (`file_id`, `chunk_id`, `filedata`) + SELECT `id`, 0, `filedata` + FROM `%TABLE_PREFIX%file`; + +ALTER TABLE `%TABLE_PREFIX%file` DROP COLUMN `filedata`; +OPTIMIZE TABLE `%TABLE_PREFIX%file`; + +-- Finished with patch +UPDATE `%TABLE_PREFIX%config` + SET `schema_signature`='dd0022fb14892c0bb6a9700392df2de7'; diff --git a/include/upgrader/sql/c00511c7-7be60a84.cleanup.sql b/include/upgrader/sql/c00511c7-7be60a84.cleanup.sql index 01d69e2d72b732b2d7c3f618fd6e595ccb7c67f7..eabc72c9e22d724978f4f5449901ea5157b2b6a1 100644 --- a/include/upgrader/sql/c00511c7-7be60a84.cleanup.sql +++ b/include/upgrader/sql/c00511c7-7be60a84.cleanup.sql @@ -4,14 +4,6 @@ ALTER TABLE `%TABLE_PREFIX%config` DROP COLUMN `timezone_offset`, DROP COLUMN `api_passphrase`; --- Drop fields we no longer need in the reference table. -ALTER TABLE `%TABLE_PREFIX%ticket_attachment` - DROP `file_size`, - DROP `file_name`, - DROP `file_key`, - DROP `updated`, - DROP `isdeleted`; - -- Drop fields we no longer need in staff table. ALTER TABLE `%TABLE_PREFIX%staff` DROP `append_signature`, diff --git a/main.inc.php b/main.inc.php index 8e0008e0575575833bdcf9ca594cc88c80de9077..235a6341a2db15e7be7b5c1e313e6b85e9b678f3 100644 --- a/main.inc.php +++ b/main.inc.php @@ -63,7 +63,7 @@ #Current version && schema signature (Changes from version to version) define('THIS_VERSION','1.7-RC2+'); //Shown on admin panel - define('SCHEMA_SIGNATURE', '7f35de4260e7a1d8bc2d4214786972ea'); //MD5 signature of the db schema. (used to trigger upgrades) + define('SCHEMA_SIGNATURE','dd0022fb14892c0bb6a9700392df2de7'); //MD5 signature of the db schema. (used to trigger upgrades) #load config info $configfile=''; if(file_exists(ROOT_DIR.'ostconfig.php')) //Old installs prior to v 1.6 RC5 @@ -131,6 +131,7 @@ define('SYSLOG_TABLE',TABLE_PREFIX.'syslog'); define('SESSION_TABLE',TABLE_PREFIX.'session'); define('FILE_TABLE',TABLE_PREFIX.'file'); + define('FILE_CHUNK_TABLE',TABLE_PREFIX.'file_chunk'); define('STAFF_TABLE',TABLE_PREFIX.'staff'); define('DEPT_TABLE',TABLE_PREFIX.'department'); diff --git a/scp/css/scp.css b/scp/css/scp.css index 0042ed4306a406337f3a3deec2811467c06a325d..fd4faed6dc77cb4e1ebee9ca0c1a8d71b661dab6 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -247,6 +247,13 @@ a.attachment { background:url(../images/icons/attachment.gif ) } a.api { background:url(../images/icons/api.png) } a.newapi { background:url(../images/icons/new_api.png) } +a.ticket-settings { background:url(../images/icons/ticket-settings.gif) } +a.email-settings { background:url(../images/icons/email-settings.gif) } +a.kb-settings { background:url(../images/icons/kb-settings.gif) } +a.alert-settings { background:url(../images/icons/alert-settings.gif) } +a.email-autoresponders { background:url(../images/icons/email-autoresponders.gif) } + + a.sla { background:url(../images/icons/slas.png) } a.newsla { background:url(../images/icons/new_sla.png) } @@ -259,7 +266,8 @@ a.emailTemplates { background:url(../images/icons/email_templates.png) } a.newEmailTemplate { background:url(../images/icons/new_email_template.png) } a.emailFilters { background:url(../images/icons/email_filters.png) } -a.newEmailFilter { background:url(../images/icons/new_email_filter.png) } +a.ticketFilters { background:url(../images/icons/ticket_filters.png) } +a.newTicketFilter { background:url(../images/icons/new_ticket_filter.png) } a.emailSettings { background:url(../images/icons/emails.png) } a.emailDiagnostic { background:url(../images/icons/email_diagnostic.gif) } @@ -1292,7 +1300,7 @@ time { #advanced-search input[type="reset"], #advanced-search input[type="button"], #print-options input[type="reset"], -#print-options input[type="button"] { +#print-options input[type="button"] { opacity:0.7; } diff --git a/scp/images/icons/alert-settings.gif b/scp/images/icons/alert-settings.gif new file mode 100644 index 0000000000000000000000000000000000000000..3c8a0b1debd05f87bb53b0d43fb10f153738df1d Binary files /dev/null and b/scp/images/icons/alert-settings.gif differ diff --git a/scp/images/icons/email-autoresponders.gif b/scp/images/icons/email-autoresponders.gif new file mode 100644 index 0000000000000000000000000000000000000000..5c118b46b3daf67261a92bd252a97ae4a34b4153 Binary files /dev/null and b/scp/images/icons/email-autoresponders.gif differ diff --git a/scp/images/icons/email-settings.gif b/scp/images/icons/email-settings.gif new file mode 100644 index 0000000000000000000000000000000000000000..6dc8aa0023e6d69355200e53ac492d61346f83d3 Binary files /dev/null and b/scp/images/icons/email-settings.gif differ diff --git a/scp/images/icons/kb-settings.gif b/scp/images/icons/kb-settings.gif new file mode 100644 index 0000000000000000000000000000000000000000..991f3c812f0216eb0957d619a92da2e55d22131c Binary files /dev/null and b/scp/images/icons/kb-settings.gif differ diff --git a/scp/images/icons/new_ticket_filter.png b/scp/images/icons/new_ticket_filter.png new file mode 100644 index 0000000000000000000000000000000000000000..00c091ebff2b5c2f20729f4f0b16a6405022b5ea Binary files /dev/null and b/scp/images/icons/new_ticket_filter.png differ diff --git a/scp/images/icons/ticket-settings.gif b/scp/images/icons/ticket-settings.gif new file mode 100644 index 0000000000000000000000000000000000000000..f5d5234a95f4b5d26e7a8eed41054a9377077d90 Binary files /dev/null and b/scp/images/icons/ticket-settings.gif differ diff --git a/scp/images/icons/ticket_filters.png b/scp/images/icons/ticket_filters.png new file mode 100644 index 0000000000000000000000000000000000000000..4f2065212f29d70d1f17f316de5f6b8a77b3f950 Binary files /dev/null and b/scp/images/icons/ticket_filters.png differ diff --git a/scp/images/icons/ticket_source_other.png b/scp/images/icons/ticket_source_other.png new file mode 100644 index 0000000000000000000000000000000000000000..f7a78f27412669beb75c2371d035d5aa104bdce4 Binary files /dev/null and b/scp/images/icons/ticket_source_other.png differ diff --git a/setup/inc/sql/osTicket-mysql.sql b/setup/inc/sql/osTicket-mysql.sql index 9cb2b00459f89fd3e130e57c1153a6d88f505dc1..b1f2fd1ee096d17eb472a4e57eff47c10eda67aa 100644 --- a/setup/inc/sql/osTicket-mysql.sql +++ b/setup/inc/sql/osTicket-mysql.sql @@ -327,15 +327,24 @@ CREATE TABLE `%TABLE_PREFIX%file` ( `size` varchar(25) NOT NULL default '', `hash` varchar(125) NOT NULL, `name` varchar(255) NOT NULL default '', - `filedata` longblob NOT NULL, `created` datetime NOT NULL, PRIMARY KEY (`id`), KEY `hash` (`hash`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -INSERT INTO `%TABLE_PREFIX%file` (`id`, `type`, `size`, `hash`, `name`, `filedata`, `created`) VALUES -(1, 'text/plain', '25', '670c6cc1d1dfc97fad20e5470251b255', 'osTicket.txt', 0x43616e6e6564206174746163686d656e747320726f636b210a, NOW()); +INSERT INTO `%TABLE_PREFIX%file` (`id`, `type`, `size`, `hash`, `name`, `created`) VALUES +(1, 'text/plain', '25', '670c6cc1d1dfc97fad20e5470251b255', 'osTicket.txt', NOW()); +DROP TABLE IF EXISTS `%TABLE_PREFIX%file_chunk`; +CREATE TABLE `%TABLE_PREFIX%file_chunk` ( + `file_id` int(11) NOT NULL, + `chunk_id` int(11) NOT NULL, + `filedata` longblob NOT NULL, + PRIMARY KEY (`file_id`, `chunk_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `%TABLE_PREFIX%file_chunk` (`file_id`, `chunk_id`, `filedata`) +VALUES (1, 0, 0x43616e6e6564206174746163686d656e747320726f636b210a); DROP TABLE IF EXISTS `%TABLE_PREFIX%groups`; CREATE TABLE `%TABLE_PREFIX%groups` ( diff --git a/setup/inc/sql/osTicket-mysql.sql.md5 b/setup/inc/sql/osTicket-mysql.sql.md5 index ede3ca85c75c6b277bf82fb902b30063c9382084..e96b33654d6d528ac92f4613636491d6ffee3e0a 100644 --- a/setup/inc/sql/osTicket-mysql.sql.md5 +++ b/setup/inc/sql/osTicket-mysql.sql.md5 @@ -1 +1 @@ -7f35de4260e7a1d8bc2d4214786972ea +dd0022fb14892c0bb6a9700392df2de7