Skip to content

Commit

Permalink
dizinler seçilebiliyor ve seçilenler dosyaya yazdırılıyor related #3
Browse files Browse the repository at this point in the history
  • Loading branch information
aylincsknpnr committed Feb 22, 2015
1 parent bff5020 commit b3ec4f6
Show file tree
Hide file tree
Showing 17 changed files with 364 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tripwire/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
215 changes: 215 additions & 0 deletions tripwire/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg
57 changes: 57 additions & 0 deletions tripwire/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
function listContents(storagename) {

//Clear up the list first
$('#results').html("");
var files = navigator.getDeviceStorage(storagename);

var cursor = files.enumerate();

cursor.onsuccess = function () {
//alert("Got something");
var file = this.result;
if (file != null) {
$("<p><input type='checkbox' class='sec' name='file[]' value='" + file.name + "'/>" + file.name + "</p>").appendTo('#results');
this.done = false;
}
else {
$('<p><input type="button" class="btn btn-primary" value="Kaydet" /></p>').appendTo('#results');
this.done = true;
}

if (!this.done) {
this.continue();
}
}
}

$('input.btn').live('click', function() {
$('input.sec:checked').each(function() {
// alert($(this).val())
$('#results').html("start")
var sdcard = navigator.getDeviceStorage("sdcard");
var file = new Blob([$(this).val()], {type: "text/plain"});


var request = sdcard.addNamed(file, "yeni4.txt");

request.onsuccess = function () {
var name = this.result;
$('#results').html("yazıldı")
console.log('File "' + name + '" successfully wrote on the sdcard storage area');
}

// An error typically occur if a file with the same name already exist
request.onerror = function () {
$('#results').html("hata")
console.warn('Unable to write the file: ' + this.error);
}

});

$('#results').html("text")
});

$(document).ready(function(){
listContents("sdcard");

});
Binary file added tripwire/images/ajax-loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tripwire/images/icon_016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tripwire/images/icon_032.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tripwire/images/icon_064.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tripwire/images/icon_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tripwire/images/icons-18-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tripwire/images/icons-18-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tripwire/images/icons-36-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tripwire/images/icons-36-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions tripwire/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0">
<title>Notes</title>
<link rel="stylesheet" href="jquery.mobile-1.3.1.min.css" />
<script src="jquery-1.7.1.min.js"></script>
<script src="jquery.mobile-1.3.1.min.js"></script>
<script src="app.js"></script>
</head>

<body>


<div data-role="page" id="home">

<div data-role="header" data-position="fixed" id="header">
<h3>Tripwire</h3>
</div><!-- /header -->

<div data-role="content">

<div id="results"></div>
</div><!-- /content -->

</div><!-- /page home -->

</body>
</html>
4 changes: 4 additions & 0 deletions tripwire/jquery-1.7.1.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions tripwire/jquery.mobile-1.3.1.min.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions tripwire/jquery.mobile-1.3.1.min.js

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions tripwire/manifest.webapp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version":"1.0",
"name": "TRİPWİRE",
"description": "This app demonstrates how to use Device Storage",
"launch_path": "/index.html",
"fullscreen": "false",
"icons": {
"16": "/images/icon_016.png",
"32": "/images/icon_032.png",
"48": "/images/icon_048.png",
"128": "/images/icon_128.png"
},
"developer": {
"name": "Romin Irani",
"url": "http://www.rominirani.com"
},
"default_locale": "en",
"type": "privileged",
"permissions": {
"device-storage:videos": { "access": "readwrite" },
"device-storage:pictures":{ "access": "readwrite" },
"device-storage:sdcard": { "access": "readwrite" },
"device-storage:music": { "access": "readwrite" }
}
}

0 comments on commit b3ec4f6

Please sign in to comment.