mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
Separate scripts from html & New rendering function
This commit is contained in:
parent
656d34ed0b
commit
e16e92278b
84 changed files with 848 additions and 1280 deletions
|
@ -72,11 +72,11 @@
|
|||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
|
||||
<?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Backend Template') . "<span class='optional'>" .strtoupper($_SESSION['WEB_BACKEND']) . "</span>";?>
|
||||
|
@ -96,12 +96,12 @@
|
|||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php echo ""; }?>
|
||||
<?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
|
||||
<?php echo ""; }?>
|
||||
<?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Proxy Template') . "<span class='optional'>" .strtoupper($_SESSION['PROXY_SYSTEM']) . "</span>";?>
|
||||
|
@ -121,11 +121,11 @@
|
|||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php echo ""; }?>
|
||||
<?php echo ""; }?>
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('DNS Template') . "<span class='optional'>" .strtoupper($_SESSION['DNS_SYSTEM']) . "</span>";?>
|
||||
|
@ -145,7 +145,7 @@
|
|||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -381,34 +381,3 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript" src="/js/pages/edit.package.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $("input[name^=v_ns]").length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
})
|
||||
$('.add-ns').show()
|
||||
})
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue