diff --git a/static/app/styles/screen.scss b/static/app/styles/screen.scss index 7d428c7..caef2d6 100644 --- a/static/app/styles/screen.scss +++ b/static/app/styles/screen.scss @@ -1,6 +1,6 @@ @import "variables"; @import "mixins"; -@import "../../bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap.scss"; +@import "../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap.scss"; @import "datepicker"; body { @@ -11,7 +11,7 @@ body { color: white; } } -.navbar .dropdown-toggle{ +.navbar .dropdown-toggle { padding-top: 0; padding-bottom: 0; @@ -118,12 +118,17 @@ body { } } #log { + img.customer { + width: 50px; + height: 50px; + border-radius: 4px; + } h2 { - display:inline-block; + display: inline-block; } table { - tr{ - text-align: middle; + tr { + vertical-align: middle; } .amount { font-size: 2em; @@ -192,6 +197,7 @@ body { margin: 2em; font-size: 10px; color: grey; + img { margin-top: 10px; display: inline-block; diff --git a/static/bower.json b/static/bower.json deleted file mode 100644 index a1d1293..0000000 --- a/static/bower.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "bbs", - "private": true, - "dependencies": { - "bootstrap-sass-official": "~3.1.1", - "jquery": "~1.11.0", - "underscore": "~1.7.0", - "highcharts": "~4.0.4", - "bootstrap-datepicker": "~1.3.0", - "sw-toolbox": "~3.0.0" - }, - "devDependencies": {} -} diff --git a/static/dist/fonts/glyphicons-halflings-regular.eot b/static/dist/fonts/glyphicons-halflings-regular.eot index 4a4ca86..b93a495 100644 Binary files a/static/dist/fonts/glyphicons-halflings-regular.eot and b/static/dist/fonts/glyphicons-halflings-regular.eot differ diff --git a/static/dist/fonts/glyphicons-halflings-regular.svg b/static/dist/fonts/glyphicons-halflings-regular.svg index e3e2dc7..94fb549 100644 --- a/static/dist/fonts/glyphicons-halflings-regular.svg +++ b/static/dist/fonts/glyphicons-halflings-regular.svg @@ -6,224 +6,283 @@ - - - + + - - + + - - - - - - - - - + + + + + + + + + + - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/dist/fonts/glyphicons-halflings-regular.ttf b/static/dist/fonts/glyphicons-halflings-regular.ttf index 67fa00b..1413fc6 100644 Binary files a/static/dist/fonts/glyphicons-halflings-regular.ttf and b/static/dist/fonts/glyphicons-halflings-regular.ttf differ diff --git a/static/dist/fonts/glyphicons-halflings-regular.woff b/static/dist/fonts/glyphicons-halflings-regular.woff index 8c54182..9e61285 100644 Binary files a/static/dist/fonts/glyphicons-halflings-regular.woff and b/static/dist/fonts/glyphicons-halflings-regular.woff differ diff --git a/static/dist/fonts/glyphicons-halflings-regular.woff2 b/static/dist/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/static/dist/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/static/dist/images/edb_brick.png b/static/dist/images/edb_brick.png index ca5e205..b0d9dae 100644 Binary files a/static/dist/images/edb_brick.png and b/static/dist/images/edb_brick.png differ diff --git a/static/dist/images/unknown_person.png b/static/dist/images/unknown_person.png index 3870f1d..99d406c 100644 Binary files a/static/dist/images/unknown_person.png and b/static/dist/images/unknown_person.png differ diff --git a/static/dist/js/app.min.js b/static/dist/js/app.min.js index 7497d74..1793fb2 100644 --- a/static/dist/js/app.min.js +++ b/static/dist/js/app.min.js @@ -1,10 +1 @@ -function enable_all_customers(){$("li.customer").each(function(t){$(this).removeClass("marked"),$(this).show()})}function filter_customers(t){setTimeout(function(){$("li.customer").each(function(e){var i=new RegExp(t,"i"),n=$(this).children("span.name").text();if(i.test(n)){$(this).show();var r=n.toLowerCase()==t.toLowerCase(),o=1==$("li.customer:visible").length;console.log(r,o),r?$(this).addClass("marked"):$(this).removeClass("marked")}else $(this).hide(),$(this).removeClass("marked")})},50)}function enable_all_products(){$("li.product").each(function(t){$(this).removeClass("marked"),$(this).show()})}function reset_qtys(){$(".qty").each(function(t){$(this).html("0")}),$("input[name$=amount]").each(function(t){$(this).val("0")})}function update_total(){var t=0;$("li.product").each(function(){var e=Number($(this).find("[name$=amount]").val()),i=".sale_price_int";"Ekstern"===$("#id_customer_typeahead").val()&&(i=".sale_price_ext");var n=Number($(this).find(i).text());t+=e*n}),0===t&&(t=""),$("span.total_text").html(t)}function productFormatter(){return""+this.point.name+": "+Highcharts.numberFormat(this.percentage,1)+" %"}function parse_products_realtime_data(t,e){for(var i in t.products){null===e.get(i)&&e.addSeries({data:[],id:i,name:i});var n=e.get(i);_.each(t.products[i],function(t){null===e.get(t[0])&&n.addPoint({id:t[0],x:t[0],y:t[1]})})}}function get_products_realtime_data(){$.ajax({url:products_realtime_url,dataType:"json",success:function(t){parse_products_realtime_data(t,products_realtime_chart),setTimeout(function(){get_products_realtime_data()},15e3)},cache:!1})}function renderProductCharts(t){for(var e in t){var i="product_chart"+t[e].id,n=t[e].counts;n=_.map(n,function(t){return[t.full_name,t.amount_total]}),new Highcharts.Chart({chart:{renderTo:i,plotBackgroundColor:null,plotBorderWidth:null,plotShadow:!1},title:{text:t[e].name},tooltip:{formatter:productFormatter},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!0,color:"#000000",connectorColor:"#000000",formatter:function(){return""+this.point.name+": "+this.y}}}},series:[{type:"pie",name:"Orders",data:n}]})}}function renderOrdersGroupedChart(t){var e=t.grouping,i="order_chart_"+e;new Highcharts.Chart({chart:{renderTo:i,type:"column"},title:{text:"Ordre - "+e},tooltip:{formatter:function(){return this.y+" stk"}},yAxis:{title:{text:"Ordre"}},xAxis:{title:{text:"Tid"},labels:{formatter:orderFormatters[e]}},plotOptions:{column:{minPointLength:3,colorByPoint:!0},series:{groupPadding:0,pointPadding:.05}},series:[{name:"Ordre",data:t.orders}]})}!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function i(t){var e="length"in t&&t.length,i=rt.type(t);return"function"===i||rt.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t}function n(t,e,i){if(rt.isFunction(e))return rt.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return rt.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(dt.test(e))return rt.filter(e,t,i);e=rt.filter(e,t)}return rt.grep(t,function(t){return rt.inArray(t,e)>=0!==i})}function r(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function o(t){var e=bt[t]={};return rt.each(t.match(xt)||[],function(t,i){e[i]=!0}),e}function s(){ft.addEventListener?(ft.removeEventListener("DOMContentLoaded",a,!1),t.removeEventListener("load",a,!1)):(ft.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(ft.addEventListener||"load"===event.type||"complete"===ft.readyState)&&(s(),rt.ready())}function l(t,e,i){if(void 0===i&&1===t.nodeType){var n="data-"+e.replace(St,"-$1").toLowerCase();if(i=t.getAttribute(n),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:Ct.test(i)?rt.parseJSON(i):i}catch(r){}rt.data(t,e,i)}else i=void 0}return i}function h(t){var e;for(e in t)if(("data"!==e||!rt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,i,n){if(rt.acceptData(t)){var r,o,s=rt.expando,a=t.nodeType,l=a?rt.cache:t,h=a?t[s]:t[s]&&s;if(h&&l[h]&&(n||l[h].data)||void 0!==i||"string"!=typeof e)return h||(h=a?t[s]=q.pop()||rt.guid++:s),l[h]||(l[h]=a?{}:{toJSON:rt.noop}),("object"==typeof e||"function"==typeof e)&&(n?l[h]=rt.extend(l[h],e):l[h].data=rt.extend(l[h].data,e)),o=l[h],n||(o.data||(o.data={}),o=o.data),void 0!==i&&(o[rt.camelCase(e)]=i),"string"==typeof e?(r=o[e],null==r&&(r=o[rt.camelCase(e)])):r=o,r}}function u(t,e,i){if(rt.acceptData(t)){var n,r,o=t.nodeType,s=o?rt.cache:t,a=o?t[rt.expando]:rt.expando;if(s[a]){if(e&&(n=i?s[a]:s[a].data)){rt.isArray(e)?e=e.concat(rt.map(e,rt.camelCase)):e in n?e=[e]:(e=rt.camelCase(e),e=e in n?[e]:e.split(" ")),r=e.length;for(;r--;)delete n[e[r]];if(i?!h(n):!rt.isEmptyObject(n))return}(i||(delete s[a].data,h(s[a])))&&(o?rt.cleanData([t],!0):it.deleteExpando||s!=s.window?delete s[a]:s[a]=null)}}}function d(){return!0}function p(){return!1}function f(){try{return ft.activeElement}catch(t){}}function g(t){var e=Ht.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function m(t,e){var i,n,r=0,o=typeof t.getElementsByTagName!==Tt?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==Tt?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],i=t.childNodes||t;null!=(n=i[r]);r++)!e||rt.nodeName(n,e)?o.push(n):rt.merge(o,m(n,e));return void 0===e||e&&rt.nodeName(t,e)?rt.merge([t],o):o}function v(t){Pt.test(t.type)&&(t.defaultChecked=t.checked)}function y(t,e){return rt.nodeName(t,"table")&&rt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function x(t){return t.type=(null!==rt.find.attr(t,"type"))+"/"+t.type,t}function b(t){var e=Gt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function w(t,e){for(var i,n=0;null!=(i=t[n]);n++)rt._data(i,"globalEval",!e||rt._data(e[n],"globalEval"))}function k(t,e){if(1===e.nodeType&&rt.hasData(t)){var i,n,r,o=rt._data(t),s=rt._data(e,o),a=o.events;if(a){delete s.handle,s.events={};for(i in a)for(n=0,r=a[i].length;r>n;n++)rt.event.add(e,i,a[i][n])}s.data&&(s.data=rt.extend({},s.data))}}function T(t,e){var i,n,r;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!it.noCloneEvent&&e[rt.expando]){r=rt._data(e);for(n in r.events)rt.removeEvent(e,n,r.handle);e.removeAttribute(rt.expando)}"script"===i&&e.text!==t.text?(x(e).text=t.text,b(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),it.html5Clone&&t.innerHTML&&!rt.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&Pt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:("input"===i||"textarea"===i)&&(e.defaultValue=t.defaultValue)}}function C(e,i){var n,r=rt(i.createElement(e)).appendTo(i.body),o=t.getDefaultComputedStyle&&(n=t.getDefaultComputedStyle(r[0]))?n.display:rt.css(r[0],"display");return r.detach(),o}function S(t){var e=ft,i=Qt[t];return i||(i=C(t,e),"none"!==i&&i||(Zt=(Zt||rt("