From 1b4d9d0cbe31c9ba4af37255e62fb34becde73c6 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 4 Jul 2014 21:52:44 +0200 Subject: [PATCH] Margin bottom to textarea --- fabfile.py | 35 +++++++++++++++++++++++++++++++++++ umap/static/umap/umap.css | 1 + 2 files changed, 36 insertions(+) diff --git a/fabfile.py b/fabfile.py index c83ace52..8644cb96 100644 --- a/fabfile.py +++ b/fabfile.py @@ -166,6 +166,7 @@ def collectstatic(): """ Collect static files from apps and other locations in a single location. """ + collect_remote_statics() dj('collectstatic --link --noinput') dj('storagei18n') dj('compress') @@ -212,6 +213,40 @@ def requirements(name=None, upgrade=False): )) +@task +@roles('web') +def collect_remote_statics(name=None): + """ + Add leaflet and leaflet.draw in a repository watched by collectstatic. + """ + remote_static_dir = '{project_dir}/{project_name}/remote_static'.format(**env) + run_as_umap('mkdir -p {0}'.format(remote_static_dir)) + remote_repositories = { + 'storage': 'git://github.com/yohanboniface/Leaflet.Storage.git@master', + } + with cd(remote_static_dir): + for subdir, path in remote_repositories.iteritems(): + if name and name != subdir: + continue + repository, branch = path.split('@') + if "#" in branch: + branch, ref = branch.split('#') + else: + ref = branch + with hide("running", "stdout"): + exists = run_as_umap('if [ -d "{0}" ]; then echo 1; fi'.format(subdir)) + if exists: + with cd(subdir): + run_as_umap('git checkout {0}'.format(branch)) + run_as_umap('git pull origin {0} --tags'.format(branch)) + else: + run_as_umap('git clone {0} {1}'.format(repository, subdir)) + with cd(subdir): + run_as_umap('git checkout {0}'.format(ref)) + if subdir == "leaflet": + run_as_umap('npm install') + run_as_umap('jake build') + #============================================================================== # Helper functions #============================================================================== diff --git a/umap/static/umap/umap.css b/umap/static/umap/umap.css index bb6b9324..b911f477 100644 --- a/umap/static/umap/umap.css +++ b/umap/static/umap/umap.css @@ -199,6 +199,7 @@ input:-moz-placeholder, :-moz-placeholder { #storage-ui-container textarea { height: 100px; + margin-bottom: 14px; } #storage-ui-container select { margin-bottom: 10px;