コード例 #1
0
  private void deleteImage() {
    ServerResponse callback =
        new ServerResponse() {

          @Override
          public void serverResponse(JSONValue responseObj) {
            profileImage.setUrl("???");
          }
        };
    AuthResponder.get(
        constants,
        messages,
        callback,
        "portal/portal_admin.php?action=delProfileImage&image=" + id);
  }
コード例 #2
0
  private void delField(final String field) {
    ServerResponse callback =
        new ServerResponse() {

          @Override
          public void serverResponse(JSONValue responseObj) {
            if (field.equals("facebook")) {
              delTable.setText(2, 1, "");
            } else if (field.equals("homepage")) {
              delTable.setText(0, 1, "");
            } else if (field.equals("linkedin")) {
              delTable.setText(3, 1, "");
            } else if (field.equals("twitter")) {
              delTable.setText(1, 1, "");
            }
          }
        };
    AuthResponder.get(
        constants, messages, callback, "portal/portal_admin.php?action=del" + field + "&id=" + id);
  }
コード例 #3
0
  private void setBlocked(final boolean blocked) {
    ServerResponse callback =
        new ServerResponse() {

          @Override
          public void serverResponse(JSONValue responseObj) {
            blockAccessButton.setEnabled(!blocked);
            grantAccessButton.setEnabled(blocked);
            delTable.setText(
                4,
                1,
                blocked ? elements.portal_access_blocked() : elements.portal_access_granted());
          }
        };
    AuthResponder.get(
        constants,
        messages,
        callback,
        "portal/portal_admin.php?action=setblocked&blocked=" + (blocked ? 1 : 0) + "&id=" + id);
  }