Пример #1
0
<?php

include 'header.php';
$reposConfig = getOrderedReposConfig();
?>

<script type="text/javascript">

$(function() {
    var ParentRepo = $(".sampleRepo .ParentRepo").html();

    $('[data-loading-text]').click(function () {
        var btn = $(this);
        btn.button('loading');
    });
});

var currentVal= <?php 
echo count($reposConfig) + 1;
?>
;


function addSimpleRepo(){
    event.preventDefault();
    currentVal = currentVal + 1;

    var repo = $(".sampleRepo .DistantRepo")
        .clone()
        .appendTo($(".reposStack"));
        repo.find("input").attr("name",function(i,oldVal) {
Пример #2
0
function getFullReposConfig()
{
    $config = getOrderedReposConfig();
    foreach ($config as $key => $value) {
        if ($value['IsParent'] == true) {
            foreach (getReposForParent($value['Url']) as $key2 => $value2) {
                $return[$value2]['IsParent'] = $value['IsParent'];
                $return[$value2]['Protocol'] = $value['Protocol'];
                $return[$value2]['Url'] = $value['Url'];
                $return[$value2]['RootPath'] = $value2;
                $return[$value2]['RepoUsername'] = $value['RepoUsername'];
                $return[$value2]['RepoPassword'] = $value['RepoPassword'];
            }
        } else {
            if (is_int($key)) {
                $return[$value['RootPath']] = $value;
            } else {
                $return[$key] = $value;
            }
        }
    }
    //$return = array_values($return);
    return $return;
}