Skip to content

Commit 6c55e94

Browse files
author
Your Name
committed
browsersync
1 parent ad282c7 commit 6c55e94

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

media/src/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ var Gantt_ = require("frappe-gantt").default;
22
var gantt;
33

44
window.change = function ($this) {
5-
$this.preventDefault();
5+
//$this.preventDefault();
66
gantt.hide_popup();
77
gantt.change_view_mode($this.textContent);
8-
8+
99
}
1010

1111

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
66
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
77
"runserver": "python manage.py runserver",
8-
"all": "npm-run-all dev runserver"
8+
"all": "npm-run-all runserver watch"
99
},
1010
"dependencies": {
1111
"cross-env": "^5.2.0",

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
django
22
django-treebeard
33
https://github.com/zodman/django-model-to-dict/archive/master.zip
4+
django-bsync
45

tasks/templates/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ <h3 class="menu-label">Projects</h3>
2020
<ul class="menu-list">
2121
{%for p in projects %}
2222
{% if p.tasks.count > 0 %}
23-
<li {% if p.id == id %} class="is-active" {%endif%}>
24-
<a href="?id={{p.id}}">
23+
<li>
24+
<a {% if p.id == id|add:0 %} class="is-active" {%endif%} href="?id={{p.id}}">
2525
{{p.name}}
2626
</a>
27-
2827
</li>
2928
{% endif %}
3029
{% endfor %}

tasks/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
class TaskView(TemplateView):
99
template_name ="index.html"
10+
1011
def process(self, t):
1112
task = t.to_dict()
1213
for i in ('path', 'depth', 'path', 'numchild','project'):

webpack.mix.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ mix.js(path.join('media', 'src', 'app.js'), path.join('dist'))
3030
// mix.postCss(src, output, [require('postcss-some-plugin')()]);
3131
mix.browserSync({
3232
'proxy':'localhost:8000',
33+
'logFileChanges':true,
34+
'notify':true,
3335
'files':[
34-
path.join("media/dist/*"),
36+
path.join("media","dist","*"),
37+
path.join("*","templates", "**","*.html"),
3538
],
3639
});
3740
// mix.combine(files, destination);

0 commit comments

Comments
 (0)