--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>BluetoothChat</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>json.validation.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.tizen.web.jslint.nature.JSLintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.tizen.web.css.nature.CSSBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.tizen.web.project.builder.WebBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>usedLibraryType</key>
+ <value>WebUIFramework</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>json.validation.nature</nature>
+ <nature>org.tizen.web.jslint.nature.JSLintNature</nature>
+ <nature>org.tizen.web.css.nature.CSSNature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.tizen.web.project.builder.WebNature</nature>
+ </natures>
+</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://sample-web-application.tizen.org/bt-chat" version="2.1.0" viewmodes="maximized">
- <tizen:application id="QmwDyrmOzO.BluetoothChat" package="QmwDyrmOzO" required_version="2.1"/>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://sample-web-application.tizen.org/bt-chat" version="2.2.0" viewmodes="maximized">
+ <tizen:application id="QmwDyrmOzO.BluetoothChat" package="QmwDyrmOzO" required_version="2.2"/>
<content src="index.html"/>
<icon src="icon.png"/>
<name>BluetoothChat</name>
text-align: center;
}
+html {
+ background: white !important;
+}
+
#start-content {
background-color: white;
}
<meta name="description" content="bt-chat"/>
<meta name="viewport" content="width=360, user-scalable=no"/>
- <title>BluetoothChat</title>
+ <title>Bluetooth chat</title>
<script src="/usr/share/tizen-web-ui-fw/latest/js/jquery.min.js"></script>
<script src="/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.min.js"></script>
<script src="/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.min.js" data-framework-theme="tizen-white" data-framework-viewport-scale="false"></script>
<body>
<div id="start" data-role="page" data-add-back-btn="header">
<div id="start-header" data-role="header" data-position="fixed">
- <h1>BLUETOOTH CHAT</h1>
+ <h1>Bluetooth chat</h1>
</div>
<div id="start-content" data-role="content" data-scroll="none">
<div class="box">
- <div data-role="button" class="ui-btn-start" id="serverButton" style="display: none;">Set name and start server</div>
- <div data-role="button" class="ui-btn-start" id="clientButton" style="display: none;">Set name and join client</div>
- <div data-role="button" class="ui-btn-start" id="turnOnButton" style="display: none;">Turn bluetooth radio on</div>
+ <div data-role="button" class="ui-btn-start" id="serverButton" style="display: none;">Create server</div>
+ <div data-role="button" class="ui-btn-start" id="clientButton" style="display: none;">Join server</div>
+ <div data-role="button" class="ui-btn-start" id="turnOnButton" style="display: none;">Turn bluetooth on</div>
<div id="start-monit" style="display: none;">
<p>... waiting for bluetooth radio ...</p>
</div>
$('body').on('touchstart', '#visibilityPopup-screen', function () {
$('#visibilityOK').trigger('tap');
});
+
+ document.addEventListener('tizenhwkey', function(e) {
+ if (e.keyName == "back") {
+ if ($.mobile.activePage.attr('id') === 'start') {
+ tizen.application.getCurrentApplication().exit();
+ } else {
+ history.back();
+ }
+ }
+ });
+
}
};
}());
ul = content.find('ul');
ul.append(listElement);
ul.listview('refresh');
+ this.checkSendButtonState();
setTimeout(function () { self.moveMessagesListDown(content, ul.height()); }, 200);
},