рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -46,8 +46,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (!Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().descriptionAdditionDraft =
|
||||
if (!Global.mainModule.getBugReport().state.equals(BugReportState.draft))
|
||||
Global.mainModule.getBugReport().descriptionAdditionDraft =
|
||||
BugReportDescriptionAddition.getText();
|
||||
}
|
||||
};
|
||||
@@ -60,8 +60,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (!Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().commentAdditionDraft = BugReportCommentAddition.getText();
|
||||
if (!Global.mainModule.getBugReport().state.equals(BugReportState.draft))
|
||||
Global.mainModule.getBugReport().commentAdditionDraft = BugReportCommentAddition.getText();
|
||||
}
|
||||
};
|
||||
DocumentListener descriptionListener = new DocumentListener() {
|
||||
@@ -73,8 +73,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().description =
|
||||
if (Global.mainModule.getBugReport().state.equals(BugReportState.draft))
|
||||
Global.mainModule.getBugReport().description =
|
||||
BugReportDescription.getText();
|
||||
Global.componentsServer.db.bugReports.RefreshUI();
|
||||
}
|
||||
@@ -88,8 +88,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().comment = BugReportComment.getText();
|
||||
if (Global.mainModule.getBugReport().state.equals(BugReportState.draft))
|
||||
Global.mainModule.getBugReport().comment = BugReportComment.getText();
|
||||
}
|
||||
};
|
||||
//-
|
||||
@@ -436,10 +436,10 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowAccount() {
|
||||
lAccountName.setText(Utils_.Brackets(Current.getAccount().name));
|
||||
lAccountMail.setText(Utils_.Brackets(Current.getAccount().email));
|
||||
lAccountRole.setText(Utils_.Brackets(Current.getAccount().role.getDescription()));
|
||||
switch (Current.getAccount().role) {
|
||||
lAccountName.setText(Utils_.Brackets(Global.mainModule.getAccount().name));
|
||||
lAccountMail.setText(Utils_.Brackets(Global.mainModule.getAccount().email));
|
||||
lAccountRole.setText(Utils_.Brackets(Global.mainModule.getAccount().role.getDescription()));
|
||||
switch (Global.mainModule.getAccount().role) {
|
||||
case Undefined:
|
||||
/// UI.Clear(accountPanel);
|
||||
// accountPanel.add(new CallbackWelcomeForm().content);
|
||||
@@ -553,7 +553,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
public void ShowCurrentBugReport() {
|
||||
SwitchListeners(false);
|
||||
// currentBugReportTabs.setSelectedIndex(0);
|
||||
BugReport target = Current.getBugReport();
|
||||
BugReport target = Global.mainModule.getBugReport();
|
||||
BugReportInterface.CheckSubscribers(target);
|
||||
Global.componentsServer.db.subscribers.ShowUI();
|
||||
//-
|
||||
@@ -576,12 +576,12 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
if (target.state.equals(BugReportState.draft)) {
|
||||
ShowDraft();
|
||||
} else {
|
||||
switch (Current.getAccount().role) {
|
||||
switch (Global.mainModule.getAccount().role) {
|
||||
case User:
|
||||
if (Current.getAccount().email.equalsIgnoreCase(target.sender_address)) {
|
||||
if (Global.mainModule.getAccount().email.equalsIgnoreCase(target.sender_address)) {
|
||||
ShowSender(); //отправитель.может делать с багом все.
|
||||
} else {
|
||||
if (Current.getAccount().email.equalsIgnoreCase(target.executor_address)) {
|
||||
if (Global.mainModule.getAccount().email.equalsIgnoreCase(target.executor_address)) {
|
||||
ShowUserExecutor(); //исполнитель. может менять прогресс и дополнять комментарий.
|
||||
} else ShowUser(); //недоступно ничего. и баг ему невидим. но на всякий случай.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user