Skip to content

Commit

Permalink
[#564] Modified machinery JS to export preview function.
Browse files Browse the repository at this point in the history
  • Loading branch information
kardan committed May 27, 2014
1 parent ae04eec commit aac60be
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 25 deletions.
3 changes: 2 additions & 1 deletion akvo/rsr/static/rsr/main/js/src/x_machinery.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ function hex_validator(hexcolor)
return strPattern.test(hexcolor);
}

function preview_widget()
//function preview_widget()
window.preview_widget = function ()
{
// Remove old warnings
var error_message = '';
Expand Down
6 changes: 2 additions & 4 deletions akvo/templates/rsr/project/get-a-widget/machinery_step1.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "rsr/project/project_subpage_base.html" %}
{% load i18n rsr_tags %}

{% load compressed %}

{% block breadcrum_items %}
{{block.super}}
Expand Down Expand Up @@ -825,9 +825,7 @@ <h3>{% trans 'Settings' %}</h3>

{% block js %}
{{block.super}}

<script src="{{ STATIC_URL }}rsr/site/js/akvo_machinery.min.js"></script>
{# asset_bundle 'akvo_machinery_js' #}
{% compressed_js 'akvo_machinery' %}
{% endblock js %}

{% block jq_ready %}
Expand Down
4 changes: 2 additions & 2 deletions akvo/templates/rsr/project/get-a-widget/machinery_step2.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "rsr/project/project_subpage_base.html" %}
{% load i18n rsr_tags %}

{% load compressed %}

{% block head %}
<!--[if IE 7]>
Expand Down Expand Up @@ -258,7 +258,7 @@ <h3>{% trans 'Step 3: Copy the HTML code below for use on your web site' %}</h3>
{% block js %}
{{block.super}}

{% asset_bundle 'akvo_machinery_js' %}
{% compressed_js 'akvo_machinery' %}

<script type="text/javascript">
var akvo_project_id = {{project.id}};
Expand Down
2 changes: 0 additions & 2 deletions akvo/templates/widgets/cobranded_leader.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<meta http-equiv="cache-control" content="no-cache">

{% compressed_css 'widget_cobranded_leader' %}
{# asset_bundle 'widget_cobranded_leader' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/cobranded_leader/css/build/widget_cobranded_leader.min.css" type="text/css" media="screen, projection" /> #}

<style type="text/css" media="screen">
{% block inline_styles %}
Expand Down
3 changes: 1 addition & 2 deletions akvo/templates/widgets/cobranded_narrow.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

{% block style %}
{% compressed_css 'widget_cobranded_narrow' %}
{# asset_bundle 'widget_cobranded_narrow' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/cobranded_narrow/css/build/widget_cobranded_narrow.min.css" type="text/css" media="screen, projection" /> #}

<!--[if IE]>
<style type="text/css" media="screen">
.divider {
Expand Down
3 changes: 1 addition & 2 deletions akvo/templates/widgets/cobranded_short.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

{% block style %}
{% compressed_css 'widget_cobranded_short' %}
{# asset_bundle 'widget_cobranded_short' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/cobranded_short/css/build/widget_cobranded_short.min.css" type="text/css" media="screen, projection" /> #}

<!--[if IE]>
<style type="text/css" media="screen">
.divider {
Expand Down
2 changes: 0 additions & 2 deletions akvo/templates/widgets/feature_side.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

{% block style %}
{% compressed_css 'widget_project' %}
{# asset_bundle 'widget_project' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/project/css/build/widget_project.min.css" type="text/css" media="screen, projection" /> #}

<!--[if IE]>
<style type="text/css" media="screen">
Expand Down
2 changes: 0 additions & 2 deletions akvo/templates/widgets/project_contribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

{% block style %}
{% compressed_css 'widget_project_contribute' %}
{# asset_bundle 'widget_project_contribute' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/project_contribute/css/build/widget_project_contribute.min.css" type="text/css" media="screen, projection" /> #}
{% endblock style %}

{% block inline_styles %}
Expand Down
2 changes: 0 additions & 2 deletions akvo/templates/widgets/project_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

{% block style %}
{% compressed_css 'widget_project_list' %}
{# asset_bundle 'widget_project_list' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/project_list/css/build/widget_project_list.min.css" type="text/css" media="screen, projection" /> #}
{% endblock style %}

{% block inline_styles %}
Expand Down
2 changes: 0 additions & 2 deletions akvo/templates/widgets/project_narrow.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

{% block style %}
{% compressed_css 'widget_project_narrow' %}
{# asset_bundle 'widget_project_narrow' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/project_narrow/css/build/widget_project_narrow.min.css" type="text/css" media="screen, projection" /> #}
<!--[if IE]>
<style type="text/css" media="screen">
.divider {
Expand Down
2 changes: 0 additions & 2 deletions akvo/templates/widgets/project_small.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

{% block style %}
{% compressed_css 'widget_project_small' %}
{# asset_bundle 'widget_project_small' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/project_small/css/build/widget_project_small.min.css" type="text/css" media="screen, projection" /> #}
{% endblock style %}

<style type="text/css" media="screen">
Expand Down
2 changes: 0 additions & 2 deletions akvo/templates/widgets/project_updates.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

{% block style %}
{% compressed_css 'widget_project_updates' %}
{# asset_bundle 'widget_project_updates' #}
{# <link rel="stylesheet" href="{{ STATIC_URL }}rsr/widgets/project_updates/css/build/widget_project_updates.min.css" type="text/css" media="screen, projection" /> #w}

<!--[if IE]>
<style type="text/css" media="screen">
Expand Down

0 comments on commit aac60be

Please sign in to comment.