Changeset - d6efaa91e967
kallithea/public/js/base.js
Show inline comments
 
@@ -386,7 +386,7 @@ function asynchtml(url, $target, success
 
                    success();
 
                }
 
            })
 
        .fail(function(jqXHR, textStatus, errorThrown) {
 
        .fail(function(jqXHR, textStatus) {
 
                if (textStatus == "abort")
 
                    return;
 
                $target.html('<span class="bg-danger">ERROR: {0}</span>'.format(textStatus));
 
@@ -397,7 +397,7 @@ function asynchtml(url, $target, success
 

	
 
function ajaxGET(url, success, failure) {
 
    if(failure === undefined) {
 
        failure = function(jqXHR, textStatus, errorThrown) {
 
        failure = function(jqXHR, textStatus) {
 
                if (textStatus != "abort")
 
                    alert("Ajax GET error: " + textStatus);
 
            };
 
@@ -411,7 +411,7 @@ function ajaxPOST(url, postData, success
 
    postData['_session_csrf_secret_token'] = _session_csrf_secret_token;
 
    var postData = _toQueryString(postData);
 
    if(failure === undefined) {
 
        failure = function(jqXHR, textStatus, errorThrown) {
 
        failure = function(jqXHR, textStatus) {
 
                if (textStatus != "abort")
 
                    alert("Error posting to server: " + textStatus);
 
            };
 
@@ -461,7 +461,7 @@ function toggleFollowingRepo(target, fol
 
        'follows_repository_id': follows_repository_id,
 
        '_session_csrf_secret_token': _session_csrf_secret_token
 
    }
 
    $.post(TOGGLE_FOLLOW_URL, args, function(data){
 
    $.post(TOGGLE_FOLLOW_URL, args, function(){
 
            _onSuccessFollow(target);
 
        });
 
    return false;
 
@@ -555,7 +555,7 @@ var q_filter = (function() {
 
        var $q_filter_field = $('#' + target);
 
        var F = namespace(target);
 

	
 
        $q_filter_field.keyup(function (e) {
 
        $q_filter_field.keyup(function () {
 
            clearTimeout(F.filterTimeout);
 
            F.filterTimeout = setTimeout(F.updateFilter, 600);
 
        });
 
@@ -663,7 +663,7 @@ function _comment_div_append_add($commen
 
    var addlabel = TRANSLATION_MAP['Add Another Comment'];
 
    var $add = $('<div class="add-button-row"><span class="btn btn-default btn-xs add-button">{0}</span></div>'.format(addlabel));
 
    $comment_div.append($add);
 
    $add.children('.add-button').click(function(e) {
 
    $add.children('.add-button').click(function() {
 
        comment_div_state($comment_div, f_path, line_no, true);
 
    });
 
}
 
@@ -771,7 +771,7 @@ function _comment_div_append_form($comme
 
    });
 

	
 
    // add event handler for hide/cancel buttons
 
    $form.find('.hide-inline-form').click(function(e) {
 
    $form.find('.hide-inline-form').click(function() {
 
        comment_div_state($comment_div, f_path, line_no);
 
    });
 

	
 
@@ -788,7 +788,7 @@ function _comment_div_append_form($comme
 
function deleteComment(comment_id) {
 
    var url = AJAX_COMMENT_DELETE_URL.replace('__COMMENT_ID__', comment_id);
 
    var postData = {};
 
    function success(o) {
 
    function success() {
 
        $('#comment-'+comment_id).remove();
 
        // Ignore that this might leave a stray Add button (or have a pending form with another comment) ...
 
    }
 
@@ -807,7 +807,7 @@ function linkInlineComments($firstlinks,
 
        return;
 
    }
 

	
 
    $comments.each(function(i, e){
 
    $comments.each(function(i){
 
            var prev = '';
 
            if (i > 0){
 
                var prev_anchor = $($comments.get(i-1)).prop('id');
 
@@ -926,7 +926,7 @@ function initCodeMirror(textarea_id, bas
 
        });
 
    CodeMirror.modeURL = baseUrl + "/codemirror/mode/%N/%N.js";
 

	
 
    $('#reset').click(function(e){
 
    $('#reset').click(function(){
 
            window.location=resetUrl;
 
        });
 

	
 
@@ -967,7 +967,7 @@ function _getIdentNode(n){
 

	
 
/* generate links for multi line selects that can be shown by files.html page_highlights.
 
 * This is a mouseup handler for hlcode from CodeHtmlFormatter and pygmentize */
 
function getSelectionLink(e) {
 
function getSelectionLink() {
 
    //get selection from start/to nodes
 
    if (typeof window.getSelection != "undefined") {
 
        var s = window.getSelection();
 
@@ -1136,12 +1136,12 @@ function SimpleUserAutoComplete($inputEl
 
        ajax: {
 
            url: pyroutes.url('users_and_groups_data'),
 
            dataType: 'json',
 
            data: function(term, page){
 
            data: function(term){
 
              return {
 
                query: term
 
              };
 
            },
 
            results: function (data, page){
 
            results: function (data){
 
              return data;
 
            },
 
            cache: true
 
@@ -1160,13 +1160,13 @@ function MembersAutoComplete($inputEleme
 
        ajax: {
 
            url: pyroutes.url('users_and_groups_data'),
 
            dataType: 'json',
 
            data: function(term, page){
 
            data: function(term){
 
              return {
 
                query: term,
 
                types: 'users,groups'
 
              };
 
            },
 
            results: function (data, page){
 
            results: function (data){
 
              return data;
 
            },
 
            cache: true
 
@@ -1196,7 +1196,7 @@ function MentionsAutoComplete($inputElem
 
          }
 
        );
 
      },
 
      sorter: function(query, items, searchKey) {
 
      sorter: function(query, items) {
 
        return items;
 
      }
 
    },
 
@@ -1267,7 +1267,7 @@ function addReviewMember(id,fname,lname,
 
    }
 
}
 

	
 
function removeReviewMember(reviewer_id, repo_name, pull_request_id){
 
function removeReviewMember(reviewer_id){
 
    var $li = $('#reviewer_{0}'.format(reviewer_id));
 
    $li.find('div div').css("text-decoration", "line-through");
 
    $li.find('input').prop('name', 'review_members_removed');
 
@@ -1283,12 +1283,12 @@ function PullRequestAutoComplete($inputE
 
        ajax: {
 
            url: pyroutes.url('users_and_groups_data'),
 
            dataType: 'json',
 
            data: function(term, page){
 
            data: function(term){
 
              return {
 
                query: term
 
              };
 
            },
 
            results: function (data, page){
 
            results: function (data){
 
              return data;
 
            },
 
            cache: true
 
@@ -1322,7 +1322,7 @@ function addPermAction(perm_type) {
 
}
 

	
 
function ajaxActionRevokePermission(url, obj_id, obj_type, field_id, extra_data) {
 
    function success(o) {
 
    function success() {
 
            $('#' + field_id).remove();
 
        }
 
    function failure(o) {
 
@@ -1365,10 +1365,10 @@ function MultiSelectWidget(selected_id, 
 
            return false;
 
        }).remove();
 

	
 
    $('#add_element').click(function(e){
 
    $('#add_element').click(function(){
 
            $selectedselect.append($availableselect.children('option:selected'));
 
        });
 
    $('#remove_element').click(function(e){
 
    $('#remove_element').click(function(){
 
            $availableselect.append($selectedselect.children('option:selected'));
 
        });
 

	
kallithea/public/js/graph.js
Show inline comments
 
@@ -34,7 +34,7 @@ function BranchRenderer(canvas_id, conte
 
	if (!document.createElement("canvas").getContext)
 
		this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
 
	if (!this.canvas) { // canvas creation did for some reason fail - fail silently
 
		this.render = function(data) {};
 
		this.render = function() {};
 
		return;
 
	}
 
	this.ctx = this.canvas.getContext('2d');
kallithea/templates/admin/auth/auth_settings.html
Show inline comments
 
@@ -108,7 +108,7 @@
 
<script>'use strict';
 
    $('.toggle-plugin').click(function(e){
 
        var $auth_plugins_input = $('#auth_plugins');
 
        function notEmpty(element, index, array) {
 
        function notEmpty(element) {
 
            return (element != "");
 
        }
 
        var elems = $auth_plugins_input.val().split(',').filter(notEmpty);
kallithea/templates/admin/gists/edit.html
Show inline comments
 
@@ -117,7 +117,7 @@
 
                        });
 

	
 
                        // on type the new filename set mode
 
                        $filename_input.keyup(function(e){
 
                        $filename_input.keyup(function(){
 
                            var file_data = CodeMirror.getFilenameAndExt(this.value);
 
                            if(file_data['ext'] != null){
 
                                var detected_mode = CodeMirror.findModeByExtension(file_data['ext']) || CodeMirror.findModeByMIME('text/plain');
kallithea/templates/admin/gists/new.html
Show inline comments
 
@@ -93,7 +93,7 @@
 
                });
 

	
 
                // on type the new filename set mode
 
                $filename_input.keyup(function(e){
 
                $filename_input.keyup(function(){
 
                    var file_data = CodeMirror.getFilenameAndExt(this.value);
 
                    if(file_data['ext'] != null){
 
                        var detected_mode = CodeMirror.findModeByExtension(file_data['ext']) || CodeMirror.findModeByMIME('text/plain');
kallithea/templates/admin/repos/repo_creating.html
Show inline comments
 
@@ -52,7 +52,7 @@
 
          window.location = ${h.js(h.url('summary_home', repo_name = c.repo))};
 
      }
 
    },
 
    complete: function(resp, status) {
 
    complete: function(resp) {
 
      if (resp.status == 200){
 
          // Schedule the next request when the current one's complete
 
          setTimeout(worker, 1000);
kallithea/templates/admin/settings/settings_hooks.html
Show inline comments
 
@@ -53,10 +53,10 @@ ${h.end_form()}
 
<script>'use strict';
 
function delete_hook(hook_id, field_id) {
 
    var sUrl = ${h.js(h.url('admin_settings_hooks_delete'))};
 
    function success(o) {
 
    function success() {
 
            $('#' + field_id).remove();
 
        }
 
    function failure(o) {
 
    function failure() {
 
            alert(${h.js(_('Failed to remove hook'))});
 
        }
 
    var postData = {'hook_id': hook_id};
kallithea/templates/admin/settings/settings_vcs.html
Show inline comments
 
@@ -71,7 +71,7 @@ ${h.form(url('admin_settings'), method='
 

	
 
    <script>'use strict';
 
        $(document).ready(function(){
 
            $('#path_unlock').on('click', function(e){
 
            $('#path_unlock').on('click', function(){
 
                $('#path_unlock_icon').removeClass('icon-lock');
 
                $('#path_unlock_icon').addClass('icon-lock-open-alt');
 
                $('#paths_root_path').removeAttr('readonly');
kallithea/templates/base/base.html
Show inline comments
 
@@ -192,7 +192,7 @@
 
          formatSelection: function(obj) {
 
              return obj.text.html_escape();
 
          },
 
          formatNoMatches: function(term) {
 
          formatNoMatches: function() {
 
              return ${h.jshtml(_('No matches found'))};
 
          },
 
          escapeMarkup: function(m) {
 
@@ -441,7 +441,7 @@
 
                sortResults: prefixFirstSort,
 
                formatResult: format,
 
                formatSelection: format,
 
                formatNoMatches: function(term){
 
                formatNoMatches: function(){
 
                    return ${h.jshtml(_('No matches found'))};
 
                },
 
                containerCssClass: "repo-switcher",
kallithea/templates/base/perms_summary.html
Show inline comments
 
@@ -111,7 +111,7 @@
 
        function update_show($checkbox){
 
            var section = $checkbox.data('section');
 

	
 
            var elems = $('.filter_' + section).each(function(el){
 
            var elems = $('.filter_' + section).each(function(){
 
                var perm_type = $checkbox.data('perm_type');
 
                var checked = $checkbox.prop('checked');
 
                if(checked){
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -90,7 +90,7 @@ ${self.repo_context_bar('changelog', c.f
 

	
 
                pyroutes.register('changeset_home', ${h.js(h.url('changeset_home', repo_name='%(repo_name)s', revision='%(revision)s'))}, ['repo_name', 'revision']);
 

	
 
                function checkbox_checker(e) {
 
                function checkbox_checker() {
 
                    var $checked_checkboxes = $checkboxes.filter(':checked');
 
                    var $singlerange = $('#singlerange');
 

	
 
@@ -171,7 +171,7 @@ ${self.repo_context_bar('changelog', c.f
 
                });
 
                $('#singlerange').click(checkbox_checker);
 

	
 
                $('#rev_range_clear').click(function(e){
 
                $('#rev_range_clear').click(function(){
 
                    $checkboxes.prop('checked', false);
 
                    checkbox_checker();
 
                    graph.render(jsdata);
kallithea/templates/changelog/changelog_table.html
Show inline comments
 
@@ -112,7 +112,7 @@
 

	
 
<script>'use strict';
 
  $(document).ready(function() {
 
    $('#changesets .expand_commit').on('click',function(e){
 
    $('#changesets .expand_commit').on('click',function(){
 
      $(this).next('.mid').find('.message > div').toggleClass('hidden');
 
      ${resize_js};
 
    });
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -186,7 +186,7 @@ ${self.repo_context_bar('changelog', c.c
 
    ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
 
    <script>'use strict';
 
      $(document).ready(function(){
 
          $('.code-difftable').on('click', '.add-bubble', function(e){
 
          $('.code-difftable').on('click', '.add-bubble', function(){
 
              show_comment_form($(this));
 
          });
 

	
kallithea/templates/changeset/diff_block.html
Show inline comments
 
@@ -98,7 +98,7 @@
 
<%def name="diff_block_js()">
 
<script>'use strict';
 
$(document).ready(function(){
 
    $('.btn-image-diff-show').click(function(e){
 
    $('.btn-image-diff-show').click(function(){
 
        $('.btn-image-diff-show').hide();
 
        $('.btn-image-diff-swap').show();
 
        $('.img-diff-swapable')
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -73,7 +73,7 @@
 
    $(document).ready(function(){
 
        graph.render(jsdata);
 

	
 
        $('.expand_commit').click(function(e){
 
        $('.expand_commit').click(function(){
 
            $(this).next('.mid').find('.message').toggleClass('expanded');
 
            graph.render(jsdata);
 
        });
kallithea/templates/compare/compare_diff.html
Show inline comments
 
@@ -167,7 +167,7 @@ ${self.repo_context_bar('changelog')}
 
    values_changed();
 
    $('#compare_org').change(values_changed);
 
    $('#compare_other').change(values_changed);
 
    $('#compare_revs').on('click', function(e){
 
    $('#compare_revs').on('click', function(){
 
        var org = $('#compare_org').select2('data');
 
        var other = $('#compare_other').select2('data');
 
        if (!org || !other) {
kallithea/templates/files/files_add.html
Show inline comments
 
@@ -107,7 +107,7 @@ ${self.repo_context_bar('files')}
 
                    });
 

	
 
                    // on type the new filename set mode
 
                    $filename_input.keyup(function(e){
 
                    $filename_input.keyup(function(){
 
                        var file_data = CodeMirror.getFilenameAndExt(this.value);
 
                        if(file_data['ext'] != null){
 
                            var detected_mode = CodeMirror.findModeByExtension(file_data['ext']) || CodeMirror.findModeByMIME('text/plain');
kallithea/templates/index_base.html
Show inline comments
 
@@ -51,7 +51,7 @@
 
                columns: [
 
                    {data: "raw_name", visible: false, searchable: false},
 
                    {title: ${h.jshtml(_('Repository'))}, data: "name", orderData: [0,], render: {
 
                        filter: function(data, type, row, meta) {
 
                        filter: function(data, type, row) {
 
                            return row.just_name;
 
                        }
 
                    }},
kallithea/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -170,7 +170,7 @@ ${self.repo_context_bar('showpullrequest
 
          pendingajax.abort();
 
          pendingajax = undefined;
 
      }
 
      pendingajax = asynchtml(url, $('#pull_request_overview'), function(o){
 
      pendingajax = asynchtml(url, $('#pull_request_overview'), function(){
 
          pendingajax = undefined;
 
      });
 
  }
 
@@ -186,14 +186,14 @@ ${self.repo_context_bar('showpullrequest
 
          maxResults: 50,
 
          sortResults: branchSort
 
      });
 
      $("#org_ref").on("change", function(e){
 
      $("#org_ref").on("change", function(){
 
          loadPreview();
 
      });
 

	
 
      $("#other_repo").select2({
 
          dropdownAutoWidth: true
 
      });
 
      $("#other_repo").on("change", function(e){
 
      $("#other_repo").on("change", function(){
 
          otherrepoChanged();
 
      });
 

	
 
@@ -202,7 +202,7 @@ ${self.repo_context_bar('showpullrequest
 
          maxResults: 50,
 
          sortResults: branchSort
 
      });
 
      $("#other_ref").on("change", function(e){
 
      $("#other_ref").on("change", function(){
 
          loadPreview();
 
      });
 

	
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -348,7 +348,7 @@ ${self.repo_context_bar('showpullrequest
 
          PullRequestAutoComplete($('#user'));
 
          SimpleUserAutoComplete($('#owner'));
 

	
 
          $('.code-difftable').on('click', '.add-bubble', function(e){
 
          $('.code-difftable').on('click', '.add-bubble', function(){
 
              show_comment_form($(this));
 
          });
 

	
 
@@ -368,7 +368,7 @@ ${self.repo_context_bar('showpullrequest
 
              $('#pr-form-clone').prop('disabled',!update);
 
          });
 
          var $org_review_members = $('#review_members').clone();
 
          $('#pr-form-reset').click(function(e){
 
          $('#pr-form-reset').click(function(){
 
              $('.pr-do-edit').hide();
 
              $('.pr-not-edit').show();
 
              $('#pr-form-save').prop('disabled',false);
kallithea/templates/summary/statistics.html
Show inline comments
 
@@ -156,8 +156,7 @@ function SummaryPlot(from,to,dataset,ove
 
        bars: {show:true, align: 'center', lineWidth: 4},
 
        legend: {show:true,
 
                container: "#legend_container",
 
                labelFormatter: function(label, series) {
 
                        // series is the series object for the label
 
                labelFormatter: function(label) {
 
                        return '<a href="javascript:void(0)"> ' + label + '</a>';
 
                    }
 
        },
 
@@ -205,8 +204,6 @@ function SummaryPlot(from,to,dataset,ove
 

	
 
    /**
 
     * generate checkboxes accordingly to data
 
     * @param keys
 
     * @returns
 
     */
 
    function generateCheckboxes(data) {
 
        //append checkboxes
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -240,7 +240,7 @@ hg push ${c.clone_repo_url}
 

	
 
<script>'use strict';
 
$(document).ready(function(){
 
    $('#clone-url input').click(function(e){
 
    $('#clone-url input').click(function(){
 
        if($(this).hasClass('selected')){
 
            $(this).removeClass('selected');
 
            return ;
 
@@ -254,17 +254,17 @@ $(document).ready(function(){
 
    var $clone_by_name = $('#clone_by_name');
 
    var $clone_by_id = $('#clone_by_id');
 
    var $clone_ssh = $('#clone_ssh');
 
    $clone_url.on('click', '.btn.use-name', function(e){
 
    $clone_url.on('click', '.btn.use-name', function(){
 
        $clone_by_name.show();
 
        $clone_by_id.hide();
 
        $clone_ssh.hide();
 
    });
 
    $clone_url.on('click', '.btn.use-id', function(e){
 
    $clone_url.on('click', '.btn.use-id', function(){
 
        $clone_by_id.show();
 
        $clone_by_name.hide();
 
        $clone_ssh.hide();
 
    });
 
    $clone_url.on('click', '.btn.use-ssh', function(e){
 
    $clone_url.on('click', '.btn.use-ssh', function(){
 
        $clone_by_id.hide();
 
        $clone_by_name.hide();
 
        $clone_ssh.show();
0 comments (0 inline, 0 general)