Merge bugfixes into sprint release
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#<%=this.ClientID %>_DropDown').combobox({
|
||||
$('#<%=this.ClientID %>_DropControl').combobox({
|
||||
editable: false,
|
||||
height: 32,
|
||||
width: 324,
|
||||
panelAlign: '<%= Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft? "right": "left" %>',
|
||||
panelWidth: 300<%
|
||||
if (!String.IsNullOrEmpty(this.OnClientChange))
|
||||
@@ -16,16 +17,16 @@
|
||||
%>
|
||||
});
|
||||
|
||||
$('#<%=this.ClientID %>_DropDown + span.combo > input.combo-text').click(function () {
|
||||
$('#<%=this.ClientID %>_DropDown + span.combo > span > span.combo-arrow').click();
|
||||
$('#<%=this.ClientID %>_DropControl + span.combo > input.combo-text').click(function () {
|
||||
$('#<%=this.ClientID %>_DropControl + span.combo > span > span.combo-arrow').click();
|
||||
});
|
||||
|
||||
$('#<%=this.ClientID %>_DropDown + span.combo > input.combo-text').keydown(function (e) {
|
||||
$('#<%=this.ClientID %>_DropControl + span.combo > input.combo-text').keydown(function (e) {
|
||||
switch (e.which) {
|
||||
case 40: // down
|
||||
var panel = $('#<%=this.ClientID %>_DropDown').combo('panel');
|
||||
var panel = $('#<%=this.ClientID %>_DropControl').combo('panel');
|
||||
if (!panel.is(':visible')) {
|
||||
$('#<%=this.ClientID %>_DropDown + span.combo > span > span.combo-arrow').click();
|
||||
$('#<%=this.ClientID %>_DropControl + span.combo > span > span.combo-arrow').click();
|
||||
panel.focus();
|
||||
}
|
||||
break;
|
||||
@@ -36,32 +37,32 @@
|
||||
});
|
||||
});
|
||||
|
||||
function <%=this.ClientID %>_DropDown_val(newValue) {
|
||||
function <%=this.ClientID %>_val(newValue) {
|
||||
if (newValue === undefined) {
|
||||
// getter
|
||||
return $('#<%=this.ClientID %>_DropDown').combobox('getValue');
|
||||
return $('#<%=this.ClientID %>_DropControl').combobox('getValue');
|
||||
} else {
|
||||
// setter
|
||||
$('#<%=this.ClientID %>_DropDown').combobox('setValue', newValue);
|
||||
$('#<%=this.ClientID %>_DropControl').combobox('setValue', newValue);
|
||||
}
|
||||
}
|
||||
|
||||
function <%=this.ClientID %>_DropDown_text(newText) {
|
||||
function <%=this.ClientID %>_text(newText) {
|
||||
if (newText === undefined) {
|
||||
// getter
|
||||
return $('#<%=this.ClientID %>_DropDown').combobox('getText');
|
||||
return $('#<%=this.ClientID %>_DropControl').combobox('getText');
|
||||
} else {
|
||||
// setter
|
||||
$('#<%=this.ClientID %>_DropDown').combobox('setText', newText);
|
||||
$('#<%=this.ClientID %>_DropControl').combobox('setText', newText);
|
||||
}
|
||||
}
|
||||
|
||||
function <%=this.ClientID %>_DropDown_loadUrl(url) {
|
||||
$('#<%=this.ClientID %>_DropDown').combobox('reload', url);
|
||||
function <%=this.ClientID %>_loadUrl(url) {
|
||||
$('#<%=this.ClientID %>_DropControl').combobox('reload', url);
|
||||
}
|
||||
|
||||
function <%=this.ClientID %>_DropDown_loadJson(jsonData) {
|
||||
$('#<%=this.ClientID %>_DropDown').combobox({
|
||||
function <%=this.ClientID %>_loadJson(jsonData) {
|
||||
$('#<%=this.ClientID %>_DropControl').combobox({
|
||||
data: $.parseJSON(jsonData),
|
||||
valueField: 'id',
|
||||
textField: 'text',
|
||||
@@ -69,8 +70,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
function <%=this.ClientID %>_DropDown_loadData(jsData) {
|
||||
$('#<%=this.ClientID %>_DropDown').combobox({
|
||||
function <%=this.ClientID %>_loadData(jsData) {
|
||||
$('#<%=this.ClientID %>_DropControl').combobox({
|
||||
data: jsData,
|
||||
valueField: 'id',
|
||||
textField: 'text',
|
||||
@@ -81,4 +82,4 @@
|
||||
</script>
|
||||
|
||||
|
||||
<span id="<%=this.ClientID %>_SpanDrop"><select class="easyui-combo" url="<%=this.DataUrl %>" name="DropDown" id="<%=this.ClientID %>_DropDown" valueField="value" textField="text" groupField="group" animate="true" style="width:324px"></select></span>
|
||||
<span id="<%=this.ClientID %>_SpanDrop"><asp:DropDownList ID="DropControl" runat="server" /></span>
|
||||
|
||||
@@ -5,14 +5,23 @@ namespace Swarmops.Frontend.Controls.v5.Base
|
||||
{
|
||||
public partial class DropDown : ControlV5Base
|
||||
{
|
||||
public ListItemCollection Items
|
||||
{
|
||||
get { return this.DropControl.Items; }
|
||||
}
|
||||
|
||||
public string SelectedValue
|
||||
{
|
||||
get { return this.DropControl.SelectedValue; }
|
||||
set { this.DropControl.SelectedValue = value; }
|
||||
}
|
||||
|
||||
public string OnClientChange { get; set; }
|
||||
public string DataUrl { get; set; }
|
||||
|
||||
public string ClientControlID
|
||||
{
|
||||
get { return this.ClientID + "_DropDown"; }
|
||||
get { return this.ClientID + "_DropControl"; }
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace Swarmops.Frontend.Pages.v5.Admin
|
||||
|
||||
this.ButtonCreate.Text = Global.Global_Create;
|
||||
|
||||
|
||||
this.DropPersonLabel.Items.Clear();
|
||||
this.DropActivistLabel.Items.Clear();
|
||||
this.DropCurrencies.Items.Clear();
|
||||
@@ -65,14 +66,14 @@ namespace Swarmops.Frontend.Pages.v5.Admin
|
||||
}
|
||||
|
||||
localizedPersonLabels.Sort(); // Sorts _localized_
|
||||
|
||||
|
||||
foreach (string localizedPersonLabel in localizedPersonLabels)
|
||||
{
|
||||
string[] parts = localizedPersonLabel.Split ('|');
|
||||
this.DropPersonLabel.Items.Add (new ListItem (parts[0], parts[1]));
|
||||
this.DropActivistLabel.Items.Add (new ListItem (parts[0], parts[1]));
|
||||
}
|
||||
|
||||
|
||||
Currencies currencies = Currencies.GetAll();
|
||||
|
||||
List<string> currencyStrings = new List<string>();
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
|
||||
$('#spanTransactionUnbalancedBy').text('[...]');
|
||||
$('span#spanModalTransactionDate').text('[...]');
|
||||
<%=this.DropOpenPayouts.ClientControlID%>_loadData([{ id: 0, text: "<%=Resources.Global.Global_LoadingPlaceholder%>" }]);
|
||||
<%=this.DropOpenPayouts.ClientControlID%>_val('0');
|
||||
<%=this.DropOpenPayouts.ClientID%>_loadData([{ id: 0, text: "<%=Resources.Global.Global_LoadingPlaceholder%>" }]);
|
||||
<%=this.DropOpenPayouts.ClientID%>_val('0');
|
||||
|
||||
SwarmopsJS.ajaxCall(
|
||||
"/Pages/v5/Ledgers/BalanceTransactions.aspx/GetTransactionMatchability",
|
||||
@@ -50,11 +50,11 @@
|
||||
$('span#spanModalTransactionDate').text(data.TransactionDate);
|
||||
|
||||
if (data.OpenPayoutData.length > 0) {
|
||||
<%=this.DropOpenPayouts.ClientControlID%>_loadData(data.OpenPayoutData);
|
||||
<%=this.DropOpenPayouts.ClientControlID%>_text("<%=Resources.Global.Global_SelectOne%>");
|
||||
<%=this.DropOpenPayouts.ClientID%>_loadData(data.OpenPayoutData);
|
||||
<%=this.DropOpenPayouts.ClientID%>_text("<%=Resources.Global.Global_SelectOne%>");
|
||||
} else {
|
||||
<%=this.DropOpenPayouts.ClientControlID%>_loadData({});
|
||||
<%=this.DropOpenPayouts.ClientControlID%>_text("<%=Resources.Global.Global_NoMatch%>");
|
||||
<%=this.DropOpenPayouts.ClientID%>_loadData({});
|
||||
<%=this.DropOpenPayouts.ClientID%>_text("<%=Resources.Global.Global_NoMatch%>");
|
||||
}
|
||||
|
||||
});
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
|
||||
function onMatchOpenPayout() {
|
||||
var payoutId = <%=this.DropOpenPayouts.ClientControlID%>_val();
|
||||
var payoutId = <%=this.DropOpenPayouts.ClientID%>_val();
|
||||
|
||||
if (payoutId > 0) {
|
||||
<%= this.DialogTx.ClientID %>_close();
|
||||
|
||||
Reference in New Issue
Block a user