{% extends "base_site.html" %} {% block main %}
{% with messages = get_flashed_messages() %} {% if messages %}{{ gettext('There was no changes in tracked files.') }}
{% endif %}{{ gettext('There was no untracked files.') }}
{% endif %} {% endblock %} {% block js %} (function() { var hgwebcommit = {}; hgwebcommit.submit_form = function(op) { $("#formctrl-operation").val(op); $("#formctrl").submit(); }; hgwebcommit.apply_status_color = function(parent) { var colormap = { "M": "status-modified", "A": "status-added", "R": "status-removed", "!": "status-missing", "?": "status-not-tracked" }; $(parent + " option").each(function(idx, val) { var obj = $(val); if (obj.text().length > 0) { var key = obj.text().charAt(0); var style = colormap[key]; obj.addClass(style); } }); }; $(document).ready(function() { $("#formctrl-commit").click(function() { hgwebcommit.submit_form("commit"); }); $("#formctrl-revert").click(function() { hgwebcommit.submit_form("revert"); }); $("#formctrl-remove").click(function() { hgwebcommit.submit_form("remove"); }); hgwebcommit.apply_status_color(".select-files"); }); })(); {% endblock %}