From 4e98f25ef2aa6e1cfc0e784db8085186ec0bb315 Mon Sep 17 00:00:00 2001 From: Zniper Date: Tue, 25 Apr 2017 12:28:08 +0700 Subject: [PATCH 1/2] Add step for migrating Django database in provisioning script --- Vagrantfile | 2 +- provision.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index c4d1979f9..7a6eaddc1 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,7 +4,7 @@ Vagrant.configure("2") do |config| config.vm.box = "ubuntu/trusty64" config.vm.host_name = "portia" config.vm.provision :shell, :path => 'provision.sh', :args => [ - "install_deps", "install_splash", "install_python_deps", "configure_nginx", "configure_initctl", "start_portia" + "install_deps", "install_splash", "install_python_deps", "configure_nginx", "configure_initctl", "migrate_django_db", "start_portia" ] config.vm.network "private_network", ip: "33.33.33.10" config.vm.network "forwarded_port", guest: 9001, host: 9001 diff --git a/provision.sh b/provision.sh index 33af82cd7..0991764d4 100755 --- a/provision.sh +++ b/provision.sh @@ -122,6 +122,11 @@ configure_initctl(){ cp "$APP_ROOT/portia.conf" /etc/init } + +migrate_django_db(){ + python /vagrant/portia_server/manage.py migrate +} + start_portia(){ echo "Starting Nginx" echo "==============" From f47cf531ad096abd67974f78c374b214a730b20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruair=C3=AD=20=C3=93=20Fathaigh?= Date: Wed, 31 May 2017 12:07:01 +0100 Subject: [PATCH 2/2] Copy generated urls as they appear in the UI to clipboard. Disable text highlighting on everything except extracted items, generated urls and input elements --- portiaui/app/styles/app.scss | 1 + portiaui/app/styles/components/dropdown-delete.scss | 2 -- portiaui/app/styles/components/extracted-item-table.scss | 1 + .../app/styles/components/extracted-items-json-panel.scss | 1 + portiaui/app/styles/components/start-url-options.scss | 5 +---- portiaui/app/styles/document.scss | 3 +++ portiaui/app/templates/components/colored-span.hbs | 2 +- .../app/templates/components/generated-url-options.hbs | 8 ++++---- 8 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 portiaui/app/styles/document.scss diff --git a/portiaui/app/styles/app.scss b/portiaui/app/styles/app.scss index 18d313249..4cf17ea1d 100644 --- a/portiaui/app/styles/app.scss +++ b/portiaui/app/styles/app.scss @@ -52,6 +52,7 @@ @import "variables"; @import "generic"; +@import "document"; @import "animations"; @import "icons"; diff --git a/portiaui/app/styles/components/dropdown-delete.scss b/portiaui/app/styles/components/dropdown-delete.scss index a32551b61..130adeece 100644 --- a/portiaui/app/styles/components/dropdown-delete.scss +++ b/portiaui/app/styles/components/dropdown-delete.scss @@ -1,7 +1,5 @@ li.dropdown-delete { cursor: pointer; - user-select: none; - a { color: $brand-danger; &:hover { color: $brand-danger; } diff --git a/portiaui/app/styles/components/extracted-item-table.scss b/portiaui/app/styles/components/extracted-item-table.scss index 1966341ff..6ff72c691 100644 --- a/portiaui/app/styles/components/extracted-item-table.scss +++ b/portiaui/app/styles/components/extracted-item-table.scss @@ -1,4 +1,5 @@ .extracted-item-table { + user-select: text; &, table { margin-bottom: $line-height-computed; diff --git a/portiaui/app/styles/components/extracted-items-json-panel.scss b/portiaui/app/styles/components/extracted-items-json-panel.scss index addf15580..2ff6f404c 100644 --- a/portiaui/app/styles/components/extracted-items-json-panel.scss +++ b/portiaui/app/styles/components/extracted-items-json-panel.scss @@ -8,6 +8,7 @@ unicode-bidi: embed; word-break: break-all; word-wrap: break-word; + user-select: text; b { font-weight: normal; diff --git a/portiaui/app/styles/components/start-url-options.scss b/portiaui/app/styles/components/start-url-options.scss index ae1c8d6cb..e0de5dae9 100644 --- a/portiaui/app/styles/components/start-url-options.scss +++ b/portiaui/app/styles/components/start-url-options.scss @@ -1,7 +1,3 @@ -.fragment-span { - margin-left: -3px; -} - .start-url-list { overflow-y: auto; min-height: 200px; @@ -15,6 +11,7 @@ .start-url-generation-list { p { white-space: nowrap; + user-select: text; position: relative; margin: 0; } diff --git a/portiaui/app/styles/document.scss b/portiaui/app/styles/document.scss new file mode 100644 index 000000000..6ee7e1e1d --- /dev/null +++ b/portiaui/app/styles/document.scss @@ -0,0 +1,3 @@ +body { + user-select: none; +} diff --git a/portiaui/app/templates/components/colored-span.hbs b/portiaui/app/templates/components/colored-span.hbs index 889d9eead..697d725eb 100644 --- a/portiaui/app/templates/components/colored-span.hbs +++ b/portiaui/app/templates/components/colored-span.hbs @@ -1 +1 @@ -{{yield}} +{{~ yield ~}} diff --git a/portiaui/app/templates/components/generated-url-options.hbs b/portiaui/app/templates/components/generated-url-options.hbs index 24f9272b5..e9a85bb2c 100644 --- a/portiaui/app/templates/components/generated-url-options.hbs +++ b/portiaui/app/templates/components/generated-url-options.hbs @@ -36,11 +36,11 @@
{{#each generatedUrlLists as |generatedUrlList|}}

- {{#each generatedUrlList as |fragment index|}} - {{#colored-span class="fragment-span" color=(array-get fragmentColors index)}} + {{#each generatedUrlList as |fragment index| ~}} + {{#colored-span color=(array-get fragmentColors index) ~}} {{fragment}} - {{/colored-span}} - {{/each}} + {{~/colored-span}} + {{~/each}}

{{/each}}