Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions frontendfsm/aiagallery/source/class/aiagallery/dbif/MDbifCommon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/***
* Copyright (c) 2011 Derrell Lipman
*
* License:
Expand Down Expand Up @@ -65,9 +65,27 @@ qx.Mixin.define("aiagallery.dbif.MDbifCommon",
*/
currentTimestamp : function()
{
return new Date().getTime();
return new Date();
},

/**
* Function to convert linux-time to a standard date
* according to the current locale settings.
*
*@param myDate {Date}
* The time in seconds since beginning of epoch: Jan 1 1970
*@return newDate {String}
* The date in String form
*
*
*/
formatDate : function(myDate)
{
var myFormat = new DateFormat("E MMM dd y HH:m (z)");
//Mon Dec 05 2011 02:46 (GMT-05:00)
//E MMM dd y HH:m (z)
return(myFormat.format(myDate));
},

/**
* Function to be called for authorization to run a service
* method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ qx.Class.define("aiagallery.module.dgallery.appinfo.Fsm",
});

state.addTransition(trans);

/*
* Transition: Idle to AwaitRpcResult
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,24 @@ qx.Class.define("aiagallery.module.dgallery.appinfo.Gui",
// (which could use some additional tweaking, perhaps)
// FIXME: This needs to be internationalized. There are existing
// functions to do so.
var dateObj = new Date(commentTime); //not sure what to do here..
var dateString = dateObj.toDateString();
var timeString = dateObj.getHours() + ":" + dateObj.getMinutes();
var dateTimeString = dateString + " " + timeString + " ET";
//// HOURS
var dateObjNew = aiagallery.dbif.MDbifCommon.currentTimestamp();
// var dateObj = new Date(commentTime); //not sure what to do here..
//var dateString = dateObj.toDateString();
//var timeString = dateObj.getHours() + ":" + dateObj.getMinutes();
//var dateTimeString = dateString + " " + timeString + " ET";
var dateTimeString = dateObjNew;


// 2nd line
var postedStringStart =
'<span style="color:grey;font-size:75%">Posted: ';
var postedString = postedStringStart + dateTimeString + '</span>';
var postedStringLabel = new qx.ui.basic.Label(postedString);




postedStringLabel.set(
{
rich : true,
Expand Down Expand Up @@ -319,17 +327,7 @@ qx.Class.define("aiagallery.module.dgallery.appinfo.Gui",
new qx.ui.container.Composite(new qx.ui.layout.HBox(10));

// Create a download button to allow to user to download the application
downloadBtn =
new qx.ui.form.Button("Download",
"qx/icon/Tango/16/apps/internet-download-manager.png");

// Makes download button smaller and centers it
downloadBtn.set(
{
maxWidth : 200,
alignX : "center"
});

downloadBtn = new qx.ui.form.Button("Download", "qx/icon/Tango/16/apps/internet-download-manager.png");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a number of changes here that are in upstream swedev. Please fetch/merge upstream swedev, fix any resulting conflicts, push to github, and then issue a new pull request. That way, the pull request will contain only your change set, and will merge easily.

Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm so basically re fetch etc.. Because someone just made some changes and issued a pull request after mine is that what happened?

I'm gonna finish all date labels in the next two hours so should I issue it then?

Sent from my iPhone

On Dec 5, 2011, at 4:20 PM, Derrell Lipmanreply@reply.github.com wrote:

@@ -319,17 +327,7 @@ qx.Class.define("aiagallery.module.dgallery.appinfo.Gui",
new qx.ui.container.Composite(new qx.ui.layout.HBox(10));

    // Create a download button to allow to user to download the application
  •    downloadBtn = 
    
  •      new qx.ui.form.Button("Download",
    

- "qx/icon/Tango/16/apps/internet-download-manager.png");

  •    // Makes download button smaller and centers it
    
  •    downloadBtn.set(
    
  •      {
    
  •        maxWidth : 200,
    
  •        alignX : "center"
    

- });

  •    downloadBtn = new qx.ui.form.Button("Download", "qx/icon/Tango/16/apps/internet-download-manager.png");
    

There are a number of changes here that are in upstream swedev. Please fetch/merge upstream swedev, fix any resulting conflicts, push to github, and then issue a new pull request. That way, the pull request will contain only your change set, and will merge easily.

Thanks.


Reply to this email directly or view it on GitHub:
https://github.com/derrell/App-Inventor-Gallery/pull/225/files#r271245

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm so basically re fetch etc.. Because someone just made some changes and
issued a pull request after mine is that what happened?

No, the changes that your code overwrites are a few days old, so it looks
like you have somehow not properly merged upstream swedev.

Derrell

fsm.addObject("downloadBtn", downloadBtn);
downloadBtn.addListener(
"execute",
Expand Down Expand Up @@ -357,11 +355,9 @@ qx.Class.define("aiagallery.module.dgallery.appinfo.Gui",
}

// Create a button to allow users to "flag" things.
flagItButton = new qx.ui.form.Button("Flag it!",
// FIXME: Implement this
flagItButton = new aiagallery.widget.Button("Flag it!",
"qx/icon/Oxygen/16/status/dialog-error.png");
flagItButton.setAppearance("flagIt-button");
fsm.addObject("flagItButton", flagItButton);
flagItButton.addListener("execute", fsm.eventListener, fsm);

// Add likeItButton to the hbox.
hboxFlagLike.add(this.likeItButton, { flex : 1 });
Expand Down Expand Up @@ -584,7 +580,10 @@ qx.Class.define("aiagallery.module.dgallery.appinfo.Gui",
input.dataType = input.DATA_TYPE.TEXT;

//The url of the download link to encode into a qr code.
input.data = location.host + "/rpc?getdata=" + appId + ":apk";
input.data =
"http://app-inventor-gallery.appspot.com/rpc?getdata=" +
appId +
":apk";

//This generates the qr code matrix.
var matrix = new qr.Matrix(input, code);
Expand Down Expand Up @@ -654,6 +653,8 @@ qx.Class.define("aiagallery.module.dgallery.appinfo.Gui",
// Get result data--in this case, the comment that was added.
comment = response.data.result;



// Add the new comment to the GUI, if nonempty.
if (comment["text"] != null)
{
Expand Down Expand Up @@ -706,12 +707,6 @@ qx.Class.define("aiagallery.module.dgallery.appinfo.Gui",

break;

case "flagIt":

console.log(response.data.result );

break;

default:
throw new Error("Unexpected request type: " + requestType);
}
Expand Down